mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-24 17:02:18 +00:00
Switch rigboard new button to primary
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
{% extends 'base_rigs.html' %}
|
{% extends 'base_rigs.html' %}
|
||||||
|
{% load button from filters %}
|
||||||
|
|
||||||
{% block title %}Rigboard{% endblock %}
|
{% block title %}Rigboard{% endblock %}
|
||||||
|
|
||||||
@@ -9,12 +10,11 @@
|
|||||||
<div class="col-sm-12 col-md">
|
<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>
|
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>
|
</div>
|
||||||
|
{% if perms.RIGS.add_event %}
|
||||||
<div class="col text-right">
|
<div class="col text-right">
|
||||||
{% if perms.RIGS.add_event %}
|
{% button 'new' 'event_create' None %}
|
||||||
<a href="{% url 'event_create' %}" class="btn btn-success">New <i class="fas fa-plus"></i></a>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% include 'event_table.html' %}
|
{% include 'event_table.html' %}
|
||||||
|
|||||||
@@ -206,6 +206,10 @@ def button(type, url=None, pk=None, clazz=None, icon=None, text=None):
|
|||||||
clazz = "btn-primary"
|
clazz = "btn-primary"
|
||||||
icon = "fa-eye"
|
icon = "fa-eye"
|
||||||
text = "View"
|
text = "View"
|
||||||
|
elif type == 'new':
|
||||||
|
clazz = "btn-primary"
|
||||||
|
icon = "fa-plus"
|
||||||
|
text = "New"
|
||||||
elif type == 'submit':
|
elif type == 'submit':
|
||||||
return {'submit': True, 'class': 'btn-primary', 'icon': 'fa-save', 'text': 'Save'}
|
return {'submit': True, 'class': 'btn-primary', 'icon': 'fa-save', 'text': 'Save'}
|
||||||
return {'target': url, 'id': pk, 'class': clazz, 'icon': icon, 'text': text}
|
return {'target': url, 'id': pk, 'class': clazz, 'icon': icon, 'text': text}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
{% if submit %}
|
{% 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 %}
|
{% 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 %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user