mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	Merge pull request #1470 from eeintech/hide_system_alert_nostaff
Hide system alert for non-staff users
This commit is contained in:
		| @@ -185,6 +185,10 @@ | |||||||
|     color: #c55; |     color: #c55; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | .icon-orange { | ||||||
|  |     color: #fcba03; | ||||||
|  | } | ||||||
|  |  | ||||||
| .icon-green { | .icon-green { | ||||||
|     color: #43bb43; |     color: #43bb43; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -59,11 +59,17 @@ | |||||||
|           {% endif %} |           {% endif %} | ||||||
|           <li class='dropdown'> |           <li class='dropdown'> | ||||||
|             <a class='dropdown-toggle' data-toggle='dropdown' href="#"> |             <a class='dropdown-toggle' data-toggle='dropdown' href="#"> | ||||||
|  |               {% if user.is_staff %} | ||||||
|               {% if not system_healthy %} |               {% if not system_healthy %} | ||||||
|  |                 {% if not django_q_running %} | ||||||
|                 <span class='fas fa-exclamation-triangle icon-red'></span> |                 <span class='fas fa-exclamation-triangle icon-red'></span> | ||||||
|  |                 {% else %} | ||||||
|  |                 <span class='fas fa-exclamation-triangle icon-orange'></span> | ||||||
|  |                 {% endif %} | ||||||
|               {% elif not up_to_date %} |               {% elif not up_to_date %} | ||||||
|               <span class='fas fa-info-circle icon-green'></span> |               <span class='fas fa-info-circle icon-green'></span> | ||||||
|               {% endif %} |               {% endif %} | ||||||
|  |               {% endif %} | ||||||
|               <span class="fas fa-user"></span> <b>{{ user.get_username }}</b></a> |               <span class="fas fa-user"></span> <b>{{ user.get_username }}</b></a> | ||||||
|             <ul class='dropdown-menu'> |             <ul class='dropdown-menu'> | ||||||
|                 {% if user.is_authenticated %} |                 {% if user.is_authenticated %} | ||||||
| @@ -77,10 +83,14 @@ | |||||||
|                 <hr> |                 <hr> | ||||||
|                 <li><a href="{% url 'settings' %}"><span class="fas fa-cog"></span> {% trans "Settings" %}</a></li> |                 <li><a href="{% url 'settings' %}"><span class="fas fa-cog"></span> {% trans "Settings" %}</a></li> | ||||||
|                 <li id='launch-stats'><a href='#'> |                 <li id='launch-stats'><a href='#'> | ||||||
|                   {% if system_healthy %} |                   {% if system_healthy or not user.is_staff %} | ||||||
|                   <span class='fas fa-server'> |                   <span class='fas fa-server'></span> | ||||||
|                   {% else %} |                   {% else %} | ||||||
|                   <span class='fas fa-server icon-red'> |                     {% if not django_q_running %} | ||||||
|  |                     <span class='fas fa-server icon-red'></span> | ||||||
|  |                     {% else %} | ||||||
|  |                     <span class='fas fa-server icon-orange'></span> | ||||||
|  |                     {% endif %} | ||||||
|                   {% endif %} |                   {% endif %} | ||||||
|                   </span> {% trans "System Information" %} |                   </span> {% trans "System Information" %} | ||||||
|                 </a></li> |                 </a></li> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user