lanes.
cl.result_count = unicode(cl.paginator._count)
return {'library_list': records }
-def library(request):
+def library(request, todo_only=False):
+ queryset = Library.objects.filter(hidden__exact=0)
+ if todo_only:
+ queryset = queryset.filter(lane=None)
# build changelist
fcl = ChangeList(request, Library,
list_filter=['affiliations', 'library_species'],
search_fields=['id', 'library_name', 'amplified_from_sample__id'],
list_per_page=200,
- queryset=Library.objects.filter(hidden__exact=0)
+ queryset=queryset
)
- context = { 'cl': fcl, 'title': 'Library Index'}
+ context = { 'cl': fcl, 'title': 'Library Index', 'todo_only': todo_only}
context.update(create_library_context(fcl))
t = get_template('samples/library_index.html')
c = RequestContext(request, context)
return HttpResponse( t.render(c) )
+def library_todo(request):
+ return library(request, todo_only=True)
def library_to_flowcells(request, lib_id):
"""
{% block extrahead %}
<!-- App Stuff -->
<link type="text/css" rel="stylesheet" href="/static/css/app.css" />
-
- {% block additional_javascript %}
+
+ {% block additional_javascript %}
<script type="text/javascript" src="/static/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/js/htsw.js"></script>
<script type="text/javascript">
{% block coltype %}flex{% endblock %}
{% block content %}
+<div id="library_header_link">
+{% if todo_only %}<a href="..">All</a>{% else %}<a href="todo/">Todo</a>
+{% endif %}
+</div>
<div id="library-index-div" >
<div class="module{% if cl.has_filters %} filtered{% endif %}" id="changelist">
{% block search %}{% search_form cl %}{% endblock %}
-
+
{% block pagination %}{% pagination cl %}{% endblock %}
{% block filters %}
<td ><a href="{{lib.library.get_absolute_url}}"><span property="libns:library_id">{{ lib.library_id }}</span></a></td>
<td ><a href="{{lib.library.library_species.get_absolute_url}}" rel="libns:species"><span property="libns:species_name">{{ lib.species_name }}</span></a></td>
<td ><a href="{{ lib.library.get_absolute_url }}"><span property="libns:library_name">{{ lib.library_name }}</span></a></td>
- <td bgcolor="#00BFFF">{{ lib.lanes_run.0.0 }}</td>
- <td bgcolor="#00BFFF">{{ lib.lanes_run.0.1 }}</td>
- <td bgcolor="#00BFFF">{{ lib.lanes_run.0.2 }}</td>
+ <td bgcolor="#00BFFF">{{ lib.lanes_run.0.0 }}</td>
+ <td bgcolor="#00BFFF">{{ lib.lanes_run.0.1 }}</td>
+ <td bgcolor="#00BFFF">{{ lib.lanes_run.0.2 }}</td>
<td bgcolor="#66CDAA">{{ lib.lanes_run.1.0 }}</td>
- <td bgcolor="#66CDAA">{{ lib.lanes_run.1.1 }}</td>
- <td bgcolor="#66CDAA">{{ lib.lanes_run.1.2 }}</td>
+ <td bgcolor="#66CDAA">{{ lib.lanes_run.1.1 }}</td>
+ <td bgcolor="#66CDAA">{{ lib.lanes_run.1.2 }}</td>
{% if lib.is_archived %}
<td ><img src="/static/img/hdd_unmount.png" alt="Archived" /></td>
{% else %}
(r'^reports/', include('htsworkflow.frontend.reports.urls')),
# Library browser
(r'^library/$', 'htsworkflow.frontend.samples.views.library'),
+ (r'^library/todo/$',
+ 'htsworkflow.frontend.samples.views.library_todo'),
(r'^library/(?P<lib_id>\w+)/$',
'htsworkflow.frontend.samples.views.library_to_flowcells'),
(r'^lanes_for/$', 'htsworkflow.frontend.samples.views.lanes_for'),