From b2dc521a8e5a4e85525b8e4210de9a39e0ab7264 Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Thu, 4 Aug 2011 12:59:07 -0700 Subject: [PATCH] Add a way to browse the list of entered antibody/antigene --- htsworkflow/frontend/samples/urls.py | 1 + htsworkflow/frontend/samples/views.py | 8 +++- .../templates/samples/antibody_index.html | 44 +++++++++++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 htsworkflow/frontend/templates/samples/antibody_index.html diff --git a/htsworkflow/frontend/samples/urls.py b/htsworkflow/frontend/samples/urls.py index eb3fa46..fea937c 100644 --- a/htsworkflow/frontend/samples/urls.py +++ b/htsworkflow/frontend/samples/urls.py @@ -4,4 +4,5 @@ urlpatterns = patterns('', (r"^library/(?P\w+)/json", 'htsworkflow.frontend.samples.views.library_json'), (r"^species/(?P\w+)/json", 'htsworkflow.frontend.samples.views.species_json'), (r"^species/(?P\w+)", 'htsworkflow.frontend.samples.views.species'), + (r"^antibody/$", 'htsworkflow.frontend.samples.views.antibodies'), ) diff --git a/htsworkflow/frontend/samples/views.py b/htsworkflow/frontend/samples/views.py index 95270d8..12bb792 100644 --- a/htsworkflow/frontend/samples/views.py +++ b/htsworkflow/frontend/samples/views.py @@ -12,7 +12,7 @@ except ImportError, e: from htsworkflow.frontend.auth import require_api_key from htsworkflow.frontend.experiments.models import FlowCell, Lane, LANE_STATUS_MAP from htsworkflow.frontend.samples.changelist import ChangeList -from htsworkflow.frontend.samples.models import Library, Species, HTSUser +from htsworkflow.frontend.samples.models import Antibody, Library, Species, HTSUser from htsworkflow.frontend.samples.results import get_flowcell_result_dict from htsworkflow.frontend.bcmagic.forms import BarcodeMagicForm from htsworkflow.pipelines.runfolder import load_pipeline_run_xml @@ -518,6 +518,11 @@ def species(request, species_id): return render_to_response("samples/species_detail.html", context) +def antibodies(request): + context = RequestContext(request, + {'antibodies': Antibody.objects.order_by('antigene')}) + return render_to_response("samples/antibody_index.html", context) + @login_required def user_profile(request): """ @@ -533,3 +538,4 @@ def user_profile(request): return render_to_response('registration/profile.html', context, context_instance=RequestContext(request)) + diff --git a/htsworkflow/frontend/templates/samples/antibody_index.html b/htsworkflow/frontend/templates/samples/antibody_index.html new file mode 100644 index 0000000..9d2982c --- /dev/null +++ b/htsworkflow/frontend/templates/samples/antibody_index.html @@ -0,0 +1,44 @@ +{% extends "base_site.html" %} +{% load adminmedia admin_list i18n %} + +{% block bodyclass %}change-list{% endblock %} +{% block coltype %}flex{% endblock %} + +{% block content %} +
+{% block body %} + + + + + + + + + + + + {% for antibody in antibodies %} + + + + + + + + {% endfor %} + +
AntigeneNicknameAntibodiesCatalogSource
+ {{ antibody.antigene }} + + {{ antibody.nickname }} + + {{ antibody.antibodies }} + + {{ antibody.catalog }} + + {{ antibody.source }} +
+
+{% endblock %} +{% endblock %} -- 2.30.2