##// END OF EJS Templates
authentication: show icons only for activated plugins.
marcink -
r3291:a2b3593d default
parent child Browse files
Show More
@@ -1018,7 +1018,7 b' def style_metatag(tag_type, value):'
1018 1018 return html_value
1019 1019
1020 1020
1021 def bool2icon(value):
1021 def bool2icon(value, show_at_false=True):
1022 1022 """
1023 1023 Returns boolean value of a given value, represented as html element with
1024 1024 classes that will represent icons
@@ -1029,8 +1029,9 b' def bool2icon(value):'
1029 1029 if value: # does bool conversion
1030 1030 return HTML.tag('i', class_="icon-true")
1031 1031 else: # not true as bool
1032 return HTML.tag('i', class_="icon-false")
1033
1032 if show_at_false:
1033 return HTML.tag('i', class_="icon-false")
1034 return HTML.tag('i')
1034 1035
1035 1036 #==============================================================================
1036 1037 # PERMS
@@ -79,7 +79,7 b''
79 79 % endif
80 80 </td>
81 81 <td>${plugin.get_id()}</td>
82 <td>${plugin.is_active()}</td>
82 <td>${h.bool2icon(plugin.is_active(),show_at_false=False)}</td>
83 83 </tr>
84 84 %endfor
85 85 </table>
@@ -49,9 +49,7 b' Currently the following views are set:'
49 49 % for route_name, view_fqn, view_url, active in c.view_data:
50 50 <tr>
51 51 <td class="td-x">
52 % if active:
53 ${h.bool2icon(active)}
54 % endif
52 ${h.bool2icon(active, show_at_false=False)}
55 53 </td>
56 54 <td class="td-x">${view_fqn}</td>
57 55 <td class="td-x" title="${route_name}">${view_url}</td>
General Comments 0
You need to be logged in to leave comments. Login now