1 | <%inherit file="/webapps/galaxy/base_panels.mako"/> |
---|
2 | <%namespace file="/display_common.mako" import="get_history_link, get_controller_name" /> |
---|
3 | <%namespace file="/root/history_common.mako" import="render_dataset" /> |
---|
4 | <%namespace file="/tagging_common.mako" import="render_individual_tagging_element, render_community_tagging_element" /> |
---|
5 | |
---|
6 | <%def name="javascripts()"> |
---|
7 | ${parent.javascripts()} |
---|
8 | ${h.js( "galaxy.base", "jquery", "json2", "class", "jquery.jstore" )} |
---|
9 | <script type="text/javascript"> |
---|
10 | $(function() { |
---|
11 | init_history_items( $("div.historyItemWrapper"), false, "nochanges" ); |
---|
12 | }); |
---|
13 | </script> |
---|
14 | </%def> |
---|
15 | |
---|
16 | <%def name="stylesheets()"> |
---|
17 | ${parent.stylesheets()} |
---|
18 | ${h.css( "history", "autocomplete_tagging" )} |
---|
19 | <style type="text/css"> |
---|
20 | .historyItemContainer { |
---|
21 | padding-right: 3px; |
---|
22 | border-right-style: solid; |
---|
23 | border-right-color: #66AA66; |
---|
24 | } |
---|
25 | .page-body |
---|
26 | { |
---|
27 | padding: 10px; |
---|
28 | float: left; |
---|
29 | width: 65%; |
---|
30 | } |
---|
31 | .page-meta |
---|
32 | { |
---|
33 | float: right; |
---|
34 | width: 27%; |
---|
35 | padding: 0.5em; |
---|
36 | margin: 0.25em; |
---|
37 | vertical-align: text-top; |
---|
38 | border: 2px solid #DDDDDD; |
---|
39 | border-top: 4px solid #DDDDDD; |
---|
40 | } |
---|
41 | </style> |
---|
42 | |
---|
43 | <style> |
---|
44 | .historyItemBody { |
---|
45 | display: none; |
---|
46 | } |
---|
47 | </style> |
---|
48 | |
---|
49 | <noscript> |
---|
50 | <style> |
---|
51 | .historyItemBody { |
---|
52 | display: block; |
---|
53 | } |
---|
54 | </style> |
---|
55 | </noscript> |
---|
56 | </%def> |
---|
57 | |
---|
58 | <%def name="init()"> |
---|
59 | <% |
---|
60 | self.has_left_panel=False |
---|
61 | self.has_right_panel=False |
---|
62 | self.message_box_visible=False |
---|
63 | %> |
---|
64 | </%def> |
---|
65 | |
---|
66 | <%def name="center_panel()"> |
---|
67 | ## Get URL to other histories owned by user that owns this history. |
---|
68 | <% |
---|
69 | ##TODO: is there a better way to create this URL? Can't use 'f-username' as a key b/c it's not a valid identifier. |
---|
70 | href_to_published_histories = h.url_for( controller='/history', action='list_published') |
---|
71 | if history.user is not None: |
---|
72 | href_to_user_histories = h.url_for( controller='/history', action='list_published', xxx=history.user.username).replace( 'xxx', 'f-username') |
---|
73 | else: |
---|
74 | href_to_user_histories = h.url_for( controller='/history', action='list_published' )##should this instead be be None or empty string? |
---|
75 | %> |
---|
76 | |
---|
77 | <div class="unified-panel-header" unselectable="on"> |
---|
78 | </div> |
---|
79 | |
---|
80 | <div class="unified-panel-body"> |
---|
81 | <div style="overflow: auto; height: 100%;"> |
---|
82 | ## Render view of history. |
---|
83 | <div id="top-links" class="historyLinks" style="padding: 0px 0px 5px 0px"> |
---|
84 | <a href="${h.url_for( action='imp', id=trans.security.encode_id(history.id) )}">import and start using history</a> | |
---|
85 | <a href="${get_history_link( history )}">${_('refresh')}</a> |
---|
86 | %if show_deleted: |
---|
87 | | <a href="${h.url_for('history', show_deleted=False)}">${_('hide deleted')}</a> |
---|
88 | %endif |
---|
89 | | <a href="#" class="toggle">collapse all</a> |
---|
90 | </div> |
---|
91 | |
---|
92 | <div id="history-name-area" class="historyLinks" style="color: gray; font-weight: bold; padding: 0px 0px 5px 0px"> |
---|
93 | <div id="history-name">${history.get_display_name()}</div> |
---|
94 | </div> |
---|
95 | |
---|
96 | %if history.deleted: |
---|
97 | <div class="warningmessagesmall"> |
---|
98 | ${_('You are currently viewing a deleted history!')} |
---|
99 | </div> |
---|
100 | <p></p> |
---|
101 | %endif |
---|
102 | |
---|
103 | %if not datasets: |
---|
104 | |
---|
105 | <div class="infomessagesmall" id="emptyHistoryMessage"> |
---|
106 | |
---|
107 | %else: |
---|
108 | |
---|
109 | ## Render requested datasets, ordered from newest to oldest |
---|
110 | %for data in datasets: |
---|
111 | %if data.visible: |
---|
112 | <div class="historyItemContainer visible-right-border" id="historyItemContainer-${data.id}"> |
---|
113 | ${render_dataset( data, data.hid, show_deleted_on_refresh = show_deleted, for_editing=False )} |
---|
114 | </div> |
---|
115 | %endif |
---|
116 | %endfor |
---|
117 | |
---|
118 | <div class="infomessagesmall" id="emptyHistoryMessage" style="display:none;"> |
---|
119 | %endif |
---|
120 | ${_("Your history is empty. Click 'Get Data' on the left pane to start")} |
---|
121 | </div> |
---|
122 | </div> |
---|
123 | </div> |
---|
124 | </%def> |
---|