PageRenderTime 23ms CodeModel.GetById 18ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/templates/admin/request_type/view_request_type.mako

https://bitbucket.org/cistrome/cistrome-harvard/
Mako | 83 lines | 78 code | 5 blank | 0 comment | 3 complexity | 15b08e435003275c749013f99603765a MD5 | raw file
 1<%inherit file="/base.mako"/>
 2<%namespace file="/message.mako" import="render_msg" />
 3<%namespace file="/common/template_common.mako" import="render_template_fields" />
 4
 5<% form_type = trans.model.FormDefinition.types.RUN_DETAILS_TEMPLATE %>
 6
 7<br/><br/>
 8<ul class="manage-table-actions">
 9    <li><a class="action-button" id="request_type-${request_type.id}-popup" class="menubutton">Request type actions</a></li>
10    <div popupmenu="request_type-${request_type.id}-popup">
11        %if not request_type.deleted:
12            <li><a class="action-button" href="${h.url_for( controller='request_type', action='view_editable_request_type', id=trans.security.encode_id( request_type.id ) )}">Edit request type</a></li>
13            <li><a class="action-button" href="${h.url_for( controller='request_type', action='request_type_permissions', id=trans.security.encode_id( request_type.id ) )}">Edit permissions</a></li>
14            <li><a class="action-button" href="${h.url_for( controller='request_type', action='delete_request_type', id=trans.security.encode_id( request_type.id ) )}">Delete request type</a></li>
15            %if not request_type.run_details:
16                <a class="action-button" href="${h.url_for( controller='request_type', action='add_template', cntrller='requests_admin', item_type='request_type', form_type=form_type, request_type_id=trans.security.encode_id( request_type.id ) )}">Use run details template</a>
17            %elif request_type.run_details:
18                <a class="action-button" href="${h.url_for( controller='request_type', action='edit_template', cntrller='requests_admin', item_type='request_type', form_type=form_type, request_type_id=trans.security.encode_id( request_type.id ) )}">Edit run details template</a>
19                <a class="action-button" href="${h.url_for( controller='request_type', action='delete_template', cntrller='requests_admin', item_type='request_type', form_type=form_type, request_type_id=trans.security.encode_id( request_type.id ) )}">Unuse run details template</a>
20            %endif
21        %endif
22        %if request_type.deleted:
23            <li><a class="action-button" href="${h.url_for( controller='request_type', action='undelete_request_type', id=trans.security.encode_id( request_type.id ) )}">Undelete request type</a></li>
24        %endif
25    </div>
26</ul>
27
28%if message:
29    ${render_msg( message, status )}
30%endif
31
32<div class="toolForm">
33    <div class="toolFormTitle">"${request_type.name}" request type</div>
34    <div class="form-row">
35        <label>Name:</label>
36        ${request_type.name}
37        <div style="clear: both"></div>
38    </div>
39    <div class="form-row">
40        <label>Description:</label>
41        ${request_type.desc}
42        <div style="clear: both"></div>
43    </div>
44    <div class="form-row">
45        <label>Sequencing request form definition:</label>
46        <a href="${h.url_for( controller='request_type', action='view_form_definition', id=trans.security.encode_id( request_type.request_form_id ) )}">${request_type.request_form.name}</a>
47    </div>       
48    <div class="form-row">
49        <label>Sample form definition:</label>
50        <a href="${h.url_for( controller='request_type', action='view_form_definition', id=trans.security.encode_id( request_type.sample_form_id ) )}">${request_type.sample_form.name}</a>
51    </div>
52</div>
53<p/>
54<div class="toolForm">
55    <div class="toolFormTitle">Sample states defined for this request type</div>
56    %for state in request_type.states:
57        <div class="form-row">
58            <label>${state.name}</label>
59            ${state.desc}
60        </div>
61        <div style="clear: both"></div>
62    %endfor
63</div>
64<p/>
65<div class="toolForm">
66    <div class="toolFormTitle">External services</div>
67    %if request_type.external_services:
68        %for index, external_service in enumerate( request_type.external_services ):
69            <div class="form-row">
70                <label><a href="${h.url_for( controller='external_service', action='view_external_service', id=trans.security.encode_id( external_service.id ) )}">${external_service.name}</a></label> 
71                ${external_service.get_external_service_type( trans ).name}
72            </div>
73        %endfor
74    %else:
75        <div class="form-row">
76            External service login information is not set.  Select the <b>Edit request type</b> option in the <b>Request type actions</b> menu.
77        </div>
78    %endif
79</div>
80
81%if widgets:
82    ${render_template_fields( cntrller='requests_admin', item_type='request_type', widgets=widgets, widget_fields_have_contents=widget_fields_have_contents, request_type_id=trans.security.encode_id( request_type.id ), editable=False )}
83%endif