Juarez Bochi avatar Juarez Bochi committed 3e1455e

Template improvements

Comments (0)

Files changed (4)

src/static/style.css

 }
 table.panel tr:nth-child(even) {
     background-color:#B0B0B0;
-}
-p.remark {
-    font-family:Arial;
-    font-size:10pt;
-    font-style:italic;
-    
 }

src/templates/airport.html

 {% endblock %}
 
 {% block contents %}
-    <h2>Selecione tipo voo</h2>   
+    <h2>Selecione o tipo de voo</h2>   
     <ul data-role="listview" data-inset="true">
         <li><a href="/{{ airport.iata_code }}/partidas/">Partidas</a></li>
         <li><a href="/{{ airport.iata_code }}/chegadas/">Chegadas</a></li>

src/templates/base.html

             {% block contents %}    
             {% endblock %}
         </div><!-- /content -->
-    
-        <!-- 
-        <div data-role="footer" data-position="fixed" data-id="myfooter">
-            <h4>Page Footer</h4>
-        </div>--><!-- /footer -->
+
+        {% block footer %}{% endblock %}
     </div><!-- /page -->               
 </body>
 </html>

src/templates/panel.html

 {% extends "base.html" %}
 
 {% block backbutton %}
-    <a href="/{{ airport.iata_code }}/" data-rel="back" data-icon="arrow-l">Voltar</a>
+    <a href="/{{ airport.iata_code }}/" data-rel="back" data-role="button" data-icon="arrow-l">Voltar</a>
 {% endblock %}
 
 {% block header %}
             </tr>
         </thead>
         <tbody>
-            {% for event in events %}
+            {% if events %}
+                {% for event in events %}
+                    <tr>
+                        <td>{{ event.company.name }}</td>
+                        <td>{{ event.flight_number|floatformat }}</td>
+                        <td>{{ event.estimation|time:"H:i" }}</td>
+                        <td>{{ event.confirmed|time:"H:i" }}</td>
+                        <td class="airport">{{ event.source.infraero_name }}</td>
+                        <td class="status">{{ event.status }}</td>
+                    </tr>
+                {% endfor %}
+            {% else %}
                 <tr>
-                    <td>{{ event.company.name }}</td>
-                    <td>{{ event.flight_number|floatformat }}</td>
-                    <td>{{ event.estimation|time:"H:i" }}</td>
-                    <td>{{ event.confirmed|time:"H:i" }}</td>
-                    <td class="airport">{{ event.source.infraero_name }}</td>
-                    <td class="status">{{ event.status }}</td>
+                    <td colspan="6">Nenhum voo encontrado</td>
                 </tr>
-            {% endfor %}
+            {% endif %}
         </tbody>
     </table>
     
-    <p class="remark">
-        Horários e status atualizados com dados da Infraero de {{ airport.infraero_last_timestamp }}
-    </p>
+{% endblock %}
+
+{% block footer %}
+    <div data-role="footer" data-position="fixed" data-id="myfooter">
+        <div class="ui-bar">
+            <a href="/{{ airport.iata_code }}/{% if departure %}partidas{% else %}chegadas{% endif %}/"
+                data-role="button" data-icon="refresh" rel="external">Atualizar</a>                              
+            <h4>
+                Dados da 
+                    <a href="http://www.infraero.gov.br/voos/index.aspx" 
+                       rel="nofollow"
+                       rel="external">infraero</a>
+                de {{ airport.infraero_last_timestamp|time:"H\hi" }}
+            </h4>
+        </div>
+    </div>
 {% endblock %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.