aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/GroupBundle
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/GroupBundle')
-rw-r--r--src/Wallabag/GroupBundle/Entity/Group.php1
-rw-r--r--src/Wallabag/GroupBundle/Form/GroupType.php7
-rw-r--r--src/Wallabag/GroupBundle/Resources/views/Manage/edit.html.twig8
-rw-r--r--src/Wallabag/GroupBundle/Resources/views/Manage/index.html.twig42
4 files changed, 23 insertions, 35 deletions
diff --git a/src/Wallabag/GroupBundle/Entity/Group.php b/src/Wallabag/GroupBundle/Entity/Group.php
index e889f74e..1381d1ea 100644
--- a/src/Wallabag/GroupBundle/Entity/Group.php
+++ b/src/Wallabag/GroupBundle/Entity/Group.php
@@ -2,6 +2,7 @@
2 2
3namespace Wallabag\GroupBundle\Entity; 3namespace Wallabag\GroupBundle\Entity;
4 4
5use Doctrine\Common\Collections\ArrayCollection;
5use FOS\UserBundle\Model\Group as BaseGroup; 6use FOS\UserBundle\Model\Group as BaseGroup;
6use Doctrine\ORM\Mapping as ORM; 7use Doctrine\ORM\Mapping as ORM;
7use Wallabag\UserBundle\Entity\User; 8use Wallabag\UserBundle\Entity\User;
diff --git a/src/Wallabag/GroupBundle/Form/GroupType.php b/src/Wallabag/GroupBundle/Form/GroupType.php
index 749c15e9..c2ad764b 100644
--- a/src/Wallabag/GroupBundle/Form/GroupType.php
+++ b/src/Wallabag/GroupBundle/Form/GroupType.php
@@ -2,7 +2,6 @@
2 2
3namespace Wallabag\GroupBundle\Form; 3namespace Wallabag\GroupBundle\Form;
4 4
5use Symfony\Bridge\Doctrine\Form\Type\EntityType;
6use Symfony\Component\Form\AbstractType; 5use Symfony\Component\Form\AbstractType;
7use Symfony\Component\Form\FormBuilderInterface; 6use Symfony\Component\Form\FormBuilderInterface;
8use Symfony\Component\OptionsResolver\OptionsResolver; 7use Symfony\Component\OptionsResolver\OptionsResolver;
@@ -22,12 +21,6 @@ class GroupType extends AbstractType
22 'required' => false, 21 'required' => false,
23 'label' => 'group.form.name_label', 22 'label' => 'group.form.name_label',
24 ]) 23 ])
25 ->add('users', EntityType::class, array(
26 'class' => 'WallabagUserBundle:User',
27 'choice_label' => 'username',
28 'multiple' => true,
29 'expanded' => true,
30 ))
31 ->add('save', SubmitType::class, [ 24 ->add('save', SubmitType::class, [
32 'label' => 'group.form.save', 25 'label' => 'group.form.save',
33 ]) 26 ])
diff --git a/src/Wallabag/GroupBundle/Resources/views/Manage/edit.html.twig b/src/Wallabag/GroupBundle/Resources/views/Manage/edit.html.twig
index 791a7a18..7de68c35 100644
--- a/src/Wallabag/GroupBundle/Resources/views/Manage/edit.html.twig
+++ b/src/Wallabag/GroupBundle/Resources/views/Manage/edit.html.twig
@@ -23,14 +23,6 @@
23 </div> 23 </div>
24 </div> 24 </div>
25 25
26 <div class="row">
27 <div class="input-field col s12">
28 {{ form_label(edit_form.users) }}
29 {{ form_errors(edit_form.users) }}
30 {{ form_widget(edit_form.users) }}
31 </div>
32 </div>
33
34 <br/> 26 <br/>
35 27
36 {{ form_widget(edit_form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }} 28 {{ form_widget(edit_form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
diff --git a/src/Wallabag/GroupBundle/Resources/views/Manage/index.html.twig b/src/Wallabag/GroupBundle/Resources/views/Manage/index.html.twig
index ce2a4556..58af3a75 100644
--- a/src/Wallabag/GroupBundle/Resources/views/Manage/index.html.twig
+++ b/src/Wallabag/GroupBundle/Resources/views/Manage/index.html.twig
@@ -11,26 +11,28 @@
11 <div class="input-field col s12"> 11 <div class="input-field col s12">
12 <p class="help">{{ 'group.description'|trans|raw }}</p> 12 <p class="help">{{ 'group.description'|trans|raw }}</p>
13 13
14 <table class="bordered"> 14 {% if groups is not empty %}
15 <thead> 15 <table class="bordered">
16 <tr> 16 <thead>
17 <th>{{ 'group.form.name_label'|trans }}</th> 17 <tr>
18 <th>{{ 'group.form.roles_label'|trans }}</th> 18 <th>{{ 'group.form.name_label'|trans }}</th>
19 <th>{{ 'group.list.actions'|trans }}</th> 19 <th>{{ 'group.form.roles_label'|trans }}</th>
20 </tr> 20 <th>{{ 'group.list.actions'|trans }}</th>
21 </thead> 21 </tr>
22 <tbody> 22 </thead>
23 {% for group in groups %} 23 <tbody>
24 <tr> 24 {% for group in groups %}
25 <td>{{ group.name }}</td> 25 <tr>
26 <td></td> 26 <td>{{ group.name }}</td>
27 <td> 27 <td></td>
28 <a href="{{ path('group_edit', { 'id': group.id }) }}">{{ 'group.list.edit_action'|trans }}</a> 28 <td>
29 </td> 29 <a href="{{ path('group_edit', { 'id': group.id }) }}">{{ 'group.list.edit_action'|trans }}</a>
30 </tr> 30 </td>
31 {% endfor %} 31 </tr>
32 </tbody> 32 {% endfor %}
33 </table> 33 </tbody>
34 </table>
35 {% endif %}
34 <br /> 36 <br />
35 <p> 37 <p>
36 <a href="{{ path('group_new') }}" class="waves-effect waves-light btn">{{ 'group.list.create_new_one'|trans }}</a> 38 <a href="{{ path('group_new') }}" class="waves-effect waves-light btn">{{ 'group.list.create_new_one'|trans }}</a>