aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/GroupBundle/Resources/views/Manage/index.html.twig
blob: 35a70400889e25b90a8d295d697b72b79a5e8afb (plain) (blame)
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
{% extends "WallabagCoreBundle::layout.html.twig" %}

{% block title %}{{ 'group.page_title'|trans }}{% endblock %}

{% block content %}

    <div class="row">
        <div class="col s12">
            <div class="card-panel">
                <div class="row">
                    <div class="input-field col s12">
                        <p class="help">{{ 'group.description'|trans|raw }}</p>

                        {% if groups is not empty %}
                            <table class="bordered responsive-table">
                                <thead>
                                    <tr>
                                        <th>{{ 'group.form.name_label'|trans }}</th>
                                        <th>{{ 'group.form.roles_label'|trans }}</th>
                                        <th>{{ 'group.list.actions'|trans }}</th>
                                    </tr>
                                </thead>
                                <tbody>
                                {% for group in groups %}
                                    <tr>
                                        <td>{{ group.name }}</td>
                                        <td>
                                            {% if app.user in group.users and app.user.inGroup(group) %}
                                                {{ 'group.user.inGroup' | transchoice(group.users | length) }}
                                            {% else %}
                                                {{ 'group.user.notInGroup' | transchoice(group.users | length) }}
                                            {% endif %}
                                        </td>
                                        <td>
                                            {% if app.user in group.users and app.user.inGroup(group) %}
                                                {% if app.user.getGroupRoleForUser(group) >= 5 %}
                                                    <a href="{{ path('group_edit', { 'id': group.id }) }}" class="waves-effect waves-light btn tooltipped" data-delay="50" data-position="bottom" data-tooltip="{{ 'group.list.edit_action'|trans }}"><i class="material-icons">edit</i></a>
                                                    <a href="{{ path('group-manage', { 'group': group.id }) }}" class="waves-effect waves-light btn tooltipped" data-delay="50" data-position="bottom" data-tooltip="{{ 'group.manage.label'|trans }}"><i class="material-icons">settings_applications</i></a>
                                                {% endif %}
                                                <a href="{{ path('group-presentations', { 'group': group.id }) }}" class="waves-effect waves-light btn tooltipped" data-delay="50" data-position="bottom" data-tooltip="{{ 'group.entries.label'|trans }}"><i class="material-icons">view_list</i></a>
                                                <a href="{{ path('group_leave', { 'group': group.id }) }}" class="waves-effect waves-light btn red tooltipped" data-delay="50" data-position="bottom" data-tooltip="{{ 'group.leave.label'|trans }}"><i class="material-icons">clear</i></a>
                                            {% elseif app.user in group.users and not app.user.inGroup(group) %}
                                                {{ 'group.requests.sent' | trans }}
                                            {% else %}
                                                <a href="{{ path('group_join', { 'group': group.id }) }}" class="waves-effect waves-light btn tooltipped" data-tooltip="{{ 'group.join.label'|trans }}" data-delay="50" data-position="bottom">
                                                    {% if group.acceptSystem == 3 %}
                                                        <i class="material-icons md-18 vertical-align-middle" data-toggle="tooltip" data-placement="bottom" title="{{ 'group.join'|trans }}">lock</i>
                                                    {% else %}
                                                        <i class="material-icons" data-toggle="tooltip" data-placement="bottom" title="{{ 'group.join'|trans }}">input</i>
                                                    {% endif %}
                                                </a>
                                            {% endif %}
                                        </td>
                                    </tr>
                                {% endfor %}
                                </tbody>
                            </table>
                        {% endif %}
                        <br />
                        <p>
                            <a href="{{ path('group_new') }}" class="waves-effect waves-light btn">{{ 'group.list.create_new_one'|trans }}</a>
                        </p>
                        {% if groups.getNbPages > 1 %}
                            {{ pagerfanta(groups, 'twitter_bootstrap_translated', {'proximity': 1}) }}
                        {% endif %}
                    </div>
                </div>
            </div>
        </div>
    </div>

{% endblock %}