mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Switch rigboard new button to primary
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{% extends 'base_rigs.html' %}
|
||||
{% load button from filters %}
|
||||
|
||||
{% block title %}Rigboard{% endblock %}
|
||||
|
||||
@@ -9,12 +10,11 @@
|
||||
<div class="col-sm-12 col-md">
|
||||
Key: <span class="table-success mr-1 px-2">Ready</span><span class="table-warning mr-1 px-2">Action Required</span><span class="table-danger mr-1 px-2">Needs MIC</span><span class="table-secondary mr-1 px-2">Cancelled</span><span class="table-info px-2">Non-Rig</span>
|
||||
</div>
|
||||
|
||||
{% if perms.RIGS.add_event %}
|
||||
<div class="col text-right">
|
||||
{% if perms.RIGS.add_event %}
|
||||
<a href="{% url 'event_create' %}" class="btn btn-success">New <i class="fas fa-plus"></i></a>
|
||||
{% endif %}
|
||||
{% button 'new' 'event_create' None %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% include 'event_table.html' %}
|
||||
|
||||
@@ -206,6 +206,10 @@ def button(type, url=None, pk=None, clazz=None, icon=None, text=None):
|
||||
clazz = "btn-primary"
|
||||
icon = "fa-eye"
|
||||
text = "View"
|
||||
elif type == 'new':
|
||||
clazz = "btn-primary"
|
||||
icon = "fa-plus"
|
||||
text = "New"
|
||||
elif type == 'submit':
|
||||
return {'submit': True, 'class': 'btn-primary', 'icon': 'fa-save', 'text': 'Save'}
|
||||
return {'target': url, 'id': pk, 'class': clazz, 'icon': icon, 'text': text}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{% if submit %}
|
||||
<button type="submit" class="btn {{ class }}" title="{{ text }}"><span class="fas {{ icon }}"></span> <span class="d-none d-sm-block">{{ text }}</span></button>
|
||||
<button type="submit" class="btn {{ class }}" title="{{ text }}"><span class="fas {{ icon }}"></span> <span class="d-none d-sm-inline">{{ text }}</span></button>
|
||||
{% elif id %}
|
||||
<a href="{% url target id %}" class="btn {{ class }}"><span class="fas {{ icon }}"></span> <span class="d-none d-sm-inline">{{ text }}</span></a>
|
||||
{% else %}
|
||||
<a href="{% url target id %}" class="btn {{ class }}"><span class="fas {{ icon }}"></span> <span class="d-none d-sm-block">{{ text }}</span></a>
|
||||
<a href="{% url target %}" class="btn {{ class }}"><span class="fas {{ icon }}"></span> <span class="d-none d-sm-inline">{{ text }}</span></a>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user