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

Commit

Permalink
layout improvments
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Demah committed Jun 20, 2015
1 parent ac98ea6 commit 93bb7c1
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 25 deletions.
22 changes: 14 additions & 8 deletions django_th/static/css/th.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ li {
*/


.trigger-record, .service-record, .wizard-fieldset, .trigger-summary {
.trigger-record, .service-record, .wizard-fieldset {
background-color: white;
border-radius: 5px 5px 5px 5px;
color: #6B6B6B;
Expand All @@ -47,9 +47,9 @@ li {
*/

.trigger-record footer {
font-size: small;
display: block;
padding-top: 55px;
font-size: small;
display: block;
/*padding-top: 55px;*/
}

.trigger-record footer p {
Expand All @@ -60,18 +60,24 @@ li {
word-wrap: break-word;
}

.trigger-record .trigger-button {
/*.trigger-record .trigger-button {
padding-top: 25px;
}
}*/

@media (max-width: 768px) {
.trigger-record .trigger-button {
padding-top: 0px;
}
}


.trigger-summary {
.trigger-summary {
background-color: white;
/*border-radius: 5px 5px 5px 5px;*/
color: #6B6B6B;
/*font-size: 1.1em;*/
/*margin: 0.2em;*/
/*padding: 1em;*/
border: 1px solid #DDDDDD;
text-align: right;
}

Expand Down
7 changes: 5 additions & 2 deletions django_th/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,20 @@
</li>
<li>
<a href="{% url 'user_services' %}" title="{% trans 'List of your own activated services' %}"><span class="glyphicon glyphicon-tasks"></span>&nbsp;&nbsp;Activated services</a>
</li>
</li>
{% block filter_trigger %}
{% include "filter.html" with trigger_filter_by=trigger_filter_by %}
{% endblock %}
{% endblock %}
<li class="dropdown">
<a class="dropdown-toggle" title="{% trans 'Order by...' %}" data-toggle="dropdown" href="#"><span class="glyphicon glyphicon-sort-by-attributes"></span> <b class="caret"></b></a>
<ul class="dropdown dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
<li role="presentation"><a role="menuitem" title="{% trans 'Sort by ' %}" href="{% url 'trigger_order_by' 'provider' %}">{% trans "Service Provider" %}</a></li>
<li role="presentation"><a role="menuitem" title="{% trans 'Sort by ' %}" href="{% url 'trigger_order_by' 'consumer' %}">{% trans "Service Consumer" %}</a></li>
</ul>
</li>
{% block mark_all %}
{% include "mark_all.html" %}
{% endblock %}
{% url 'profiles_profile_detail' request.user.username as profiles_profile_detail %}
</ul>
<ul class="nav navbar-nav navbar-right">
Expand Down
24 changes: 9 additions & 15 deletions django_th/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,11 @@

{% if user.is_authenticated %}
<div class="col-md-12">
<div class="col-md-5">
<h2><span class="glyphicon glyphicon-flash"></span>{% trans "My Triggers" %}</h2>
<div class="col-md-7">
<span class="glyphicon glyphicon-flash"></span>{% trans "My Triggers" %}
</div>
<div class="col-md-6 trigger-summary">
{% trans "Summary" %} :
<span class="label label-info">{{ nb_services }}</span> {% trans "activated" %} <span class="label label-default">{% trans "services" %}</span>
<span class="label label-info">{{ nb_triggers.enabled }}</span> {% trans "enabled" %} <span class="label label-default">{% trans "triggers" %}</span>
<span class="label label-warning">{{ nb_triggers.disabled }}</span> {% trans "disabled" %} <span class="label label-default">{% trans "triggers" %}</span>
<hr/>
{% trans "Actions" %} : <a href="{% url 'trigger_switch_all_to' 'off' %}" title="{% trans 'this action will set all the triggers off' %}">{% trans "Mark all Off" %}</a> - <a href="{% url 'trigger_switch_all_to' 'on' %}" title="{% trans 'this action will set all the triggers on' %}">{% trans 'Mark all On' %}</a>
<div class="col-md-5 trigger-button">
<span class="badge">{{ nb_services }}</span> {% trans "activated" %} {% trans "services" %} - <span class="badge">{{ nb_triggers.enabled }}</span> {% trans "enabled" %} {% trans "triggers" %} - <span class="badge">{{ nb_triggers.disabled }}</span> {% trans "disabled" %} {% trans "triggers" %}
</div>
</div>
{% if triggers_list %}
Expand All @@ -41,15 +36,14 @@ <h2><span class="glyphicon glyphicon-flash"></span>{% trans "My Triggers" %}</h2
{% endif %}
{% for trigger in triggers_list %}
<div id="trigger-record-{{ trigger.id }}"class="trigger-record col-md-12">
<div class="col-md-8 col-sm-6 trigger-text">
<h3><a href="{% url 'edit_trigger' trigger.id %}" title="{% trans 'Edit the description' %} ">{{ trigger.description|safe|escape }}</a></h3>
</div>
<div class="col-md-4 col-sm-6 trigger-button">

<div class="col-md-10 trigger-text">
<a class="btn btn-sm btn-info" href="{% url 'edit_trigger' trigger.id %}" title="{% trans 'Edit the description' %} "><span class="glyphicon glyphicon-pencil icon-white"></span> {{ trigger.description|safe|escape }}</a>

<a class="btn btn-sm btn-info" role="button" href="{% url 'edit_provider' trigger.id %}" title="{% trans 'Edit your service' %} {{ trigger.provider.name|service_readable|lower }}" ><span class="glyphicon glyphicon-pencil icon-white"></span> {{ trigger.provider.name|service_readable|lower }}</a>

<a class="btn btn-sm btn-info" role="button" href="{% url 'edit_consumer' trigger.id %}" title="{% trans 'Edit your service' %} {{ trigger.consumer.name|service_readable|lower }}" ><span class="glyphicon glyphicon-pencil icon-white"></span> {{ trigger.consumer.name|service_readable|lower }}</a>

</div>
<div class="col-md-2 trigger-button">
{% if trigger.status %}
<a class="btn btn-sm 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
7 changes: 7 additions & 0 deletions django_th/templates/mark_all.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% load i18n %}
<li>
<a href="{% url 'trigger_switch_all_to' 'off' %}" title="{% trans 'this action will set all the triggers off' %}"><span class="glyphicon glyphicon-pause"></span>&nbsp;&nbsp;{% trans "Disable all Triggers" %}</a>
</li>
<li>
<a href="{% url 'trigger_switch_all_to' 'on' %}" title="{% trans 'this action will set all the triggers on' %}"><span class="glyphicon glyphicon-play"></span>&nbsp;&nbsp;{% trans 'Enable all Triggers' %}</a>
</li>

0 comments on commit 93bb7c1

Please sign in to comment.