Switch to unified view

a/opensourceprojects/templates/jinja_master/theme_macros.html b/opensourceprojects/templates/jinja_master/theme_macros.html
1
{%- macro header(login_url, logout_url) %}
1
{%- macro header(login_url, logout_url) %}
2
<header id="site-header">
2
<header id="site-header">
3
    <div class="wrapper">
3
    <div class="wrapper">
4
        <a id="header-logo" title="opensourceprojects.eu logo" href="/"><img src="{{g.theme_href('images/logo.png')}}"/></a>
4
        <a id="header-logo" title="opensourceprojects.eu logo" href="/"><img src="{{g.theme_href('images/logo.png')}}"/></a>
5
        <nav>
5
        <nav>
6
            <div class="opacity50"></div>
7
            <div class="top_menu">
6
            <div class="top_menu">
8
                <a href="/p/">Projects</a>
7
                <a href="/p/">Projects</a>
9
            {% if c.user._id %}
8
            {% if c.user._id %}
10
                <a href="/auth/prefs/">Settings</a>
9
                <a href="/auth/prefs/">Settings</a>
11
                <a href="{{c.user.url()}}">Profile</a>
10
                <a href="{{c.user.url()}}">Profile</a>
...
...
20
</header>
19
</header>
21
{%- endmacro %}
20
{%- endmacro %}
22
21
23
{%- macro footer(year, path_to_static='') %}
22
{%- macro footer(year, path_to_static='') %}
24
<footer id="site-footer">
23
<footer id="site-footer">
25
  <nav>
24
<a href="/about">About</a>
26
    This project is powered by <a href="http://sourceforge.net/p/allura/">Allura</a>.
25
<a href="/p/osp/tickets/">Report a bug</a>
27
  </nav>
28
</footer>
26
</footer>
29
{%- endmacro %}
27
{%- endmacro %}
30
28
31
{%- macro custom_js(path_to_static) %}
29
{%- macro custom_js(path_to_static) %}
32
30
...
...
35
{%- macro custom_tracking_js(accounts, user, project) %}
33
{%- macro custom_tracking_js(accounts, user, project) %}
36
    {# This should be overridden in your custom theme (e.g., sftheme) to implement custom tracking code. #}
34
    {# This should be overridden in your custom theme (e.g., sftheme) to implement custom tracking code. #}
37
    var _gaq = _gaq || [];
35
    var _gaq = _gaq || [];
38
36
39
    function _add_tracking(prefix, tracking_id) {
37
    function _add_tracking(prefix, tracking_id) {
40
        _gaq.push(
41
            [prefix+'._setAccount', tracking_id],
38
        _gaq.push([prefix+'._setAccount', tracking_id]);
39
        _gaq.push([prefix+'_setDomainName', 'opensourceprojects.eu']);
42
            [prefix+'._trackPageview'],
40
        _gaq.push([prefix+'._trackPageview']);
43
        );
44
    }
41
    }
45
42
46
    {%- for account in accounts %}
43
    {%- for account in accounts %}
47
    _add_tracking('sfnt{{ loop.index }}', '{{account}}');
44
    _add_tracking('', '{{account}}');
48
    {%- endfor %}
45
    {%- endfor %}
49
    {% if project and project.neighborhood.features['google_analytics'] -%}
46
    {% if project and project.neighborhood.features['google_analytics'] -%}
50
      {% if project.neighborhood.tracking_id -%}
47
      {% if project.neighborhood.tracking_id -%}
51
          _add_tracking('nbhd', '{{project.neighborhood.tracking_id}}');
48
          _add_tracking('nbhd', '{{project.neighborhood.tracking_id}}');
52
      {%- endif %}
49
      {%- endif %}