# 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
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)
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:
--- /dev/null
+@import url('changelists.css');
+@import url('click-table.css');
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE }}" xml:lang="{{ LANGUAGE_CODE }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
+<head>
+<title>{% block title %}{% endblock %}</title>
+<link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/base.css{% endblock %}" />
+{% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% admin_media_prefix %}css/rtl.css{% endblock %}" />{% endif %}
+{% block extrastyle %}{% endblock %}
+{% block extrahead %}{% endblock %}
+{% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %}
+</head>
+{% load i18n %}
+
+<body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}">
+
+<!-- Container -->
+<div id="container">
+
+ {% if not is_popup %}
+ <!-- Header -->
+ <div id="header">
+ <div id="branding">
+ {% block branding %}{% endblock %}
+ </div>
+ {% if user.is_authenticated and user.is_staff %}
+ <div id="user-tools">{% trans 'Welcome,' %} <strong>{% firstof user.first_name user.username %}</strong>. {% block userlinks %}{% url django-admindocs-docroot as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / {% endif %}<a href="{{ root_path }}password_change/">{% trans 'Change password' %}</a> / <a href="{{ root_path }}logout/">{% trans 'Log out' %}</a>{% endblock %}
+ </div>
+ {% endif %}
+ {% block nav-global %}{% endblock %}
+ </div>
+ <!-- END Header -->
+ {% block breadcrumbs %}<div class="breadcrumbs"><a href="/">{% trans 'Home' %}</a>{% if title %} › {{ title }}{% endif %}</div>{% endblock %}
+ {% endif %}
+
+ {% if messages %}
+ <ul class="messagelist">{% for message in messages %}<li>{{ message }}</li>{% endfor %}</ul>
+ {% endif %}
+
+ <!-- Content -->
+ <div id="content" class="{% block coltype %}colM{% endblock %}">
+ {% block pretitle %}{% endblock %}
+ {% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
+ {% block content %}
+ {% block object-tools %}{% endblock %}
+ {{ content }}
+ {% endblock %}
+ {% block sidebar %}{% endblock %}
+ <br class="clear" />
+ </div>
+ <!-- END Content -->
+
+ {% block footer %}<div id="footer"></div>{% endblock %}
+</div>
+<!-- END Container -->
+
+</body>
+</html>
--- /dev/null
+{% extends "admin/base.html" %}
+{% load i18n %}
+
+{% block title %}{{ sitename }}{% endblock %}
+
+{% block branding %}
+<h1 id="site-name">HTS Workflow</h1>
+{% endblock %}
+
+{% block nav-global %}{% endblock %}
<table>
<thead>
<tr>
- <td colspan="6"></td>
+ <td colspan="7"></td>
<td colspan="2">No Match</td>
<td colspan="2">QC Failed</td>
<td colspan="4">Unique</td>
<td>Lane</td>
<td>End</td>
<td>Cluster / Tile</td>
+ <td>pM</td>
<td>Raw Reads</td>
<td>total</td>
<td>%</td>
<td>{{ lane.lane_id }}</td>
<td>{% if lane.end %}{{ lane.end }}{% endif %}</td>
<td>{{ lane.clusters.0|intcomma }}</td>
+ <td>{{ lane.successful_pm }}</td>
<td>{{ lane.reads|intcomma }}</td>
<td>{{ lane.no_match|intcomma }}</td>
<td>{{ lane.no_match_percent|stringformat:".2f" }}</td>
-{% load i18n %}
-{% load admin_list %}
+{% extends "base_site.html" %}
+{% load adminmedia admin_list i18n %}
-<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL}}css/changelists.css" />
-<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL}}css/click-table.css" />
+{% block stylesheet %}{{ MEDIA_URL }}css/data-browse-index.css{% endblock %}
-<div id="content" class="flex>
- <form action="" method="get">
+{% block bodyclass %}change-list{% endblock %}
+{% block coltype %}flex{% endblock %}
+
+{% block content %}
+<div id="content-main">
+ <div class="module{% if cl.has_filters %} filtered{% endif %}" id="changelist">
{% block search %}{% search_form cl %}{% endblock %}
- {% block pagination %}{% pagination cl %}{% endblock %}
- </form>
- {% block filters %}
- {% if cl.has_filters %}
- <div id="changelist-filter">
- <h2>{% trans 'Filter' %}</h2>
- {% for spec in cl.filter_specs %}
- {% admin_list_filter cl spec %}
- {% endfor %}
- </div>
- {% endif %}
- {% endblock %}
+
+ {% block filters %}
+ {% if cl.has_filters %}
+ <div id="changelist-filter">
+ <h2>{% trans 'Filter' %}</h2>
+ {% for spec in cl.filter_specs %}
+ {% admin_list_filter cl spec %}
+ {% endfor %}
+ </div>
+ {% endif %}
+ {% endblock %}
+
+
+ {% block pagination %}{% pagination cl %}{% endblock %}
{% block summary_stats %}
<table>
</table>
</div>
{% endblock %}
+{% endblock %}
--- /dev/null
+{% load adminmedia %}
+{% load i18n %}
+{% if cl.search_fields %}
+<div id="toolbar"><form id="changelist-search" action="" method="get">
+<div><!-- DIV needed for valid HTML -->
+<label for="searchbar"><img src="{% admin_media_prefix %}img/admin/icon_searchbox.png" alt="Search" /></label>
+<input type="text" size="40" name="{{ search_var }}" value="{{ cl.query }}" id="searchbar" />
+<input type="submit" value="{% trans 'Go' %}" />
+{% if show_result_count %}
+ <span class="small quiet">{% blocktrans count cl.result_count as counter %}1 result{% plural %}{{ counter }} results{% endblocktrans %} (<a href="?{% if cl.is_popup %}pop=1{% endif %}">{% blocktrans with cl.full_result_count as full_result_count %}{{ full_result_count }} total{% endblocktrans %}</a>)</span>
+{% endif %}
+{% for pair in cl.params.items %}
+ {% ifnotequal pair.0 search_var %}<input type="hidden" name="{{ pair.0 }}" value="{{ pair.1 }}"/>{% endifnotequal %}
+{% endfor %}
+</div>
+</form></div>
+<script type="text/javascript">document.getElementById("searchbar").focus();</script>
+{% endif %}