Fix username color on mobile screens

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-12-03 23:14:45 -04:00
parent 196e2b5871
commit 3db4ad4fd0
5 changed files with 14 additions and 2 deletions

View File

@@ -3,6 +3,7 @@
- Update Celery broker environment variable in the docker installer.
- Add preparestatic command to documentation. GitLab issue #692.
Thanks to Christopher S. Meiklejohn (@cmeiklejohn2) for the report.
- Fix username color on mobile screens.
3.3 (2019-12-03)
================

View File

@@ -472,12 +472,20 @@ a i {
margin: 0 10px 0 -15px;
}
.menu-user-name {
color: white;
}
@media (min-width: 768px) {
#menu-main {
display: block;
left: 0;
}
.menu-user-name {
color: inherit;
}
#menu-main-button-close {
display: none;
}

View File

@@ -866,6 +866,7 @@ class Text(Link):
Menu text. Renders to a plain <li> tag
"""
def __init__(self, *args, **kwargs):
self.html_extra_classes = kwargs.get('html_extra_classes')
self.icon = None
self.text = kwargs.get('text')
self.view = None

View File

@@ -1,7 +1,7 @@
{% if link.separator %}
<li role="separator" class="divider"></li>
{% elif link.text_span %}
<li class="text-center link-text-span" >{{ link.text }}</li>
<li class="text-center link-text-span {{ link.html_extra_classes }}" >{{ link.text }}</li>
{% else %}
{% if link.disabled %}
<a class="{{ link.html_extra_classes }} {{ link_extra_classes }} {% if link_classes %}{{ link_classes }} {% else %}btn {% if 'dangerous' in link.tags %}btn-danger{% else %}btn-primary{% endif %} btn-xs{% endif %} {% if link.active %}{{ link_class_active }}{% endif %} {% if 'new_window' in link.tags %}new_window{% endif %} disabled" disabled='disabled' style="cursor: default;" href="#">{% if link.icon_class %}{{ link.icon_class.render }}{% endif %} {{ link.text }}{% if link.error %} - {{ link.error }}{% endif %}</a>{% if horizontal %}{% if not forloop.last %}&nbsp;{% endif %}{% endif %}

View File

@@ -97,4 +97,6 @@ link_user_setup = Link(
view='user_management:user_list'
)
separator_user_label = Separator()
text_user_label = Text(text=get_user_label_text)
text_user_label = Text(
html_extra_classes='menu-user-name', text=get_user_label_text
)