PageRenderTime 19ms CodeModel.GetById 10ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 1ms

/templates/workflow/list.mako

https://bitbucket.org/cistrome/cistrome-harvard/
Mako | 125 lines | 109 code | 14 blank | 2 comment | 4 complexity | 2c996b86e3fb8cb0cff0dbad321d37af MD5 | raw file
  1<%inherit file="/webapps/galaxy/base_panels.mako"/>
  2
  3<%def name="init()">
  4<%
  5    self.has_left_panel=False
  6    self.has_right_panel=False
  7    self.active_view="workflow"
  8    self.message_box_visible=False
  9%>
 10</%def>
 11
 12<%def name="title()">Workflow home</%def>
 13
 14<%def name="center_panel()">
 15    <div style="overflow: auto; height: 100%;">
 16        <div class="page-container" style="padding: 10px;">
 17            %if message:
 18                <%
 19                    try:
 20                        status
 21                    except:
 22                        status = "done"
 23                %>
 24                <p />
 25                <div class="${status}message">
 26                    ${h.to_unicode( message )}
 27                </div>
 28            %endif
 29
 30            <h2>Your workflows</h2>
 31
 32            <ul class="manage-table-actions">
 33                <li>
 34                    <a class="action-button" href="${h.url_for( action='create' )}">
 35                        <img src="${h.url_for('/static/images/silk/add.png')}" />
 36                        <span>Create new workflow</span>
 37                    </a>
 38                </li>
 39                <li>
 40                    <a class="action-button" href="${h.url_for( action='import_workflow' )}">
 41                        <img src="${h.url_for('/static/images/fugue/arrow-090.png')}" />
 42                        <span>Upload or import workflow</span>
 43                    </a>
 44                </li>
 45            </ul>
 46
 47            %if workflows:
 48                <table class="manage-table colored" border="0" cellspacing="0" cellpadding="0" style="width:100%;">
 49                    <tr class="header">
 50                        <th>Name</th>
 51                        <th># of Steps</th>
 52                        ## <th>Last Updated</th>
 53                        <th></th>
 54                    </tr>
 55                    %for i, workflow in enumerate( workflows ):
 56                        <tr>
 57                            <td>
 58                                <div class="menubutton" style="float: left;" id="wf-${i}-popup">
 59                                ${h.to_unicode( workflow.name ) | h}
 60                                </div>
 61                            </td>
 62                            <td>${len(workflow.latest_workflow.steps)}</td>
 63                            ## <td>${str(workflow.update_time)[:19]}</td>
 64                            <td>
 65                                <div popupmenu="wf-${i}-popup">
 66                                <a class="action-button" href="${h.url_for( action='editor', id=trans.security.encode_id(workflow.id) )}" target="_parent">Edit</a>
 67                                <a class="action-button" href="${h.url_for( controller='root', action='index', workflow_id=trans.security.encode_id(workflow.id) )}" target="_parent">Run</a>
 68                                <a class="action-button" href="${h.url_for( action='sharing', id=trans.security.encode_id(workflow.id) )}">Share or Publish</a>
 69                                <a class="action-button" href="${h.url_for( action='export', id=trans.security.encode_id(workflow.id) )}">Download or Export</a>
 70                                <a class="action-button" href="${h.url_for( action='clone', id=trans.security.encode_id(workflow.id) )}">Clone</a>
 71                                <a class="action-button" href="${h.url_for( action='rename', id=trans.security.encode_id(workflow.id) )}">Rename</a>
 72                                <a class="action-button" confirm="Are you sure you want to delete workflow '${h.to_unicode( workflow.name ) | h}'?" href="${h.url_for( action='delete', id=trans.security.encode_id(workflow.id) )}">Delete</a>
 73                                </div>
 74                            </td>
 75                        </tr>
 76                    %endfor
 77                </table>
 78            %else:
 79
 80                You have no workflows.
 81
 82            %endif
 83
 84            <h2>Workflows shared with you by others</h2>
 85
 86            %if shared_by_others:
 87                <table class="colored" border="0" cellspacing="0" cellpadding="0" width="100%">
 88                    <tr class="header">
 89                        <th>Name</th>
 90                        <th>Owner</th>
 91                        <th># of Steps</th>
 92                        <th></th>
 93                    </tr>
 94                    %for i, association in enumerate( shared_by_others ):
 95                        <% workflow = association.stored_workflow %>
 96                        <tr>
 97                            <td>
 98                                <a class="menubutton" id="shared-${i}-popup" href="${h.url_for( action='run', id=trans.security.encode_id(workflow.id) )}">${h.to_unicode( workflow.name )}</a>
 99                            </td>
100                            <td>${workflow.user.email}</td>
101                            <td>${len(workflow.latest_workflow.steps)}</td>
102                            <td>
103                                <div popupmenu="shared-${i}-popup">
104                                    <a class="action-button" href="${h.url_for( action='display_by_username_and_slug', username=workflow.user.username, slug=workflow.slug)}" target="_top">View</a>
105                                    <a class="action-button" href="${h.url_for( action='run', id=trans.security.encode_id(workflow.id) )}">Run</a>
106                                    <a class="action-button" href="${h.url_for( action='clone', id=trans.security.encode_id(workflow.id) )}">Clone</a>
107                                </div>
108                            </td>
109                        </tr>
110                    %endfor
111                </table>
112            %else:
113
114                No workflows have been shared with you.
115
116            %endif
117
118            <h2>Other options</h2>
119
120            <a class="action-button" href="${h.url_for( action='configure_menu' )}">
121                <span>Configure your workflow menu</span>
122            </a>
123        </div>
124    </div>
125</%def>