From: Diane Trout Date: Sat, 7 Mar 2009 00:58:48 +0000 (+0000) Subject: Display the pM on the public library detail page. X-Git-Tag: 0.2.0.1~1 X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=b31f6ed6e6a21be072fe0c29bcf46b20fb23ae52 Display the pM on the public library detail page. Also I was getting tired of our ugly pages so I ripped large chunks of the django css and more of their templates to make our library index page look nicer. I started working on the public library detail page but that started involving too many alterations to the code for friday. --- diff --git a/htsworkflow/frontend/samples/views.py b/htsworkflow/frontend/samples/views.py index a6a996c..58bef91 100644 --- a/htsworkflow/frontend/samples/views.py +++ b/htsworkflow/frontend/samples/views.py @@ -1,4 +1,5 @@ # Create your views here. +from htsworkflow.frontend.experiments.models import FlowCell from htsworkflow.frontend.samples.changelist import ChangeList from htsworkflow.frontend.samples.models import Library from htsworkflow.frontend.samples.results import get_flowcell_result_dict, parse_flowcell_id @@ -43,11 +44,11 @@ def library(request): fcl = ChangeList(request, Library, list_filter=['library_species','affiliations'], search_fields=['library_id', 'library_name'], - list_per_page=25, + list_per_page=200, queryset=Library.objects.filter(hidden__exact=0) ) - context = { 'cl': fcl} + context = { 'cl': fcl, 'title': 'Library Index'} context.update(create_library_context(fcl)) t = get_template('samples/library_index.html') c = RequestContext(request, context) @@ -243,6 +244,12 @@ def _summary_stats(flowcell_id, lane_id): eland_summary.clusters = gerald_summary[end][lane_id].cluster eland_summary.cycle_width = cycle_width eland_summary.summarized_reads = runfolder.summarize_mapped_reads(eland_summary.mapped_reads) + + # grab some more information out of the flowcell db + flowcell = FlowCell.objects.get(flowcell_id=fc_id) + pm_field = 'lane_%d_pM' % (lane_id) + eland_summary.successful_pm = getattr(flowcell, pm_field) + summary_list.append(eland_summary) except Exception, e: diff --git a/htsworkflow/frontend/static/css/data-browse-index.css b/htsworkflow/frontend/static/css/data-browse-index.css new file mode 100644 index 0000000..59119bf --- /dev/null +++ b/htsworkflow/frontend/static/css/data-browse-index.css @@ -0,0 +1,2 @@ +@import url('changelists.css'); +@import url('click-table.css'); diff --git a/htsworkflow/frontend/templates/base.html b/htsworkflow/frontend/templates/base.html new file mode 100644 index 0000000..5899e59 --- /dev/null +++ b/htsworkflow/frontend/templates/base.html @@ -0,0 +1,56 @@ + + + +{% block title %}{% endblock %} + +{% if LANGUAGE_BIDI %}{% endif %} +{% block extrastyle %}{% endblock %} +{% block extrahead %}{% endblock %} +{% block blockbots %}{% endblock %} + +{% load i18n %} + + + + +
+ + {% if not is_popup %} + + + + {% block breadcrumbs %}{% endblock %} + {% endif %} + + {% if messages %} + + {% endif %} + + +
+ {% block pretitle %}{% endblock %} + {% block content_title %}{% if title %}

{{ title }}

{% endif %}{% endblock %} + {% block content %} + {% block object-tools %}{% endblock %} + {{ content }} + {% endblock %} + {% block sidebar %}{% endblock %} +
+
+ + + {% block footer %}{% endblock %} +
+ + + + diff --git a/htsworkflow/frontend/templates/base_site.html b/htsworkflow/frontend/templates/base_site.html new file mode 100644 index 0000000..3cf8738 --- /dev/null +++ b/htsworkflow/frontend/templates/base_site.html @@ -0,0 +1,10 @@ +{% extends "admin/base.html" %} +{% load i18n %} + +{% block title %}{{ sitename }}{% endblock %} + +{% block branding %} +

HTS Workflow

+{% endblock %} + +{% block nav-global %}{% endblock %} diff --git a/htsworkflow/frontend/templates/samples/library_detail.html b/htsworkflow/frontend/templates/samples/library_detail.html index 3533477..56c937f 100644 --- a/htsworkflow/frontend/templates/samples/library_detail.html +++ b/htsworkflow/frontend/templates/samples/library_detail.html @@ -30,7 +30,7 @@ - + @@ -42,6 +42,7 @@ + @@ -66,6 +67,7 @@ + diff --git a/htsworkflow/frontend/templates/samples/library_index.html b/htsworkflow/frontend/templates/samples/library_index.html index cb91b69..4263846 100644 --- a/htsworkflow/frontend/templates/samples/library_index.html +++ b/htsworkflow/frontend/templates/samples/library_index.html @@ -1,24 +1,29 @@ -{% load i18n %} -{% load admin_list %} +{% extends "base_site.html" %} +{% load adminmedia admin_list i18n %} - - +{% block stylesheet %}{{ MEDIA_URL }}css/data-browse-index.css{% endblock %} -
+{% block bodyclass %}change-list{% endblock %} +{% block coltype %}flex{% endblock %} + +{% block content %} +
+
{% block search %}{% search_form cl %}{% endblock %} - {% block pagination %}{% pagination cl %}{% endblock %} - - {% block filters %} - {% if cl.has_filters %} -
-

{% trans 'Filter' %}

- {% for spec in cl.filter_specs %} - {% admin_list_filter cl spec %} - {% endfor %} -
- {% endif %} - {% endblock %} + + {% block filters %} + {% if cl.has_filters %} +
+

{% trans 'Filter' %}

+ {% for spec in cl.filter_specs %} + {% admin_list_filter cl spec %} + {% endfor %} +
+ {% endif %} + {% endblock %} + + + {% block pagination %}{% pagination cl %}{% endblock %} {% block summary_stats %}
No Match QC Failed UniqueLane End Cluster / TilepM Raw Reads total %{{ lane.lane_id }} {% if lane.end %}{{ lane.end }}{% endif %} {{ lane.clusters.0|intcomma }}{{ lane.successful_pm }} {{ lane.reads|intcomma }} {{ lane.no_match|intcomma }} {{ lane.no_match_percent|stringformat:".2f" }}
@@ -43,3 +48,4 @@
{% endblock %} +{% endblock %} diff --git a/htsworkflow/frontend/templates/search_form.html b/htsworkflow/frontend/templates/search_form.html new file mode 100644 index 0000000..97ef8f1 --- /dev/null +++ b/htsworkflow/frontend/templates/search_form.html @@ -0,0 +1,18 @@ +{% load adminmedia %} +{% load i18n %} +{% if cl.search_fields %} +
+ +{% endif %}