diff options
author | Papoteur <papoteur@mageia.org> | 2018-10-28 12:11:45 +0100 |
---|---|---|
committer | Papoteur <papoteur@mageia.org> | 2018-10-28 12:11:45 +0100 |
commit | f10057f6a95e366540b8a1d1b51e885b92a5c214 (patch) | |
tree | 293408525c96d49ddbf33372bbfd58bab5456f99 /usr | |
parent | 840927499528cd706a323f5844162724e936fa58 (diff) | |
download | mageiawelcome-f10057f6a95e366540b8a1d1b51e885b92a5c214.tar mageiawelcome-f10057f6a95e366540b8a1d1b51e885b92a5c214.tar.gz mageiawelcome-f10057f6a95e366540b8a1d1b51e885b92a5c214.tar.bz2 mageiawelcome-f10057f6a95e366540b8a1d1b51e885b92a5c214.tar.xz mageiawelcome-f10057f6a95e366540b8a1d1b51e885b92a5c214.zip |
Add tooltip in install button when tainted/nonfree is needed.
Diffstat (limited to 'usr')
-rw-r--r-- | usr/share/mageiawelcome/helpers.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/usr/share/mageiawelcome/helpers.py b/usr/share/mageiawelcome/helpers.py index d94f352..cfa3ded 100644 --- a/usr/share/mageiawelcome/helpers.py +++ b/usr/share/mageiawelcome/helpers.py @@ -50,7 +50,7 @@ def is_installed(name): elif release.endswith("nonfree"): repo = 'nonfree' else: - repo = 'core' + repo = '' return release != "", repo @@ -66,14 +66,19 @@ def get_listapp(): start_btn = "<button class='cmd small green' data-run='"+ r[5] + "'><i class='icon-ok-sign'> </i>" + launch +"</button>" if (r[6] != ''): label = "<span class='label red'>" + r[6] + "</span>" + title = " title='{}'".format(_("Need {} repository enabled").format(r[6])) else: - label = "" + label = "" + title = "" is_app_installed, repo = is_installed(r[1]) - if ( not is_app_installed or repo != r[6]):# NOT INSTALLED - listapp += "<li class='" + r[3] +"' id='" + r[0] + "'><img class=icon src=img/" + r[0] + ".png /><div class='chkbox'><input type='checkbox' datasrc='" + r[1] +"'></div> \ -<h6>" + r[2] + "</h6><p class='description'>" + r[4] + "</p>" + label + "<button class='inst small' data-rpm='" + r[1] + "'><i class='icon-circle-arrow-down'> </i>" + install +"</button></li>" + if ( not is_app_installed or repo != r[6]):# NOT INSTALLED IN EXPECTED RELEASE + if is_app_installed and r[6] == "": # ANOTHER RELEASE THAN CORE IS INSTALLED + listapp += "<li class='urpme " + r[3] +"' id='" + r[0] + "'><img class=icon src=img/" + r[0] + ".png /><div class='chkbox'></div> \ +<h6>" + r[2] + "</h6><p class='description'>" + r[4] + "</p>" + label + else: + listapp += "<li class='" + r[3] +"' id='" + r[0] + "'><img class=icon src=img/" + r[0] + ".png /><div class='chkbox'><input type='checkbox' datasrc='" + r[1] +"'></div> \ +<h6>" + r[2] + "</h6><p class='description'>" + r[4] + "</p>" + label + "<button class='inst small' data-rpm='" + r[1] + "'" + title +"><i class='icon-circle-arrow-down'> </i>" + install +"</button></li>" else: # INSTALLED listapp += "<li class='urpme " + r[3] +"' id='" + r[0] + "'><img class=icon src=img/" + r[0] + ".png /><div class='chkbox'></div> \ <h6>" + r[2] + "</h6><p class='description'>" + r[4] + "</p>" + start_btn + label + "</li>" return listapp - |