~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/app/templates/base-layout-macros.pt

  • Committer: Curtis Hovey
  • Date: 2011-08-12 14:39:51 UTC
  • mto: This revision was merged to the branch mainline in revision 13685.
  • Revision ID: curtis.hovey@canonical.com-20110812143951-74vfvrt37gtt4fz2
Sorted imports.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
  tal:define="
38
38
      revno modules/lp.app.versioninfo/revno | string:unknown;
39
39
      icingroot string:/+icing/rev${revno};
40
 
      devmode modules/lp.services.config/config/devmode;
 
40
      devmode modules/canonical.config/config/devmode;
41
41
      yui string:${icingroot}/yui;
42
42
      lazr_js string:${icingroot}/lazr/build;
43
43
      lp_js string:${icingroot}/build"
91
91
<metal:page-javascript define-macro="page-javascript"
92
92
  tal:define="
93
93
      revno modules/lp.app.versioninfo/revno | string:unknown;
94
 
      devmode modules/lp.services.config/config/devmode;
95
 
      map_query string:&amp;file=api&amp;v=2&amp;key=${modules/lp.services.config/config/google/maps_api_key};">
 
94
      icingroot_contrib string:/+icing-contrib/rev${revno};
 
95
      devmode modules/canonical.config/config/devmode;
 
96
      map_query string:&amp;file=api&amp;v=2&amp;key=${modules/canonical.config/config/google/maps_api_key};">
96
97
  <tal:comment replace="nothing">
97
98
    Load and initialize the common script used by all pages.
98
99
  </tal:comment>
 
100
  <tal:needs_json tal:condition="request/needs_json">
 
101
    <script type="text/javascript"
 
102
            tal:attributes="src string:${icingroot_contrib}/json2.js"></script>
 
103
    <script type="text/javascript"
 
104
            tal:attributes="src string:${icingroot_contrib}/JSONScriptRequest.js"></script>
 
105
  </tal:needs_json>
99
106
 
100
107
  <metal:load-lavascript use-macro="context/@@+base-layout-macros/load-javascript" />
101
108
 
 
109
    <tal:if condition="request/features/bugs.private_notification.enabled">
102
110
    <script type="text/javascript">
103
 
      LPS.use('base', 'node', 'oop', 'event', 'lp.app.beta_features',
104
 
              'lp.bugs.bugtask_index', 'lp.bugs.subscribers',
 
111
      LPS.use('base', 'node', 'oop', 'event', 'lp.bugs.bugtask_index',
 
112
                'lp.bugs.subscribers',
105
113
                'lp.code.branchmergeproposal.diff', 'lp.comments.hide',
106
114
                function(Y) {
107
115
          Y.on("domready", function () {
109
117
                  Y.lp.app.privacy.setup_privacy_notification();
110
118
                  Y.lp.app.privacy.display_privacy_notification();
111
119
              }
112
 
              Y.lp.app.beta_features.display_beta_notification();
113
120
          });
114
121
      });
115
122
    </script>
 
123
    </tal:if>
116
124
 
117
125
  <script id="base-layout-load-scripts" type="text/javascript">
118
126
    LPS.use('node', 'event-delegate', 'lp', 'lp.app.links', 'lp.app.longpoll', function(Y) {
122
130
            Y.lp.activate_collapsibles();
123
131
            activateFoldables();
124
132
            activateConstrainBugExpiration();
125
 
            Y.lp.app.links.check_valid_lp_links();
 
133
            Y.lp.app.links.check_valid_lp_links();
126
134
            // Longpolling will only start if
127
 
            // LP.cache.longpoll is populated.
128
 
            // We use Y.later to work around a Safari/Chrome 'feature':
129
 
            // The mouse cursor stays 'busy' until all the requests started during
130
 
            // page load are finished.  Hence we want the long poll request to start
131
 
            // right *after* the page has loaded.
132
 
            Y.later(0, Y.lp.app.longpoll, Y.lp.app.longpoll.setupLongPollManager);
 
135
            // LP.cache.longpoll is populated.
 
136
            Y.lp.app.longpoll.setupLongPollManager();
133
137
        }, window);
134
138
 
135
139
        // Hook up the function that dismisses the help window if we click
162
166
    We can revisit this IE-only optimization if we remove SSL.  Any changes that
163
167
    affect IE should be tested using webpagetest.org. (See the dev.launchpad.net
164
168
    wiki for details.)
165
 
    </tal:comment>
 
169
  </tal:comment>
166
170
  <link
167
171
        type="text/css"
168
172
        rel="stylesheet"
181
185
                   '${links/?key/fmt:api_url}';">
182
186
    </script>
183
187
  </tal:cache>
184
 
  <tal:comment condition="nothing">
185
 
    The id of the script block below is used to determine whether this
186
 
    page is loaded by test_lp_client_integration.js.
187
 
  </tal:comment>
188
 
  <script id="json-cache-script"
189
 
          tal:content="string:LP.cache = ${view/getCacheJSON};">
 
188
 
 
189
  <script tal:content="string:LP.cache = ${view/getCacheJSON};">
190
190
  </script>
191
191
</metal:lp-client-cache>
192
192
 
238
238
            tal:condition="view/macro:pagehas/globalsearch"
239
239
            tal:attributes="action string:${rooturl}+search">
240
240
            <input type="search" id="search-text" name="field.text" />
241
 
            <input type="image" src="/@@/search" style="vertical-align:5%" alt="Search Launchpad"/>
 
241
            <input type="submit" value="" class="icon-only sprite search-icon" />
242
242
          </form>
243
243
        </div>
244
244
        <metal:site-message
246
246
    </div>
247
247
 
248
248
    <div class="colophon">
249
 
      &copy; 2004-2012
 
249
      &copy; 2004-2011
250
250
      <a href="http://canonical.com/">Canonical&nbsp;Ltd.</a>
251
251
      &nbsp;&bull;&nbsp;
252
252
      <a tal:attributes="href string:${rooturl}legal">Terms of use</a>
256
256
      <a tal:condition="view/user|nothing"
257
257
        href="/support">Contact Launchpad Support</a>
258
258
      &nbsp;&bull;&nbsp;
259
 
      <a href="http://blog.launchpad.net/"
260
 
        >Blog</a>
261
 
      <tal:careers_link condition="not: features/baselayout.careers_link.disabled">
262
 
        &nbsp;&bull;&nbsp;
263
 
        <a href="http://www.canonical.com/about-canonical/careers"
264
 
                >Careers</a>
265
 
      </tal:careers_link>
266
 
      &nbsp;&bull;&nbsp;
267
259
      <a href="http://identi.ca/launchpadstatus"
268
260
        >System status</a>
269
261
      <span id="lp-version">
271
263
        r<tal:revno replace="revno" />
272
264
        <tal:devmode condition="devmode">devmode</tal:devmode>
273
265
        <tal:demo condition="is_demo">demo site</tal:demo>
274
 
        (<a href="https://dev.launchpad.net/"
275
 
             >Get the code!</a>)
 
266
        (<a href="https://code.launchpad.net/~launchpad-pqm/launchpad/stable/"
 
267
             >get the code</a>)
276
268
      </span>
277
269
    </div>
278
270
  </div>
286
278
  </div>
287
279
</metal:site-message>
288
280
 
289
 
 
290
 
<metal:debug-timeline define-macro="debug-timeline">
291
 
  <a name="debug_timeline"
292
 
    id="debug_timeline"
293
 
    class="hidden"
294
 
    >
295
 
    <table
296
 
      tal:condition="request/features/visible_render_time"
297
 
      tal:define="timeline_actions modules/lp.services.webapp.adapter/get_timeline_actions"
298
 
      class="debug-timeline listing"
299
 
      >
300
 
      <thead>
301
 
        <th>Duration</th>
302
 
        <th>Action</th>
303
 
      </thead>
304
 
      <tr tal:repeat="action timeline_actions">
305
 
        <td class="amount" tal:content="action/duration/fmt:millisecondduration"/>
306
 
        <td style="font-family: monospace; text-align: left;">
307
 
          <pre class="wrap"><span class="action-category" tal:content="action/category"/>: <span class="action-details" tal:content="action/detail"/></pre>
308
 
        </td>
309
 
      </tr>
310
 
    </table>
311
 
  </a>
312
 
</metal:debug-timeline>
313
 
 
314
 
 
315
281
<metal:plural-msg define-macro="plural-message">
316
282
  <tal:comment condition="nothing">
317
283
    Expected variables to be defined in a containing tag or global:
328
294
    condition="python: count != 1"
329
295
    replace="l_plural" /></metal:plural-msg>
330
296
</macros>
331