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

/templates/visualization/list.mako

https://bitbucket.org/cistrome/cistrome-harvard/
Mako | 66 lines | 56 code | 10 blank | 0 comment | 3 complexity | 49324f322364459e4fdccadf9fc93dae 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="visualization"
 8    self.message_box_visible=False
 9%>
10</%def>
11
12<%def name="center_panel()">
13
14    <div style="overflow: auto; height: 100%;">
15        <div class="page-container" style="padding: 10px;">
16            %if message:
17                <%
18                    try:
19                        status
20                    except:
21                        status = "done"
22                %>
23                <p />
24                <div class="${status}message">
25                    ${h.to_unicode( message )}
26                </div>
27            %endif
28
29            ${h.to_unicode( grid )}
30
31            <br><br>
32            <h2>Visualizations shared with you by others</h2>
33
34            %if shared_by_others:
35                <table class="colored" border="0" cellspacing="0" cellpadding="0" width="100%">
36                    <tr class="header">
37                        <th>Title</th>
38                        <th>Owner</th>
39                        <th></th>
40                    </tr>
41                    %for i, association in enumerate( shared_by_others ):
42                        <% visualization = association.visualization %>
43                        <tr>
44                            <td>
45                                <a class="menubutton" id="shared-${i}-popup" href="${h.url_for( action='display_by_username_and_slug', username=visualization.user.username, slug=visualization.slug)}">${visualization.title}</a>
46                            </td>
47                            <td>${visualization.user.username}</td>
48                            <td>
49                                <div popupmenu="shared-${i}-popup">
50                                    <a class="action-button" href="${h.url_for( action='display_by_username_and_slug', username=visualization.user.username, slug=visualization.slug)}" target="_top">View</a>
51                                    <a class="action-button" href="${h.url_for( action='clone', id=trans.security.encode_id(visualization.id) )}">Copy</a>
52                                </div>
53                            </td>
54                        </tr>
55                    %endfor
56                </table>
57            %else:
58
59                No visualizations have been shared with you.
60
61            %endif
62
63        </div>
64    </div>
65
66</%def>