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,6 +1229,23 @@ div.dataTables_wrapper div.dataTables_paginate {
1229 margin-right: 30px; 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 .delete-row{ 1249 .delete-row{
1233 float: right; 1250 float: right;
1234 background-color: gray; 1251 background-color: gray;
reports/forms.py
@@ -33,9 +33,9 @@ class ResourceAndTagForm(forms.Form): @@ -33,9 +33,9 @@ class ResourceAndTagForm(forms.Form):
33 33
34 34
35 class CreateInteractionReportForm(forms.Form): 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 from_mural = forms.BooleanField(required=False, label=_("From Mural")) 40 from_mural = forms.BooleanField(required=False, label=_("From Mural"))
41 from_messages = forms.BooleanField(required=False, label=_("Messages")) 41 from_messages = forms.BooleanField(required=False, label=_("Messages"))
reports/locale/pt_BR/LC_MESSAGES/django.po
@@ -8,7 +8,7 @@ msgid "" @@ -8,7 +8,7 @@ msgid ""
8 msgstr "" 8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n" 9 "Project-Id-Version: PACKAGE VERSION\n"
10 "Report-Msgid-Bugs-To: \n" 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 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14 "Language-Team: LANGUAGE <LL@li.org>\n" 14 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -27,8 +27,20 @@ msgid &quot;Tag&quot; @@ -27,8 +27,20 @@ msgid &quot;Tag&quot;
27 msgstr "Tag" 27 msgstr "Tag"
28 28
29 #: forms.py:36 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 #: forms.py:40 45 #: forms.py:40
34 msgid "From Mural" 46 msgid "From Mural"
@@ -56,16 +68,20 @@ msgstr &quot;Esta data deve ser igual ou anterior à&quot; @@ -56,16 +68,20 @@ msgstr &quot;Esta data deve ser igual ou anterior à&quot;
56 68
57 #: templates/reports/_form.html:4 69 #: templates/reports/_form.html:4
58 msgid "General Parameters" 70 msgid "General Parameters"
59 -msgstr "Parâmetros Gerais" 71 +msgstr "Escolha o Tópico e o Período"
60 72
61 #: templates/reports/_form.html:27 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 #: templates/reports/_form.html:60 77 #: templates/reports/_form.html:60
66 msgid "Interaction with resources" 78 msgid "Interaction with resources"
67 msgstr "Interação com recursos" 79 msgstr "Interação com recursos"
68 80
  81 +#: templates/reports/_form.html:92
  82 +msgid "Search"
  83 +msgstr "Buscar"
  84 +
69 #: templates/reports/create.html:27 templates/reports/view.html:33 85 #: templates/reports/create.html:27 templates/reports/view.html:33
70 msgid "Analytics" 86 msgid "Analytics"
71 msgstr "" 87 msgstr ""
@@ -76,7 +92,7 @@ msgstr &quot;Dados de Interação&quot; @@ -76,7 +92,7 @@ msgstr &quot;Dados de Interação&quot;
76 92
77 #: templates/reports/create.html:40 templates/reports/view.html:46 93 #: templates/reports/create.html:40 templates/reports/view.html:46
78 msgid "Report Card" 94 msgid "Report Card"
79 -msgstr "Boletim da Etapa" 95 +msgstr "Boletim do Topico"
80 96
81 #: templates/reports/create.html:43 templates/reports/view.html:49 97 #: templates/reports/create.html:43 templates/reports/view.html:49
82 msgid "Participation" 98 msgid "Participation"
@@ -98,10 +114,6 @@ msgstr &quot;Assunto&quot; @@ -98,10 +114,6 @@ msgstr &quot;Assunto&quot;
98 msgid "Topic" 114 msgid "Topic"
99 msgstr "Tópico" 115 msgstr "Tópico"
100 116
101 -#: templates/reports/view.html:58  
102 -msgid "Initial Date"  
103 -msgstr "Data inicial"  
104 -  
105 #: templates/reports/view.html:59 117 #: templates/reports/view.html:59
106 msgid "End Date" 118 msgid "End Date"
107 msgstr "Data final" 119 msgstr "Data final"
@@ -196,6 +208,12 @@ msgstr &quot;Classe&quot; @@ -196,6 +208,12 @@ msgstr &quot;Classe&quot;
196 msgid "Performance" 208 msgid "Performance"
197 msgstr "Desempenho" 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 #~ msgid "sunday" 217 #~ msgid "sunday"
200 #~ msgstr "domingo" 218 #~ msgstr "domingo"
201 219
reports/templates/reports/_form.html
@@ -19,17 +19,21 @@ @@ -19,17 +19,21 @@
19 19
20 20
21 {% if field.auto_id == 'id_init_date' or field.auto_id == 'id_end_date' %} 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 {% elif field.auto_id == 'id_from_mural' %} 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 {% else %} 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 {% endif %} 37 {% endif %}
34 38
35 {% if field.errors %} 39 {% if field.errors %}
@@ -77,8 +81,11 @@ @@ -77,8 +81,11 @@
77 {% endif %} 81 {% endif %}
78 <div class="resource-tag-formset"> 82 <div class="resource-tag-formset">
79 {% for field in resource_tag_form %} 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 {% endfor %} 91 {% endfor %}
@@ -89,7 +96,7 @@ @@ -89,7 +96,7 @@
89 </div> 96 </div>
90 97
91 <div class="row text-center"> 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 </div> 100 </div>
94 </form> 101 </form>
95 102
reports/templates/reports/create.html
@@ -58,7 +58,7 @@ @@ -58,7 +58,7 @@
58 var form_topic = $("select#id_topic :selected").filter(":selected").val(); //get user selected topic option 58 var form_topic = $("select#id_topic :selected").filter(":selected").val(); //get user selected topic option
59 59
60 $.get("{% url 'subjects:reports:get_resource_and_tags' %}?subject_id={{subject.id}}"+"&topic_choice="+form_topic, function(data){ 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 for(var j = 0; j < data.resources.length; j++){ 63 for(var j = 0; j < data.resources.length; j++){
64 fields[0].options[fields[0].options.length] = new Option(data.resources[j].name,data.resources[j].id); 64 fields[0].options[fields[0].options.length] = new Option(data.resources[j].name,data.resources[j].id);