PageRenderTime 19ms CodeModel.GetById 17ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/templates/webapps/community/category/grid.mako

https://bitbucket.org/cistrome/cistrome-harvard/
Mako | 63 lines | 58 code | 4 blank | 1 comment | 8 complexity | e87778a2cda81738646e0cf1a02217d7 MD5 | raw file
 1<%namespace file="/display_common.mako" import="render_message" />
 2<%namespace file="/grid_base.mako" import="*" />
 3<%namespace file="/grid_common.mako" import="*" />
 4<%inherit file="/grid_base.mako" />
 5
 6## Render grid header.
 7<%def name="render_grid_header( grid, repo_grid, render_title=True)">
 8    <div class="grid-header">
 9        %if render_title:
10            ${grid_title()}
11        %endif
12        %if grid.global_actions:
13            <ul class="manage-table-actions">
14                %if len( grid.global_actions ) < 4:
15                    %for action in grid.global_actions:
16                        <li><a class="action-button" href="${h.url_for( **action.url_args )}">${action.label}</a></li>
17                    %endfor
18                %else:
19                    <li><a class="action-button" id="action-8675309-popup" class="menubutton">Actions</a></li>
20                    <div popupmenu="action-8675309-popup">
21                        %for action in grid.global_actions:
22                            <a class="action-button" href="${h.url_for( **action.url_args )}">${action.label}</a>
23                        %endfor
24                    </div>
25                %endif
26            </ul>
27        %endif
28        ${render_grid_filters( repo_grid, render_advanced_search=False )}
29    </div>
30</%def>
31
32<%def name="make_grid( grid, repo_grid )">
33    <div class="loading-elt-overlay"></div>
34    <table>
35        <tr>
36            <td width="75%">${self.render_grid_header( grid, repo_grid )}</td>
37            <td></td>
38            <td></td>
39        </tr>
40        <tr>
41            <td width="100%" id="grid-message" valign="top">${render_message( message, status )}</td>
42            <td></td>
43            <td></td>
44        </tr>
45    </table>
46    ${render_grid_table( grid, show_item_checkboxes )}
47</%def>
48
49<%def name="grid_body( grid )">
50    <%
51        from galaxy.webapps.community.controllers.repository import RepositoryListGrid
52        repo_grid = RepositoryListGrid()
53    %>
54    ${self.make_grid( grid, repo_grid )}
55</%def>
56
57<%def name="center_panel()">
58    <div style="overflow: auto; height: 100%">
59        <div class="page-container" style="padding: 10px;">
60            ${self.grid_body( grid )}
61        </div>
62    </div>
63</%def>