projects
/
htsworkflow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2a32e43
)
Updated Library view to show an icon if a record exists showing that the library...
author
Brandon King
<kingb@caltech.edu>
Tue, 16 Jun 2009 22:54:43 +0000
(22:54 +0000)
committer
Brandon King
<kingb@caltech.edu>
Tue, 16 Jun 2009 22:54:43 +0000
(22:54 +0000)
htsworkflow/frontend/samples/models.py
patch
|
blob
|
history
htsworkflow/frontend/samples/views.py
patch
|
blob
|
history
htsworkflow/frontend/static/img/hdd_unmount.png
patch
|
blob
|
history
htsworkflow/frontend/templates/samples/library_index.html
patch
|
blob
|
history
diff --git
a/htsworkflow/frontend/samples/models.py
b/htsworkflow/frontend/samples/models.py
index 7199fbf8ea10eb547d56dd27a1955a127cc864b0..f51d250a8e862f7d562080adf0e0857f7f857e44 100644
(file)
--- a/
htsworkflow/frontend/samples/models.py
+++ b/
htsworkflow/frontend/samples/models.py
@@
-183,6
+183,15
@@
class Library(models.Model):
for t in affs:
ar.append(t.__unicode__())
return '%s' % (", ".join(ar))
for t in affs:
ar.append(t.__unicode__())
return '%s' % (", ".join(ar))
+
+ def is_archived(self):
+ """
+ returns True if archived else False
+ """
+ if self.longtermstorage_set.count() > 0:
+ return True
+ else:
+ return False
def libtags(self):
affs = self.tags.all().order_by('tag_name')
def libtags(self):
affs = self.tags.all().order_by('tag_name')
diff --git
a/htsworkflow/frontend/samples/views.py
b/htsworkflow/frontend/samples/views.py
index 4b6b3775f78c7546866d8121e5ac16224383a2c9..b8956d5b20342f6d24e6b802ac6e48a9601187cf 100644
(file)
--- a/
htsworkflow/frontend/samples/views.py
+++ b/
htsworkflow/frontend/samples/views.py
@@
-41,6
+41,7
@@
def create_library_context(cl):
lane = getattr(lib, 'lane_%d_library' % (lane_id,))
lanes_run += len( lane.all() )
summary['lanes_run'] = lanes_run
lane = getattr(lib, 'lane_%d_library' % (lane_id,))
lanes_run += len( lane.all() )
summary['lanes_run'] = lanes_run
+ summary['is_archived'] = lib.is_archived()
records.append(summary)
cl.result_count = unicode(cl.paginator._count) + u" libraries"
return {'library_list': records }
records.append(summary)
cl.result_count = unicode(cl.paginator._count) + u" libraries"
return {'library_list': records }
diff --git
a/htsworkflow/frontend/static/img/hdd_unmount.png
b/htsworkflow/frontend/static/img/hdd_unmount.png
index ea4f672ea5e0c53ccfb7a81cbae90a422a92d151..4972e55031ed426dd1b979b843cae7de985f4f8f 100755
(executable)
Binary files a/htsworkflow/frontend/static/img/hdd_unmount.png and b/htsworkflow/frontend/static/img/hdd_unmount.png differ
diff --git
a/htsworkflow/frontend/templates/samples/library_index.html
b/htsworkflow/frontend/templates/samples/library_index.html
index afae22b85ce1e5806c079ab6d270026f948d5671..c0a37e6a9438f4ce7a16becc87f86f6a44e979e4 100644
(file)
--- a/
htsworkflow/frontend/templates/samples/library_index.html
+++ b/
htsworkflow/frontend/templates/samples/library_index.html
@@
-34,6
+34,7
@@
<td>Species</td>
<td>Library Name</td>
<td>Total Lanes</td>
<td>Species</td>
<td>Library Name</td>
<td>Total Lanes</td>
+ <td>HD</td>
</tr>
</thead>
<tbody>
</tr>
</thead>
<tbody>
@@
-44,6
+45,11
@@
<td><a href="/library/{{ lib.library_id }}">{{ lib.species_name }}</a></td>
<td><a href="/library/{{ lib.library_id }}">{{ lib.library_name }}</a></td>
<td>{{ lib.lanes_run }}</td>
<td><a href="/library/{{ lib.library_id }}">{{ lib.species_name }}</a></td>
<td><a href="/library/{{ lib.library_id }}">{{ lib.library_name }}</a></td>
<td>{{ lib.lanes_run }}</td>
+ {% if lib.is_archived %}
+ <td><img src="/static/img/hdd_unmount.png" alt="Archived" /></td>
+ {% else %}
+ <td></td>
+ {% endif %}
</tr>
{% endfor %}
</tbody>
</tr>
{% endfor %}
</tbody>