mirror of
https://github.com/status-im/cabot.git
synced 2025-02-24 02:18:08 +00:00
Added option to remove subscription page and duty rota from main page, also made the user's to modify into a select multiple box for better usability
This commit is contained in:
parent
1afc97b65a
commit
c2bbce7053
@ -296,7 +296,10 @@ class InstanceForm(SymmetricalForm):
|
||||
'data-rel': 'chosen',
|
||||
'style': 'width: 70%',
|
||||
}),
|
||||
'users_to_notify': forms.CheckboxSelectMultiple(),
|
||||
'users_to_notify': forms.SelectMultiple(attrs={
|
||||
'data-rel': 'chosen',
|
||||
'style': 'width: 70%',
|
||||
}),
|
||||
}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
@ -337,7 +340,10 @@ class ServiceForm(forms.ModelForm):
|
||||
'data-rel': 'chosen',
|
||||
'style': 'width: 70%',
|
||||
}),
|
||||
'users_to_notify': forms.CheckboxSelectMultiple(),
|
||||
'users_to_notify': forms.SelectMultiple(attrs={
|
||||
'data-rel': 'chosen',
|
||||
'style': 'width: 70%',
|
||||
}),
|
||||
'hackpad_id': forms.TextInput(attrs={'style': 'width:70%;'}),
|
||||
'runbook_link': forms.TextInput(attrs={'style': 'width:70%;'}),
|
||||
}
|
||||
|
8
cabot/context_processors.py
Normal file
8
cabot/context_processors.py
Normal file
@ -0,0 +1,8 @@
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
def global_settings(request):
|
||||
return {
|
||||
'ENABLE_SUBSCRIPTION': settings.ENABLE_SUBSCRIPTION,
|
||||
'ENABLE_DUTY_ROTA': settings.ENABLE_DUTY_ROTA,
|
||||
}
|
@ -112,6 +112,7 @@ TEMPLATES = [{
|
||||
'django.template.context_processors.request',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
'cabot.context_processors.global_settings',
|
||||
],
|
||||
'debug': force_bool(os.environ.get('TEMPLATE_DEBUG', False))
|
||||
},
|
||||
@ -315,3 +316,5 @@ if AUTH_GOOGLE_OAUTH2:
|
||||
SOCIAL_AUTH_GOOGLE_OAUTH2_WHITELISTED_DOMAINS = os.environ.get('AUTH_GOOGLE_OAUTH2_WHITELISTED_DOMAINS', '').split(',')
|
||||
|
||||
EXPOSE_USER_API = force_bool(os.environ.get('EXPOSE_USER_API', False))
|
||||
ENABLE_SUBSCRIPTION = force_bool(os.environ.get('ENABLE_SUBSCRIPTION', False))
|
||||
ENABLE_DUTY_ROTA = force_bool(os.environ.get('ENABLE_DUTY_ROTA', False))
|
||||
|
@ -44,10 +44,10 @@
|
||||
</ul>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<li class="{% if not ENABLE_SUBSCRIPTION%}hidden{%endif%}">
|
||||
<a href="{% url 'subscriptions' %}"><i class="fa fa-table"></i> Alert subscriptions</a>
|
||||
</li>
|
||||
<li>
|
||||
<li class="{% if not ENABLE_DUTY_ROTA%}hidden{%endif%}">
|
||||
<a href="{% url 'shifts' %}"><i class="glyphicon glyphicon-time"></i> Duty rota</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
@ -73,4 +73,4 @@
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock header_navbar_menu %}
|
||||
{% endblock header_navbar_menu %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user