Add links to the admin page on the public pages if you're logged in as staff.
authorDiane Trout <diane@caltech.edu>
Thu, 8 Sep 2011 22:12:50 +0000 (15:12 -0700)
committerDiane Trout <diane@caltech.edu>
Thu, 8 Sep 2011 22:12:50 +0000 (15:12 -0700)
This also required tightening the css for the list of flowcells on the
inventory page.

htsworkflow/frontend/static/css/app.css
htsworkflow/frontend/static/css/click-table.css
htsworkflow/frontend/templates/experiments/flowcell_detail.html
htsworkflow/frontend/templates/inventory/inventory_itemtype_index.html
htsworkflow/frontend/templates/samples/library_detail.html

index 72a626c843e0b171b75a82bb92e08fb5b3ed204b..1725e15eb3cd519d015ebe64a18bc5e11ac2d978 100644 (file)
@@ -40,6 +40,7 @@ div.msg {
 }
 
 div.htswdetail {
+    clear: both;
     margin: 0;
     padding: 0;
 }
@@ -80,7 +81,7 @@ div.htswdetail ol,
 div.htswdetail li
 {
   list-style: none;
-  margin: 0;   
+  margin: 0;
 }
 
 div.htswdetail ul,
@@ -89,7 +90,7 @@ div.htswdetail ol
   margin-bottom: .5em;
 }
 
-/* style library detail headers */ 
+/* style library detail headers */
 div#librarydetail {
   margin: 0;
   padding: 0;
@@ -131,7 +132,7 @@ div#librarydetail ol,
 div#librarydetail li
 {
   list-style: none;
-  margin: 0;   
+  margin: 0;
 }
 
 div#librarydetail ul,
@@ -140,7 +141,7 @@ div#librarydetail ol
   margin-bottom: .5em;
 }
 
-div.library_identity { 
+div.library_identity {
   clear: left; float: left; margin: 5px; }
 div.library_sample_detail { float: left; margin: 5px; }
 div.library_library_detail { float: left; margin: 5px; }
index 1d484127e281071cfbbac85b5401048aba5a39ad..27b793cb8666bbfdaefe0f180e1d1bc7a3c2bf1e 100644 (file)
@@ -14,6 +14,7 @@ td {
   padding: 4px;
   border-width: 1px 1px 0 0;
 }
-td a {
+td.cell_list a {
   display: block;
 }
+
index 5ec9afe8a5944581a03a568b94ddc998b5abe60b..a835a6e7d43a7f5f21dbd7bff234972da6e46a61 100644 (file)
@@ -4,7 +4,7 @@
     <!-- App Stuff -->
     <link type="text/css" rel="stylesheet" href="/static/css/app.css" />
     <script type="text/javascript" src="/static/js/jquery.min.js"></script>
-    
+
     {% block additional_javascript %}
     {% endblock %}
 {% endblock %}
       <tbody>
       {% for lane in lanes %}
         <tr rel="libns:has_lane" resource="{{lane.get_absolute_url}}" >
-          <td><a href="{{lane.get_absolute_url}}"> 
+          <td><a href="{{lane.get_absolute_url}}">
               <span property="libns:lane_number">{{lane.lane_number}}</span></a></td>
-          <td><a href="{{lane.library.get_absolute_url}}" 
+          <td><a href="{{lane.library.get_absolute_url}}"
                  rel="libns:library"><span property="libns:library_id"
-              >{{lane.library.id}}</span></a></td>
+              >{{lane.library.id}}</span></a>
+              {% if user.is_staff %}
+              <a href="{{lane.library.get_admin_url}}">
+                  <img class="icon_button"
+                       src="/media/img/admin/icon_changelink.gif"/>
+              </a>{% endif %}
+          </td>
           <td><a href="{{lane.library.get_absolute_url}}" rel="libns:library"><span property="libns:name">{{lane.library.library_name}}</span></a></td>
           <td><a href="{{lane.library.library_species.get_absolute_url}}" rel="libns:species">
               <span property="libns:species_name">{{ lane.library.library_species.scientific_name }}</span></a></td>
               </td>
             </tr>
             {% endif %}
-            {% endfor %} 
+            {% endfor %}
          </tbody>
        </table>
     {% endfor %}
     </div>
-</div>  
+</div>
 {% endblock %}
index d3a003855acc5ec97c8ab1b0b558b8735e701907..62ebdcef6ed7014eaaa3b8193b17242150797fdd 100644 (file)
@@ -20,7 +20,7 @@
 <div id="inventory-index-div" >
   <div class="module{% if cl.has_filters %} filtered{% endif %}" id="changelist">
     {% block search %}{% search_form item_changelist %}{% endblock %}
+
     {% block pagination %}{% pagination item_changelist %}{% endblock %}
 
     {% block filters %}
@@ -53,9 +53,9 @@
         <td ><a href="/inventory/{{ item.barcode_id }}/" rel="invns:barcode">{{ item.barcode_id }}</a></td>
         <td property="invns:location">{{ item.location }}</td>
         <td property="invns:item_type">{{ item.item_type }}</td>
-        <td ></td>      
-        <td property="invnfs:creation_date" content="{{item.creation_date|date:'Y-m-d\TH:i:s'}}" datatype="xsd:dateTime">{{ item.creation_date }}</td>      
-        <td style="a {display inline}">
+        <td ></td>
+        <td property="invnfs:creation_date" content="{{item.creation_date|date:'Y-m-d\TH:i:s'}}" datatype="xsd:dateTime">{{ item.creation_date }}</td>
+        <td class="cell_list" >
           {% for content in item.longtermstorage_set.all %}
           <a href="{{content.flowcell.get_absolute_url}}" rel="libns:flowcell_id">{{ content.flowcell }}</a>
           {% endfor %}
index 918dc4f3a5da04fe3a06eafd1b8a7d0db3475c42..771538c01cd1ca16414d37862351d9d8ebe9639c 100644 (file)
@@ -4,7 +4,7 @@
     <!-- App Stuff -->
     <link type="text/css" rel="stylesheet" href="/static/css/app.css" />
     <script type="text/javascript" src="/static/js/jquery.min.js"></script>
-    
+
     {% block additional_javascript %}
     {% endblock %}
 {% endblock %}
@@ -32,7 +32,7 @@
     <tr about="{{result.flowcell.get_absolute_url}}">
       <td property="libns:date" content="{{result.run_date|date:'Y-m-d\TH:i:s'}}" datatype="xsd:dateTime">{{ result.run_date|date}}</td>
       <td>{{ result.cycle }}</td>
-      <td><a href="{{result.flowcell.get_absolute_url}}"><span property="libns:flowcell_id">{{ result.flowcell_id }}</span></a></td>
+      <td><a href="{{result.flowcell.get_absolute_url}}"><span property="libns:flowcell_id">{{ result.flowcell_id }}</span></a>{% if user.is_staff %}<a href="{{result.flowcell.get_admin_url}}"><img class="icon_button" src="/media/img/admin/icon_changelink.gif" alt="Edit"/></a>{% endif%}</td>
       <td><a href="{{result.lane.get_absolute_url}}" rel="libns:has_lane"><span property="libns:lane_number" datatype="xsd:decimal">{{ result.lane.lane_number }}</span></a></td>
       <td><a href="{{ result.summary_url }}">Summary</a></td>
       <td><a href="{{ result.result_url }}">{{ result.result_label }}</a></td>
@@ -50,7 +50,7 @@
     {% endfor %}
   </tbody>
   </table>
-  
+
   <h2>Lane Summary Statistics</h2>
   {% block summary_stats %}
   <table>
       </tr>
     </thead>
     <tbody>
-  
+
       {# ls short for lane summary #}
       {% for ls in lane_summary_list %}
       <tr about="{{ls.lane.get_absolute_url}}">
         <td>{{ ls.cycle_width }}</td>
-        <td><a href="{{ls.flowcell.get_absolute_url}}">{{ ls.flowcell_id }}</a></td>
+        <td><a href="{{ls.flowcell.get_absolute_url}}">{{ ls.flowcell_id }}</a>
+        </td>
         <td><a href="{{ls.lane.get_absolute_url}}">{{ ls.lane_id }}</a></td>
         <td>{% if ls.end %}{{ ls.end }}{% endif %}</td>
         <td>{{ ls.clusters.0|intcomma }}</td>
       {% for lane in lib.lane_set.all %}
       <tr rel="libns:has_lane" resource="{{lane.get_absolute_url}}">
         <td><a href="{{lane.flowcell.get_absolute_url}}" rel="libns:flowcell"
-            ><span property="libns:flowcell_id">{{ lane.flowcell.flowcell_id }}</span></a></td>
-        <td><a href="{{lane.get_absolute_url}}"> 
+            ><span property="libns:flowcell_id">{{ lane.flowcell.flowcell_id }}</span></a>
+          {% if user.is_staff %}
+            <a href="{{lane.flowcell.get_admin_url}}">
+               <img class="icon_button"
+                    src="/media/img/admin/icon_changelink.gif" alt="Edit"/>
+            </a>
+          {% endif%}
+        </td>
+        <td><a href="{{lane.get_absolute_url}}">
             <span property="libns:lane_number"  datatype="xsd:decimal"
                >{{ lane.lane_number }}</span></a></td>
         <td>{{ lane.comment }}</td>
   <h2>Count of multi-reads</h2>
   {% for eland_lane in lane_summary_list %}
     {% if eland_lane.summarized_reads %}
-    <h3>{{eland_lane.cycle_width}} {{ eland_lane.flowcell_id }} lane {{ eland_lane.lane_id }} 
+    <h3>{{eland_lane.cycle_width}} {{ eland_lane.flowcell_id }} lane {{ eland_lane.lane_id }}
       {% if eland_lane.end %} end {{ eland_lane.end }}{% endif %}
     </h3>
     <ul about="{{eland_lane.lane.get_absolute_url}}">
       {% for name, counts in eland_lane.summarized_reads.items %}
       <li rel="libns:has_mappings">
-         <b property="libns:mapped_to">{{ name }}</b>: 
+         <b property="libns:mapped_to">{{ name }}</b>:
          <span property="libns:reads" content="{{counts}}" datatype="xsd:integer">{{ counts|intcomma }}</span></li>
       {% endfor %}
     </ul>