##// 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 return html_value
1018 return html_value
1019
1019
1020
1020
1021 def bool2icon(value):
1021 def bool2icon(value, show_at_false=True):
1022 """
1022 """
1023 Returns boolean value of a given value, represented as html element with
1023 Returns boolean value of a given value, represented as html element with
1024 classes that will represent icons
1024 classes that will represent icons
@@ -1029,8 +1029,9 b' def bool2icon(value):'
1029 if value: # does bool conversion
1029 if value: # does bool conversion
1030 return HTML.tag('i', class_="icon-true")
1030 return HTML.tag('i', class_="icon-true")
1031 else: # not true as bool
1031 else: # not true as bool
1032 return HTML.tag('i', class_="icon-false")
1032 if show_at_false:
1033
1033 return HTML.tag('i', class_="icon-false")
1034 return HTML.tag('i')
1034
1035
1035 #==============================================================================
1036 #==============================================================================
1036 # PERMS
1037 # PERMS
@@ -79,7 +79,7 b''
79 % endif
79 % endif
80 </td>
80 </td>
81 <td>${plugin.get_id()}</td>
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 </tr>
83 </tr>
84 %endfor
84 %endfor
85 </table>
85 </table>
@@ -49,9 +49,7 b' Currently the following views are set:'
49 % for route_name, view_fqn, view_url, active in c.view_data:
49 % for route_name, view_fqn, view_url, active in c.view_data:
50 <tr>
50 <tr>
51 <td class="td-x">
51 <td class="td-x">
52 % if active:
52 ${h.bool2icon(active, show_at_false=False)}
53 ${h.bool2icon(active)}
54 % endif
55 </td>
53 </td>
56 <td class="td-x">${view_fqn}</td>
54 <td class="td-x">${view_fqn}</td>
57 <td class="td-x" title="${route_name}">${view_url}</td>
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