Web · Wiki · Activities · Blog · Lists · Chat · Meeting · Bugs · Git · Translate · Archive · People · Donate
1
    {% extends "base.html" %}
2
    {% block view %}
3
    <div id="resource-tabs" class="resource-list-tabs">
4
        <a href="/resource/questions">
5
        <img class="palette-tab-button {{questions}}" src="/static/icons/button-question.png" />
6
        </a>
7
        <a href="/resource/ideas">
8
        <img class="palette-tab-button {{ideas}}" src="/static/icons/button-idea.png" />
9
        </a>
10
        <a href="/resource/problems">
11
        <img class="palette-tab-button {{problems}}" src="/static/icons/button-problem.png" />
12
        </a>
13
        <a href="/resource/reviews">
14
        <img class="palette-tab-button {{reviews}}" src="/static/icons/button-review.png" />
15
        </a>
16
        <a href="/resource/gallery" onclick='alert("{% trans %}Work in progress.{% endtrans %}"); return false;'>
17
        <img class="palette-tab-button {{gallery}}" src="/static/icons/button-blank.png" />
18
        </a>
19
        <a href="/resource">
20
        <img class="palette-tab-button {{all_}}" src="/static/icons/button-list.png" />
21
        </a>
22
    </div>
23
    {#<div id="resource-buttons">
24
        <img class="question-button button{%if resource=='questions' %} selected{% endif %}" src="/static/icons/emblem-question.png" alt="Es una pregunta"/>
25
        <img class="idea-button button{%if resource=='ideas' %} selected{% endif %}" src="/static/icons/emblem-charging.png" alt="Es una idea" />
26
        <img class="problem-button button{%if resource=='problems' %} selected{% endif %}" src="/static/icons/emblem-notification.png" alt="Es un problema" />
27
    </div>#}
28
    <div class="resource-list-scrollable" id="resource-list-scrollable">
29
    <div class="items">
30
    {%- for item in range(page-1) %}
31
    <ul class='resource-list' id="resource-page-{{item+1}}">
32
        <div id='throbber-box'>
33
            <img id='throbber' src="/static/images/throbber10.gif" />
34
        </div>
35
    </ul>
36
    {%- endfor %}
37
    {%- include('_resource-list.html') %}
38
    {%- for item in range(total_pages-page) %}
39
    <ul class='resource-list' id="resource-page-{{item+page+1}}">
40
        <div id='throbber-box'>
41
            <img id='throbber' src="/static/images/throbber10.gif" />
42
        </div>
43
    </ul>
44
    {%- endfor %}
45
    </div>
46
    </div>
47
    <script type="text/javascript">
48
        {#
49
        $(".question-button").click(function() {
50
            location='/resource/questions';
51
            });
52
        $(".idea-button").click(function() {
53
            location='/resource/ideas';
54
            });
55
        $(".problem-button").click(function() {
56
            location='/resource/problems';
57
            });
58
            #}
59
        $(function() {
60
            // initialize scrollable
61
            $(".resource-list-scrollable").scrollable( {vertical:true} );
62
            var api = $("#resource-list-scrollable").data("scrollable");
63
            var last_page = {{page}};
64
            api.seekTo({{page-1}},0);
65
            api.onSeek( function() {
66
                new_page = api.getIndex()+1;
67
                History.pushState(null,null,'?page=' + new_page); 
68
                $.get( '?page='+new_page+'&_pjax', { },
69
                  function( data ) {
70
                    $( '#resource-page-'+new_page ).empty().append( data );
71
                  }
72
                );
73
                $( '#resource-page-'+last_page ).empty().append('<div id="throbber-box"><img id="throbber" src="/static/images/throbber10.gif" /></div>'); 
74
                last_page=new_page;
75
                $( '#info' ).empty().append('{% trans %}page '+new_page+' of{% endtrans %} {{total_pages}}');
76
                });
77
        });
78
    </script>
79
    {% endblock view %}