[chronojump-server] Adding page-header for all templates, and reducing the margin-top to see more content. Option to sel



commit a6cb78e8627c2531750fe7f37938408d812411b9
Author: Marcos Venteo García <mventeo gmail com>
Date:   Tue Jun 27 19:52:41 2017 +0200

    Adding page-header for all templates, and reducing the margin-top to see more content.
    Option to select the number of items has been removed from all tables, and replaced by a custom filter to 
win space.

 chronojumpserver/js/players.js                |    5 +++
 chronojumpserver/js/results.js                |    1 +
 chronojumpserver/js/sprints.js                |    1 +
 chronojumpserver/static/style.css             |    2 +-
 chronojumpserver/templates/player_detail.html |   12 +++++---
 chronojumpserver/templates/player_list.html   |    7 ++---
 chronojumpserver/templates/results.html       |   36 +++++++++++++++---------
 chronojumpserver/templates/sprints.html       |   10 ++++---
 chronojumpserver/templates/station_list.html  |    4 ++-
 9 files changed, 50 insertions(+), 28 deletions(-)
---
diff --git a/chronojumpserver/js/players.js b/chronojumpserver/js/players.js
index cb60e3e..1f4a496 100755
--- a/chronojumpserver/js/players.js
+++ b/chronojumpserver/js/players.js
@@ -80,6 +80,7 @@ function addModifyDeleteTask(action) {
 }
 
 
+
 /*
   Load Players and tasks
 */
@@ -183,6 +184,7 @@ $(document).ready(function() {
                 }
             }
         ],
+        "dom": '<"toolbar">frtip',
         "pageLength": 10,
         "order": [ 
             [2, 'asc']
@@ -208,6 +210,9 @@ $(document).ready(function() {
         }
     });
 
+    /* Button to add players inside the datatable */
+    $('div.toolbar').html('<a class="btn btn-primary pull-left" href="/player/add">Nou Jugador</a>');
+
     /* To show the modal form to add the tasks */
     $('#players').on('click', 'button', function() {
         var player = table.row($(this).parents('tr')).data();
diff --git a/chronojumpserver/js/results.js b/chronojumpserver/js/results.js
index 270df59..363559f 100755
--- a/chronojumpserver/js/results.js
+++ b/chronojumpserver/js/results.js
@@ -161,6 +161,7 @@ $(document).ready(function() {
         render: $.fn.dataTable.render.number('', ',', 2)
       }
     ],
+    "dom": '<"resultsFilter">frtip',
     "pageLength": 10,
     "order": [ 
       [0, 'desc']
diff --git a/chronojumpserver/js/sprints.js b/chronojumpserver/js/sprints.js
index 608c7dc..0191247 100644
--- a/chronojumpserver/js/sprints.js
+++ b/chronojumpserver/js/sprints.js
@@ -137,6 +137,7 @@ $(document).ready(function() {
         render: $.fn.dataTable.render.number('', ',', 2)
       }
     ],
+    "dom": '<"resultsFilter">frtip',
     "pageLength": 10,
     "order": [ 
       [0, 'desc']
diff --git a/chronojumpserver/static/style.css b/chronojumpserver/static/style.css
index 16222df..9aef39c 100755
--- a/chronojumpserver/static/style.css
+++ b/chronojumpserver/static/style.css
@@ -8,7 +8,7 @@
 body {
   font-family: "Source Sans Pro", HelveticaNeue-Light, "Helvetica Neue Light", "Helvetica Neue", Helvetica, 
Arial, "Lucida Grande", sans-serif;
   padding-bottom: 70px;
-  margin-top: 100px;
+  margin-top: 50px;
 }
 
 body.home {
diff --git a/chronojumpserver/templates/player_detail.html b/chronojumpserver/templates/player_detail.html
index bcc17ac..8b36b88 100755
--- a/chronojumpserver/templates/player_detail.html
+++ b/chronojumpserver/templates/player_detail.html
@@ -1,4 +1,11 @@
-{% from "_formhelpers.html" import render_field %} {% from "_formhelpers.html" import render_rfid_field %} 
{% extends 'layout.html' %} {% block content %} {% if msg %} {% if has_errors %}
+{% from "_formhelpers.html" import render_field %} {% from "_formhelpers.html" import render_rfid_field %} 
{% extends 'layout.html' %}
+{% block content %}
+<div class="page-header">
+  <h1>Dades del jugador <small>{{ form.fullname.data }}</small></h1>
+</div>
+
+
+{% if msg %} {% if has_errors %}
 <div class="alert alert-danger alert-dismissible" role="alert">
   <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span 
aria-hidden="true">&times;</span></button> {{msg}}.
 </div>
@@ -8,9 +15,6 @@
 </div>
 {% endif %} {% endif %}
 
-<div class="row">
-  <h1>Dades del jugador {{ form.fullname.data }}</h1>
-</div>
 <form method="post" enctype="multipart/form-data">
   {{ form.csrf_token }}
   <div class="row">
diff --git a/chronojumpserver/templates/player_list.html b/chronojumpserver/templates/player_list.html
index fdadc79..9fe8b38 100755
--- a/chronojumpserver/templates/player_list.html
+++ b/chronojumpserver/templates/player_list.html
@@ -3,12 +3,11 @@
 <link href="{{ url_for('assets', filename='DataTables/media/css/dataTables.bootstrap.min.css') }}" 
rel="stylesheet" />
 {% endblock %} {% block content %}
 
-<div class="clearfix">
-       <h2 class="pull-left">Llistat de Jugadors <a class="btn btn-primary " href="{{ 
url_for('add_player')}}">Afegir Jugador</a></h2>
-
+<div class="page-header">
+       <h1>Jugadors i Tasques</h1>
 </div>
 
-<div class="row" style="margin-top:20px">
+<div class="row" style="margin-top:15px">
        <table id="players" class="table table-hovered" cellspacing="0" width="100%">
        </table>
 </div>
diff --git a/chronojumpserver/templates/results.html b/chronojumpserver/templates/results.html
index 076254a..b61a966 100755
--- a/chronojumpserver/templates/results.html
+++ b/chronojumpserver/templates/results.html
@@ -7,9 +7,12 @@
 
 
 {% block content %}
-<h2>Resultats</h2>
-<div class="row" style="margin-top: 15px;">
-       <div class="col-sm-3">
+<div class="page-header">
+       <h1>Resultats</h1>
+</div>
+
+<div id="resultsFilter" class="row pull-left">
+       <div class="col-sm-6">
                <label class="radio-inline dayfilter" style="margin-top:5px">
                  <input type="radio" name="filterByDayOptions" id="filterByDay1" value="1" >1d
                </label>
@@ -26,19 +29,24 @@
                  <input type="radio" name="filterByDayOptions" id="filterByDay5" value="all" checked>Tots
                </label>
        </div>
-       <div class="col-sm-3">
-               <label for="player_filter" class="sr-only">Per Jugador</label>
-               <div id="filterByPlayer"></div>
-       </div>
-       <div class="col-sm-3">
-               <label for="fullname_filter" class="sr-only">Per Estació</label>
-               <div id="filterByStation"></div>
-       </div>
-       <div class="col-sm-3">
-               <label for="fullname_filter" class="sr-only">Per Exercici</label>
-               <div id="filterByExercice"></div>
+       <div class="col-sm-6">
+               <div class="row" style="margin-left: -50px">
+                       <div class="col-sm-4">
+                               <label for="player_filter" class="sr-only">Per Jugador</label>
+                               <div id="filterByPlayer"></div>
+                       </div>
+                       <div class="col-sm-4">
+                               <label for="fullname_filter" class="sr-only">Per Estació</label>
+                               <div id="filterByStation"></div>
+                       </div>
+                       <div class="col-sm-4">
+                               <label for="fullname_filter" class="sr-only">Per Exercici</label>
+                               <div id="filterByExercice"></div>
+                       </div>
+               </div>
        </div>
 
+
 </div>
 
 <div class="row" style="margin-top:20px">
diff --git a/chronojumpserver/templates/sprints.html b/chronojumpserver/templates/sprints.html
index 535542c..2d7f8a4 100644
--- a/chronojumpserver/templates/sprints.html
+++ b/chronojumpserver/templates/sprints.html
@@ -7,9 +7,11 @@
 
 
 {% block content %}
-<h2>Sprints</h2>
-<div class="row" style="margin-top: 15px;">
-       <div class="col-sm-3">
+<div class="page-header">
+       <h1>Sprints</h1>
+</div>
+<div id="resultsFilter" class="row pull-left">
+       <div class="col-sm-8">
                <label class="radio-inline dayfilter" style="margin-top:5px">
                  <input type="radio" name="filterByDayOptions" id="filterByDay1" value="1" >1d
                </label>
@@ -26,7 +28,7 @@
                  <input type="radio" name="filterByDayOptions" id="filterByDay5" value="all" checked>Tots
                </label>
        </div>
-       <div class="col-sm-3">
+       <div class="col-sm-4">
                <label for="player_filter" class="sr-only">Per Jugador</label>
                <div id="filterByPlayer"></div>
        </div>
diff --git a/chronojumpserver/templates/station_list.html b/chronojumpserver/templates/station_list.html
index 43bb66b..5184f94 100644
--- a/chronojumpserver/templates/station_list.html
+++ b/chronojumpserver/templates/station_list.html
@@ -5,7 +5,9 @@
 {% endblock %}
 
 {% block content %}
-<h2>Estacions i Exercicis</h2>
+<div class="page-header">
+    <h1>Estacions i Exercicis</h1>
+</div>
 <div class="row">
     <div class="col-sm-4">
         <div class="panel panel-default">


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]