Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Commit

Permalink
fire or not
Browse files Browse the repository at this point in the history
  • Loading branch information
FoxMaSk committed Jan 17, 2017
1 parent df2d16c commit a09214d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions django_th/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
<a class="btn btn-sm btn-md btn-lg btn-default" role="button" href="{% url 'edit_consumer' trigger.id %}" title="{% trans 'Edit your service' %} {{ trigger.consumer.name|service_readable|lower }}" >{{ trigger.consumer.name|service_readable|lower }} <i class="fa fa-{{ trigger.consumer.name|service_readable_class|lower }}" aria-hidden="true"></i></a>
</div>
<div class="col-xs-5 col-md-5 col-lg-5">
{% if fire %}
<a class="btn btn-sm btn-md btn-lg btn-default" data="{{ trigger.id }}" role="button" href="#" title="{% trans 'Fire this trigger now !' %}"><span class="glyphicon glyphicon-fire icon-white"></span></a>
{% endif %}
{% if trigger.status %}
<a class="btn btn-sm btn-md btn-lg btn-primary" data="{{ trigger.id }}" role="button" href="#" title="{% trans 'Set this trigger off' %}"><span class="glyphicon glyphicon-off icon-white"></span></a>
{% else %}
Expand Down
2 changes: 2 additions & 0 deletions django_th/th_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# when management commands run each 15min
# with 4 'tries' this permit to try on 1 hour
'failed_tries': 2, # can exceed 99 - when
# if you want to authorize the fire button for EACH trigger
'fire': False,
}

TH_SERVICES = (
Expand Down
1 change: 1 addition & 0 deletions django_th/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ def get_context_data(self, **kwargs):
context['nb_services'] = services_activated

context['page_link'] = page_link
context['fire'] = settings.DJANGO_TH.get('fire', False)

return context

Expand Down

0 comments on commit a09214d

Please sign in to comment.