Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar_network_webui/templates/_context-review-list.html
blob: 5cae03d94a24a2016a72af6db800a810dc988959 (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
                <br /><form id="review-form" method="POST" data-guid="{{context['guid']}}" action="/submit_review">
                    <input type="hidden" name="resource_guid" value="{{context['guid']}}" />
                    <textarea id="textarea-solution" name="review"></textarea>
                    <!-- span id="submit-buttons">
                        <input name="question" value=" " type="button" class="question-button submit_button button has_tooltip" title="{{_('submit question')}}" />
                        <br />
                        <input name="idea" value=" " type="button" class="idea-button submit_button button has_tooltip" src="/static/icons/button-idea.png" title="{{_('submit idea')}}" />
                        <br />
                        <input name="problem" value=" " type="button" class="problem-button submit_button button has_tooltip" src="/static/icons/button-problem.png" title="{{_('submit problem')}}" />
                    </span -->
                    <br />
                    <input id="contribute-button" class="sugar-button" type="submit" value="{{_('contribute a review')}}" />
                </form>
                <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='/feedback/new?context={{context['guid']}}'" class="toolbar-icon white-button has_tooltip_left" title="{{_('New question, idea or problem')}}"  src="/static/icons/list-add.png" />
                </div>
                <br />
                <ul class='generic-list'>
                {%- if not result %}
                <div class="notice">{{_('No %(resource)s have been shared yet for this context.<br><br>Be the first to share with the community!', resource=resource_label )}}
                </div>
                {%- endif %}
                {%- for item in result %}
                <li class="resource-list">
                    <div class="solution-content-column">
                        <img class="watermark" src="/static/icons/button-review.png"/>
                        <div class="resource-content">
                        {{item['content']}}
                        </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 %}
                        </div>
                        <div class="resource-meta">
                        {%- for tag in item['tags'] %}
                            <span class="tag">{{tag}}</span>
                        {%- endfor %}
                        </div>
                        {%- if item.is_author -%}
                        <span class="comments-button has_tooltip"
                            title="{{_('edit')}}"
                            onclick='edit_resource("review",
                                            "{{item["guid"]}}",
                                            "{{item["content"]}}",
                                            false)'>
                            <img src="/static/icons/toolbar-edit.png">
                            </img>
                            </span>
                        {%- endif -%}
                        <span class="comments-button has_tooltip"
                            title="{{_('comment')}}"
                            id="comments-button-{{item['guid']}}"
                            data-document="review"
                            data-guid="{{item['guid']}}">
                            <img src="/static/icons/comments.png" />
                        </span>
                        <img class="resource-throbber" id="throbber_{{item['guid']}}" src="/static/images/throbber4.gif" />
                        <div class="comments" id="comments-{{item['guid']}}"></div>
                    </div>
                    <div class="icon-column">
                        {%- if item['author'] %}
                        <img src="/static/icons/sugar-xo.png"/>
                        {%- endif %}
                    </div>
                </li>
                {%- endfor %}
                </ul>
                <script type="text/javascript">
                $(document).ready( function() {
                    $('#bottom-palette').slideUp();
                });
                </script>