]> git.parisson.com Git - telemeta.git/commitdiff
update form style
authorGuillaume Pellerin <yomguy@parisson.com>
Wed, 24 Sep 2014 14:17:40 +0000 (16:17 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Wed, 24 Sep 2014 14:17:40 +0000 (16:17 +0200)
telemeta/models/media.py
telemeta/static/telemeta/css/telemeta.css
telemeta/static/telemeta/images/.directory [deleted file]
telemeta/templates/telemeta/base.html
telemeta/templates/telemeta/collection_detail.html
telemeta/templates/telemeta/collection_edit.html
telemeta/templates/telemeta/collection_list.html
telemeta/templates/telemeta/resource_edit.html
telemeta/views/home.py

index dd67711a5bb879a7e6ed6a059b0b11899cae0dfd..e4dd3764ee23380e4eea9bad84bcdb77acc8b701 100644 (file)
@@ -786,7 +786,7 @@ class MediaCorpus(MediaBaseResource):
     @property
     def public_id(self):
         return self.code
-    
+
     @property
     def has_mediafile(self):
         for child in self.children.all():
index 647883f835e895638ae1db9d45294cbc82f5a0d7..2a3869f6e1a50b20cf207663a536cc06d0d73308 100644 (file)
@@ -114,10 +114,10 @@ a img { border: none; }
 }
 
 #content h3 {
-    color: #6a0307;
+    color: white;
     font-weight: bold;
     display:  inline;
-    font-size: 1.2em;
+    font-size: 1.1em;
 }
 
 
@@ -322,25 +322,24 @@ label.disabled { color: #d7d7d7 }
     top: 1.2em;
     left: 35%;
     background-color: #6a0307;
-    padding: 0.3em 0em 0.3em 0.3em;
+    padding: 0.3em;
     -moz-border-radius: 8px 8px 8px 8px;
     -webkit-border-radius: 8px 8px 8px 8px;
     border-radius: 8px 8px 8px 8px;
+    width: 270px;
 }
 
 #quick_search form {
     float: left;
-    margin-right: 12px;
 }
 
-
 #quick_search input {
     vertical-align: middle;
     font-size: .9em;
-    margin-right: 0.5em;
-    -moz-border-radius: 5px 5px 5px 5px;
-    -webkit-border-radius: 5px 5px 5px 5px;
-    border-radius: 5px 5px 5px 5px;
+    -moz-border-radius: 5px 0px 0px 5px;
+    -webkit-border-radius: 5px 0px 0px 5px;
+    border-radius: 5px 0px 0px 5px;
+    width: 215px;
 }
 
 #quick_search_pattern {
@@ -352,16 +351,13 @@ label.disabled { color: #d7d7d7 }
     float: left;
 }
 
-#quick-search-button{
-    float: right;
-}
 
 /* Authentication */
 #auth_info {
     color: #FFF;
     font-weight: bold;
     position: absolute;
-    top: 1.5em;
+    top: 1.2em;
     right: 1.1em;
     margin-right: 1em;
     font-size: 0.9em;
@@ -1308,3 +1304,12 @@ a:focus,div:focus{
     float: left;
 }
 
+.block-grey {
+    background-color: #f1f1f1;
+    padding: 1em;
+    margin-bottom: 1em;
+    -moz-border-radius: 8px 0px 8px 8px;
+    -webkit-border-radius: 8px 0px 8px 8px;
+    border-radius: 8px 0px 8px 8px;
+}
+
diff --git a/telemeta/static/telemeta/images/.directory b/telemeta/static/telemeta/images/.directory
deleted file mode 100644 (file)
index eaebf3d..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-[Dolphin]
-ShowPreview=true
-SortOrder=0
-Sorting=0
-Timestamp=2012,4,13,18,2,6
-ViewMode=0
index 2238cbcfc9c8970323f2f5ddc2b0ae1703960311..e8bb9628a68a4a5052f8355f19373f87e9ff9f98 100644 (file)
@@ -35,7 +35,6 @@
 <script src="{{ STATIC_URL }}telemeta/js/application.js" type="text/javascript"></script>
 <script src="{{ STATIC_URL }}telemeta/lib/bootstrap/dist/js/bootstrap.min.js" type="text/javascript"></script>
 
-
 {% if user.is_authenticated %}
 <script type='text/javascript'>var CURRENT_USER_NAME="{{ user.username }}";</script>
 {% else %}
 
 <div id="quick_search">
 <form action="{% url "telemeta-search" %}" id="_quickSearchForm" method="get">
-<div class="row">
- <div class="col-md-6">
-  <input type="text" id="quick_search_pattern" name="pattern" />
- </div>
-  <div class="col-md-6"><a href="#" id="quick-search-button" class="component button" onclick="document.getElementById('_quickSearchForm').submit();">{% trans "Search" %}</a></div>
+
+    <div class="input-group">
+      <input type="text" class="form-control">
+      <span class="input-group-btn">
+        <button class="btn btn-default" type="button" onclick="document.getElementById('_quickSearchForm').submit();"><span class="glyphicon glyphicon-search"></span></button>
+      </span>
+    </div><!-- /input-group -->
+
 </form>
-</div>
+
 </div>
 
 <div id="menu">
index 0f9b3726325b6c4962878bbe7d961f20ae7e1f4e..38739d8621b263670c4faaeaab7d9f3551ca5b3a 100644 (file)
 </script>
 {% endblock %}
 
-{% if collection %}
+{% if object %}
 
 {% block title %}
     <img src="{{ STATIC_URL }}telemeta/images/collections_red.png" style="vertical-align:middle" />
-    Collection :
-    <a href="{% url "telemeta-collection-detail" collection.public_id %}">{{ collection.title }}</a>
+    Collection : {{ object.title }}
 {% endblock %}
 
 {% block title_buttons %}
                         {% else %}
                         {% dl_field collection "collector" %}
                         {% endif %}
+                        {% if collection.publisher %}
                         {% dl_field collection "publisher" %}
+                        {% endif %}
                         {% dl_field collection "publisher_collection" %}
                         {% dl_field collection "publisher_serial" %}
                         {% dl_field collection "booklet_author" %}
                         <dt>{% trans "Bibliographic references" %}</dt>
                         <dd>{{ collection.external_references|html_line_break|safe }}</dd>
-                        {% if collection.doctype_code %}
-                         {% dl_field collection "doctype_code" %}
-                        {% endif %}
                         {% dl_field collection "public_access_label" %}
                         {% dl_field collection "legal_rights" %}
                     </dl>
index 147e496090008bf4250865f1a98287552e1b8a68..6bf2324018f3664464b1f90e6ee2437541e7e4c5 100644 (file)
@@ -4,7 +4,7 @@
 {% load bootstrap3 %}
 
 {% block title %}
-    <img src="{{ STATIC_URL }}telemeta/images/collections_red.png" style="vertical-align:middle" /> Collection : {{ collection }}
+    <img src="{{ STATIC_URL }}telemeta/images/collections_red.png" style="vertical-align:middle" /> Collection : {{ object.title }}
 {% endblock %}
 
 {% block title_buttons %}
         <script type="text/javascript" src="/static/admin/js/jquery.min.js"></script>
         <script type="text/javascript" src="/static/admin/js/jquery.init.js"></script>
         <script type="text/javascript" src="/static/admin/js/actions.min.js"></script>
-
         {{ form.media }}
-        {% bootstrap_form form %}
+        <div class="block-grey">
+          {% bootstrap_form form %}
+        </div>
       </div>
 
       <div class="tab-pane" id="related">
         {% for formset in inlines %}
           {{ formset.management_form }}
           {% for form in formset %}
-           <hr />
-           {% bootstrap_form form %}
+           <div class="block-grey">
+             {% bootstrap_form form %}
+          </div>
           {# {{ form.as_table }} #}
           {% endfor %}
         {% endfor %}
index a50e1689545934e419d116685ddb9f7d1c73f06d..6235f5ea2a88fd174cd7d2fd0b080ad123899d0d 100644 (file)
@@ -42,4 +42,5 @@
 {% with object_list as collections %}
 {% include "telemeta/inc/collection_list.html" %}
 {% endwith %}
+</div>
 {% endblock %}
index 8e202ed903358d0f38a6b5a15dbc982e8b713a61..152494045844225f5c1d0194c69916810cf7571f 100644 (file)
@@ -3,8 +3,6 @@
 {% load telemeta_utils %}
 {% load bootstrap3 %}
 
-
-
 {% block title %}
 <img src="{{ STATIC_URL }}telemeta/images/{{ type }}.png" style="vertical-align:middle" /> {{ type }} : {{ resource }}
 {% endblock %}
     </div>
 
 
-  <div align="center" style="margin-top:3ex;">
-         <a href="{% url "telemeta-resource-detail" type resource.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
-         {% if perms.telemeta.change_mediacorpus or perms.telemeta.change_mediafonds %}
-          <input type="submit" value="Enregistrer" class="default" name="_save"/>
-         {% endif %}
-         {# <a href="#" class="component_icon button icon_save" id="submit_button">{% trans "Save" %}</a> #}
-  </div>
+    <div align="center" style="margin-top:3ex;">
+           <a href="{% url "telemeta-resource-detail" type resource.public_id %}" class="component_icon button icon_cancel">{% trans "Cancel" %}</a>
+           {% if perms.telemeta.change_mediacorpus or perms.telemeta.change_mediafonds %}
+            <input type="submit" value="Enregistrer" class="default" name="_save"/>
+           {% endif %}
+           {# <a href="#" class="component_icon button icon_save" id="submit_button">{% trans "Save" %}</a> #}
+    </div>
 
    </form>
   </div>
 
-
 {% endblock infos %}
 
 
index b8b6a1d7d063d0509ea7549a397725958f6cff8c..e427217ab6448ae35b1f7ec14733ac9b060bead6 100644 (file)
@@ -277,3 +277,4 @@ class HomeView(object):
     def users(self, request):
         users = User.objects.all().order_by('last_name')
         return render(request, 'telemeta/users.html', {'users': users})
+