Add link to admin page to flowcell & library pages for logged in staff
authorDiane Trout <diane@caltech.edu>
Wed, 7 Sep 2011 22:00:27 +0000 (15:00 -0700)
committerDiane Trout <diane@caltech.edu>
Wed, 7 Sep 2011 22:00:27 +0000 (15:00 -0700)
htsworkflow/frontend/static/css/app.css
htsworkflow/frontend/templates/experiments/flowcell_detail.html
htsworkflow/frontend/templates/experiments/flowcell_header.html [new file with mode: 0644]
htsworkflow/frontend/templates/experiments/flowcell_lane_detail.html
htsworkflow/frontend/templates/sample_header.html

index 0a86f8ab2645f7554e74a2354e8989b9818745eb..72a626c843e0b171b75a82bb92e08fb5b3ed204b 100644 (file)
     min-height:600px;
 }
 
+.icon_button {
+   border-style: solid;
+   border-width: 1px;
+   padding: 1px;
+   margin: 0px 0px -2px 2px;
+}
+
 div.msg {
     color: white;
     background: #880000;
@@ -134,8 +141,10 @@ div#librarydetail ol
 }
 
 div.library_identity { 
-  float: left; margin: 5px; }
+  clear: left; float: left; margin: 5px; }
 div.library_sample_detail { float: left; margin: 5px; }
 div.library_library_detail { float: left; margin: 5px; }
 div.library_statistics { clear: both; border: 1px; }
 
+div.flowcell_identity { clear: left; float: left; margin: 5px;}
+div.flowcell_lane_detail { float: left; margin: 5px; }
\ No newline at end of file
index 865fc97a05fd16725e1556df6e1747eb38fe686a..5ec9afe8a5944581a03a568b94ddc998b5abe60b 100644 (file)
 
 {% block content %}
 <div id="flowcell_detail">
-  <h2>About this Flowcell</h2>
-  <b>Flowcell</b>: 
-    <a href="{{flowcell.get_absolute_url}}" property="libns:flowcell_id">{{flowcell.flowcell_id}}</a><br/>
-  <b>Run Date</b>:
-    <span property="libns:date" content="{{flowcell.run_date|date:'Y-m-d\TH:i:s'}}" datatype="xsd:dateTime">{{ flowcell.run_date }}</span><br/>
-  <b>Type</b>: 
-    <span property="libns:flowcell_type">{{flowcell.flowcell_type}}</span><br/>
-  <b>Read Length</b>:
-    <span property="libns:read_length">{{flowcell.read_length}}</span><br/>
-  <b>Control Lane</b>:
-    <span property="libns:control_lane">{{flowcell.control_lane}}</span><br/>
-
-  <b>Notes</b>:
-    <pre property="libns:flowcell_notes">{{flowcell.notes}}</pre>
+  {% include "experiments/flowcell_header.html" %}
   <div class="htswdetail">
     <h2>Lanes</h2>
     <table>
diff --git a/htsworkflow/frontend/templates/experiments/flowcell_header.html b/htsworkflow/frontend/templates/experiments/flowcell_header.html
new file mode 100644 (file)
index 0000000..abca499
--- /dev/null
@@ -0,0 +1,16 @@
+  <div class="flowcell_identity">
+  <h2>About this Flowcell</h2>
+  <b>Flowcell</b>: 
+    <a href="{{flowcell.get_absolute_url}}" property="libns:flowcell_id">{{flowcell.flowcell_id}}</a>{% if user.is_staff %}<a href="{{flowcell.get_admin_url}}"><img class="icon_button" src="/media/img/admin/icon_changelink.gif" alt="Edit"/></a>{% endif%}<br/>
+  <b>Run Date</b>:
+    <span property="libns:date" content="{{flowcell.run_date|date:'Y-m-d\TH:i:s'}}" datatype="xsd:dateTime">{{ flowcell.run_date }}</span><br/>
+  <b>Type</b>: 
+    <span property="libns:flowcell_type">{{flowcell.flowcell_type}}</span><br/>
+  <b>Read Length</b>:
+    <span property="libns:read_length">{{flowcell.read_length}}</span><br/>
+  <b>Control Lane</b>:
+    <span property="libns:control_lane">{{flowcell.control_lane}}</span><br/>
+
+  <b>Notes</b>:
+    <pre property="libns:flowcell_notes">{{flowcell.notes}}</pre>
+  </div>
index bf9ee003711f12d386a227bc15cf070ed860a72f..19480edc3a8dbdd969626a2d7e326ac6b58295c4 100644 (file)
 
 {% block content %}
 <div id="lane_detail" class="htswdetail">
-  <h2>About this lane</h2>
   <div rel="libns:flowcell" resource="{{flowcell.get_absolute_url}}">
-  <b>Flowcell</b>: 
-    <a href="{{flowcell.get_absolute_url}}">{{flowcell.flowcell_id}}</a><br/>
-  <b>Run Date</b>:
-    <span property="libns:date" content="{{flowcell.run_date|date:'Y-m-d\TH:i:s'}}" datatype="xsd:dateTime">{{ flowcell.run_date }}</span><br/>
-  <b>Type</b>: 
-    <span property="libns:flowcell_type">{{flowcell.flowcell_type}}</span><br/>
-  </div>
+  {% include "experiments/flowcell_header.html" %}
+  <div class="flowcell_lane_detail">
+  <h2>About this lane</h2>
   <b>Lane</b>: 
     <span property="libns:lane_number" datatype="xsd:decimal">{{lane.lane_number}}</span><br/>
-  <b>Cycles</b>: 
-    <span property="libns:read_length">{{lane.flowcell.read_length}}</span><br/>
-  <b>pM</b>
+  <b>pM</b>:
     <span property="libns:pM" datatype="xsd:decimal">{{ lane.pM }}</span><br/>
-  <b>Cluster Estimate</b>
+  <b>Cluster Estimate</b>:
     <span property="libns:cluster_estimate" datatype="xsd:decimal"
           content="{{lane.cluster_estimate}}">{{ lane.cluster_estimate|intcomma }}</span><br/>
   <b>Lane Status</b>: 
     <span property="libns:status">{{ lane.status }}</span><br/>
-  <b>Comment</b>: 
+  <b>Comments</b>: 
     <span property="libns:comment">{{ lane.comment }}</span><br/>
+  </div>
   <hr/>
   {% include "sample_header.html" %}
   <hr/>
index f51e64950b6e85ed9880959df6ae7c44bfd3727a..c125a1ca4b44c11dd38650a38371a6f1ed04d0dc 100644 (file)
@@ -1,7 +1,10 @@
 <div id="librarydetail"  about="{{lib.get_absolute_url}}">
   <div class="library_identity">
     <h2>Library Name</h2>  
-    <b>Library ID</b>: <a href="{{lib.get_absolute_url}}"><span property="libns:library_id">{{ lib.id }}</span></a><br/>
+    <b>Library ID</b>: 
+       <a href="{{lib.get_absolute_url}}"><span property="libns:library_id">{{ lib.id }}</span></a>
+       {% if user.is_staff %}<a href="{{lib.get_admin_url}}"><img class="icon_button" src="/media/img/admin/icon_changelink.gif"/></a>{% endif %}
+       <br/>
     <b>Name</b>: 
       <span property="libns:name">{{ lib.library_name }}</span>
     <br/>