PageRenderTime 15ms CodeModel.GetById 12ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/templates/webapps/community/repository/preview_tools_in_changeset.mako

https://bitbucket.org/cistrome/cistrome-harvard/
Mako | 101 lines | 94 code | 7 blank | 0 comment | 7 complexity | f5591d5cac0ccc8e336c6a29a9480f36 MD5 | raw file
  1<%inherit file="/base.mako"/>
  2<%namespace file="/message.mako" import="render_msg" />
  3<%namespace file="/webapps/community/common/common.mako" import="*" />
  4<%namespace file="/webapps/community/repository/common.mako" import="*" />
  5
  6<%
  7    is_new = repository.is_new
  8    can_contact_owner = trans.user and trans.user != repository.user
  9    can_push = trans.app.security_agent.can_push( trans.user, repository )
 10    can_rate = not is_new and trans.user and repository.user != trans.user
 11    can_upload = can_push
 12    can_download = not is_new and ( not is_malicious or can_push )
 13    can_browse_contents = not is_new
 14    can_view_change_log = not is_new
 15    if can_push:
 16        browse_label = 'Browse or delete repository files'
 17    else:
 18        browse_label = 'Browse repository files'
 19%>
 20
 21<%!
 22   def inherit(context):
 23       if context.get('use_panels'):
 24           return '/webapps/community/base_panels.mako'
 25       else:
 26           return '/base.mako'
 27%>
 28<%inherit file="${inherit(context)}"/>
 29
 30<%def name="stylesheets()">
 31    ${parent.stylesheets()}
 32    ${h.css( "jquery.rating" )}
 33    <style type="text/css">
 34    ul.fileBrowser,
 35    ul.toolFile {
 36        margin-left: 0;
 37        padding-left: 0;
 38        list-style: none;
 39    }
 40    ul.fileBrowser {
 41        margin-left: 20px;
 42    }
 43    .fileBrowser li,
 44    .toolFile li {
 45        padding-left: 20px;
 46        background-repeat: no-repeat;
 47        background-position: 0;
 48        min-height: 20px;
 49    }
 50    .toolFile li {
 51        background-image: url( ${h.url_for( '/static/images/silk/page_white_compressed.png' )} );
 52    }
 53    .fileBrowser li {
 54        background-image: url( ${h.url_for( '/static/images/silk/page_white.png' )} );
 55    }
 56    </style>
 57</%def>
 58
 59<%def name="javascripts()">
 60    ${parent.javascripts()}
 61    ${h.js( "jquery.rating" )}
 62    ${common_javascripts(repository)}
 63</%def>
 64
 65<br/><br/>
 66<ul class="manage-table-actions">
 67    <a class="action-button" href="${h.url_for( controller='repository', action='install_repository_revision', repository_id=trans.security.encode_id( repository.id ), webapp='community', changeset_revision=changeset_revision )}">Install to local Galaxy</a>
 68</ul>
 69
 70%if message:
 71    ${render_msg( message, status )}
 72%endif
 73
 74<div class="toolForm">
 75    <div class="toolFormTitle">Repository ${repository.name}</div>
 76    <div class="toolFormBody">
 77        %if len( changeset_revision_select_field.options ) > 1:
 78            <form name="change_revision" id="change_revision" action="${h.url_for( controller='repository', action='preview_tools_in_changeset', repository_id=trans.security.encode_id( repository.id ) )}" method="post" >
 79                <div class="form-row">
 80                    <%
 81                        if changeset_revision == repository.tip:
 82                            tip_str = 'repository tip'
 83                        else:
 84                            tip_str = ''
 85                    %>
 86                    ${changeset_revision_select_field.get_html()} <i>${tip_str}</i>
 87                    <div class="toolParamHelp" style="clear: both;">
 88                        Select a revision to inspect and download versions of tools from this repository.
 89                    </div>
 90                </div>
 91            </form>
 92        %else:
 93            <div class="form-row">
 94                <label>Revision:</label>
 95                ${revision_label}
 96            </div>
 97        %endif
 98    </div>
 99</div>
100<p/>
101${render_repository_tools_and_workflows( metadata, display_for_install=display_for_install )}