Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar_network_webui/templates/_context-artifact-list.html
blob: 332d26fa4d3d7aaade8a677f7be222282f60f652 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
        {%- if not _pjax %}
        <div class="resource-scrollable" id="resource-scrollable">
            <div class="items">
            {%- for item in range(page-1) %}
            <ul class='browser-page' id="resource-page-{{item+1}}">
                <div id='throbber-box'>
                    <img id='throbber' src="/static/images/throbber10.gif" />
                </div>
            </ul>
            {%- endfor %}
            <ul class="browser-page" id='resource-page-{{page}}'>
        {%- endif %}
                {%- for item in result %}
                <li class="resource-list">
                    <div class="icon-column res_type_col">
                        <a href="/artifacts/download/{{item['guid']}}">
                        <img class="small_preview" src="/artifacts/preview/{{item['guid']}}"/>
                        </a>
                    </div>
                    <div class="icon-column">
                        {%- if item['author'] %}
                        <img src="/static/icons/sugar-xo.png"/>
                        {%- endif %}
                    </div>
                    <div class="summary-column-context">
                        <div class="resource-title">
                        <a href="/artifacts/download/{{item['guid']}}"
                            class="artifact-link"
                            data-href="/artifacts/download/{{item['guid']}}">
                        {{item['title']|safe}}</a>
                        </div>
                        <div class="resource-context-row">
                        <a href="/artifacts/download/{{item['guid']}}"
                            data-href="/artifacts/download/{{item['guid']}}">
                        {{item['description']|safe}}
                        </a>
                        </div>
                        <div class="mtime">
                            {% if (session['connected'] or False) %}
                                {{_('by %(author)s on %(date)s', author=item['author'][0]['name'], date=item['mtime']|timedelta)}}
                            {% else %}
                                {{_('by %(author)s on %(date)s', author=sugar_nick, date=item['mtime']|timedelta)}} 
                            {% endif %}
                            {%- if item.is_author -%}
                            <span class="delete-artifact-button has_tooltip" title="{{_('delete')}}" data-guid="{{item['guid']}}">
                                <img class="action-button" src="/static/icons/edit-delete.png"
                                    onclick="delete_artifact('{{item['guid']}}')" ></img>
                            </span>
                            {%- endif -%}
                        </div>
                        <div class="resource-meta">
                        {%- for tag in item['tags'] %}
                            <span class="tag">{{tag}}</span>
                        {%- endfor %}
                        </div>
                        <!--div class="meta-column">
                            <div>
                            {{_('followers')}}
                            </div>
                            <div>
                            {{_('comments')}}
                            </div>
                            <div>
                            {{_('solutions')}}
                            </div>
                        </div-->
                    </div>
                </li>
                {%- endfor %}
                {%- if not result %}
                <div id="notice-window">
                    <div class="notice">{{_('No %(resource)s have been shared yet for this context.<br><br>Be the first to contribute with the community!', resource=resource_label )}}
                    </div>
                </div>
                {%- endif %}
        {%- if not _pjax %}
            </ul>
            {%- for item in range(total_pages-page) %}
            <ul class='browser-page' id="resource-page-{{item+page+1}}">
                <div id='throbber-box'>
                    <img id='throbber' src="/static/images/throbber10.gif" />
                </div>
            </ul>
            {%- endfor %}
            </div>
        </div>
        <div id="mejorar-sistema">
                <!--img onclick="location='/new/resource?cursor_offset={{context_offset}}'" class="toolbar-icon white-button" src="/static/icons/list-add.png" /-->
                <img onclick="location.href='/artifacts/upload/to_context/{{context['guid']}}'" class="toolbar-icon white-button" src="/static/icons/list-add.png" />
        </div>
        {%- if result %}
        <div id='vpaginator'>
            <input id="vrange" type="range" name="vpaginator" max="1" min="{{total_pages}}" step="-1" value="{{page}}" />
        </div>
        <style>
        .slider {
            height:280px;
            width:6px;
            position: fixed;
            right: 20px;
            top: 150px;
        }
        .handle {
            left:-10px;
        }
        </style>
        {%- endif %}
        {%- endif %}