summaryrefslogtreecommitdiffstats
path: root/usr/share
diff options
context:
space:
mode:
Diffstat (limited to 'usr/share')
-rw-r--r--usr/share/mageiawelcome/helpers.py17
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
-