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')
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 }
<td>Species</td>
<td>Library Name</td>
<td>Total Lanes</td>
+ <td>HD</td>
</tr>
</thead>
<tbody>
<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>