Commit a19861bc6f91f271926f2149bdd80c2258bce5ae

Authored by fbormann
1 parent c1c5ed66

fixed ui items, still missing align checkbox items

amadeus/static/css/base/amadeus.css
... ... @@ -1229,6 +1229,23 @@ div.dataTables_wrapper div.dataTables_paginate {
1229 1229 margin-right: 30px;
1230 1230 }
1231 1231  
  1232 +.form-field-report{
  1233 + color: #000000 !important;
  1234 +}
  1235 +
  1236 +.resource-tag-formset{
  1237 + width: 100%;
  1238 + display: inline-block;
  1239 + padding: 15px;
  1240 +}
  1241 +
  1242 +
  1243 +.report-resource-form{
  1244 + width: 30%;
  1245 + float: left;
  1246 +}
  1247 +
  1248 +
1232 1249 .delete-row{
1233 1250 float: right;
1234 1251 background-color: gray;
... ...
reports/forms.py
... ... @@ -33,9 +33,9 @@ class ResourceAndTagForm(forms.Form):
33 33  
34 34  
35 35 class CreateInteractionReportForm(forms.Form):
36   - topic = forms.ChoiceField( label= _("Topics to select data from"), required=True)
37   - init_date = forms.DateField(required=True)
38   - end_date = forms.DateField(required=True)
  36 + topic = forms.ChoiceField( label= _("Topics"), required=True)
  37 + init_date = forms.DateField(required=True, label= _("Initial Date"))
  38 + end_date = forms.DateField(required=True, label= _("Final Date"))
39 39  
40 40 from_mural = forms.BooleanField(required=False, label=_("From Mural"))
41 41 from_messages = forms.BooleanField(required=False, label=_("Messages"))
... ...
reports/locale/pt_BR/LC_MESSAGES/django.po
... ... @@ -8,7 +8,7 @@ msgid ""
8 8 msgstr ""
9 9 "Project-Id-Version: PACKAGE VERSION\n"
10 10 "Report-Msgid-Bugs-To: \n"
11   -"POT-Creation-Date: 2017-03-16 16:47-0300\n"
  11 +"POT-Creation-Date: 2017-03-16 19:05-0300\n"
12 12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14 14 "Language-Team: LANGUAGE <LL@li.org>\n"
... ... @@ -27,8 +27,20 @@ msgid &quot;Tag&quot;
27 27 msgstr "Tag"
28 28  
29 29 #: forms.py:36
30   -msgid "Topics to select data from"
31   -msgstr "Tópico do qual os dados serão retirados"
  30 +#, fuzzy
  31 +#| msgid "Topic"
  32 +msgid "Topics"
  33 +msgstr "Tópico"
  34 +
  35 +#: forms.py:37 templates/reports/view.html:58
  36 +msgid "Initial Date"
  37 +msgstr "Data inicial"
  38 +
  39 +#: forms.py:38
  40 +#, fuzzy
  41 +#| msgid "Initial Date"
  42 +msgid "Final Date"
  43 +msgstr "Data inicial"
32 44  
33 45 #: forms.py:40
34 46 msgid "From Mural"
... ... @@ -56,16 +68,20 @@ msgstr &quot;Esta data deve ser igual ou anterior à&quot;
56 68  
57 69 #: templates/reports/_form.html:4
58 70 msgid "General Parameters"
59   -msgstr "Parâmetros Gerais"
  71 +msgstr "Escolha o Tópico e o Período"
60 72  
61 73 #: templates/reports/_form.html:27
62   -msgid "Data Source"
63   -msgstr "Fonte de dados"
  74 +msgid "Choose the Data Source (is possible to pick more than one)"
  75 +msgstr "Escolha a fonte de dados (é possível escolher mais de uma)"
64 76  
65 77 #: templates/reports/_form.html:60
66 78 msgid "Interaction with resources"
67 79 msgstr "Interação com recursos"
68 80  
  81 +#: templates/reports/_form.html:92
  82 +msgid "Search"
  83 +msgstr "Buscar"
  84 +
69 85 #: templates/reports/create.html:27 templates/reports/view.html:33
70 86 msgid "Analytics"
71 87 msgstr ""
... ... @@ -76,7 +92,7 @@ msgstr &quot;Dados de Interação&quot;
76 92  
77 93 #: templates/reports/create.html:40 templates/reports/view.html:46
78 94 msgid "Report Card"
79   -msgstr "Boletim da Etapa"
  95 +msgstr "Boletim do Topico"
80 96  
81 97 #: templates/reports/create.html:43 templates/reports/view.html:49
82 98 msgid "Participation"
... ... @@ -98,10 +114,6 @@ msgstr &quot;Assunto&quot;
98 114 msgid "Topic"
99 115 msgstr "Tópico"
100 116  
101   -#: templates/reports/view.html:58
102   -msgid "Initial Date"
103   -msgstr "Data inicial"
104   -
105 117 #: templates/reports/view.html:59
106 118 msgid "End Date"
107 119 msgstr "Data final"
... ... @@ -196,6 +208,12 @@ msgstr &quot;Classe&quot;
196 208 msgid "Performance"
197 209 msgstr "Desempenho"
198 210  
  211 +#~ msgid "Topics to select data from"
  212 +#~ msgstr "Tópico do qual os dados serão retirados"
  213 +
  214 +#~ msgid "Data Source"
  215 +#~ msgstr "Escolha a origem dos dados (É possível selecionar mais de uma)"
  216 +
199 217 #~ msgid "sunday"
200 218 #~ msgstr "domingo"
201 219  
... ...
reports/templates/reports/_form.html
... ... @@ -19,17 +19,21 @@
19 19  
20 20  
21 21 {% if field.auto_id == 'id_init_date' or field.auto_id == 'id_end_date' %}
22   - <label> {{field.label}} </label>
23   - {% render_field field class='form-control date-picker' %}
  22 + <label class="form-field-report"> {{field.label}} </label>
  23 + {% render_field field class='form-control date-picker' %}
  24 +
24 25  
25 26  
26 27 {% elif field.auto_id == 'id_from_mural' %}
27   - <h5 class="one"> <span>{% trans "Data Source" %}</span></h5>
28   - <label> {{field.label}} </label>
29   - {% render_field field class='form-control' %}
  28 + <h5 class="one"> <span>{% trans "Choose the Data Source (is possible to pick more than one)" %}</span></h5>
  29 + <div class="report-check-fields">
  30 +
  31 + <label class="form-field-report"> {{field.label}} </label>
  32 + {% render_field field class='form-control ' %}
  33 + </div>
30 34 {% else %}
31   - <label> {{field.label}} </label>
32   - {% render_field field class='form-control' %}
  35 + <label class="form-field-report"> {{field.label}} </label>
  36 + {% render_field field class='form-control ' %}
33 37 {% endif %}
34 38  
35 39 {% if field.errors %}
... ... @@ -77,8 +81,11 @@
77 81 {% endif %}
78 82 <div class="resource-tag-formset">
79 83 {% for field in resource_tag_form %}
80   - <label>{{field.label}}</label>
81   - {% render_field field class="form-control" %}
  84 + <div class="report-resource-form">
  85 + <label class="form-field-report">{{field.label}}</label>
  86 + {% render_field field class="form-control " %}
  87 +
  88 + </div>
82 89  
83 90  
84 91 {% endfor %}
... ... @@ -89,7 +96,7 @@
89 96 </div>
90 97  
91 98 <div class="row text-center">
92   - <input type="submit" value="Search" class="btn btn-success btn-raised" />
  99 + <input type="submit" value="{% trans "Search" %}" class="btn btn-success btn-raised" />
93 100 </div>
94 101 </form>
95 102  
... ...
reports/templates/reports/create.html
... ... @@ -58,7 +58,7 @@
58 58 var form_topic = $("select#id_topic :selected").filter(":selected").val(); //get user selected topic option
59 59  
60 60 $.get("{% url 'subjects:reports:get_resource_and_tags' %}?subject_id={{subject.id}}"+"&topic_choice="+form_topic, function(data){
61   - fields = object.children("select");
  61 + fields = object.find("select"); //get any select below, which are the two fields of the form
62 62  
63 63 for(var j = 0; j < data.resources.length; j++){
64 64 fields[0].options[fields[0].options.length] = new Option(data.resources[j].name,data.resources[j].id);
... ...