summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/template/en/default/hook/global/header-start.html.tmpl
blob: 2b26421486f79ba11e40aed7cd9f1c9743834877 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
[% IF !javascript_urls %]
  [% javascript_urls = [] %]
[% END %]

[% IF template.name == 'list/list.html.tmpl' %]
  [% javascript_urls.push('extensions/BMO/web/js/sorttable.js') %]
[% END %]

[% IF !bodyclasses %]
  [% bodyclasses = [] %]
[% END %]

[%# Change the background/border for bugs/attachments in certain bug groups %]
[% IF template.name == 'attachment/edit.html.tmpl' 
      || template.name == 'attachment/create.html.tmpl'
      || template.name == 'attachment/diff-header.html.tmpl' %]
  [% style_urls.push("skins/custom/bug_groups.css") %]

  [% IF template.name == 'attachment/edit.html.tmpl'
        || template.name == 'attachment/diff-header.html.tmpl' %]
    [% IF bodyclasses == 'no_javascript' %]
      [% bodyclasses = ['no_javascript'] %] 
    [% END %]
    [% FOREACH group = attachment.bug.groups_in %]
      [% bodyclasses.push("bz_group_$group.name") %]
    [% END %]
  [% END %]

  [% IF template.name == 'attachment/create.html.tmpl' %]
    [% FOREACH group = bug.groups_in %]
      [% bodyclasses.push("bz_group_$group.name") %]
    [% END %]
  [% END %]
[% END %]

[%# BMO - add user context menu %]
[% IF user.id %]
  [% yui.push('container', 'menu') %]
  [% style_urls.push('js/yui/assets/skins/sam/menu.css') %]
  [% javascript_urls.push('extensions/BMO/web/js/edituser_menu.js') %]
[% END %]