Sevajol Bastien 11 лет назад
Родитель
Сommit
758da8a2d8

+ 2 - 1
app/Resources/translations/elements.fr.yml Просмотреть файл

@@ -133,4 +133,5 @@ playlist:
133 133
   create_and_add:        Ajouter ce partage à une nouvelle liste de lecture:
134 134
   add_to:                Ou à une liste de lecture existante:
135 135
   create_submit:         Ajouter
136
-  public_label:          Publique
136
+  public_label:          Rendre cette liste publique
137
+  public_word:           (publique)

+ 3 - 4
src/Muzich/PlaylistBundle/Resources/views/Show/form.html.twig Просмотреть файл

@@ -2,12 +2,11 @@
2 2
 {{ form_errors(form.name) }}
3 3
 {{ form_errors(form.public) }}
4 4
 
5
+{{ form_widget(form.public) }}
6
+<label for="playlist_public">{{ 'playlist.public_label'|trans({}, 'elements') }}</label>
7
+  
5 8
 <div class="field">
6 9
   {{ form_widget(form.name, {'attr':{'class':'niceinput'}}) }}
7
-  
8
-  {{ form_widget(form.public) }}
9
-  <label for="playlist_public">{{ 'playlist.public_label'|trans({}, 'elements') }}</label>
10
-  
11 10
   <input class="niceinput" type="submit" value="{{ 'playlist.create_submit'|trans({}, 'elements') }}" />
12 11
 </div>
13 12
 

+ 3 - 0
src/Muzich/PlaylistBundle/Resources/views/Show/prompt.html.twig Просмотреть файл

@@ -31,6 +31,9 @@
31 31
           >
32 32
             {{ playlist.name }}
33 33
           </a>
34
+          {% if playlist.public %}
35
+            {{ 'playlist.public_word'|trans({}, 'elements') }}
36
+          {% endif %}
34 37
         </li>
35 38
       {% endfor %}
36 39
     </ul>

+ 6 - 1
src/Muzich/PlaylistBundle/Resources/views/Show/show.html.twig Просмотреть файл

@@ -32,7 +32,12 @@
32 32
       
33 33
     </div>
34 34
     
35
-    <h1>{{ playlist.name }}</h1>
35
+    <h1>
36
+      {{ playlist.name }}
37
+      {% if playlist.public %}
38
+        {{ 'playlist.public_word'|trans({}, 'elements') }}
39
+      {% endif %}
40
+    </h1>
36 41
     
37 42
     {% include "MuzichCoreBundle:Tag:tag_cloud.html.twig" with {
38 43
       'tags' : playlist.tags

+ 3 - 0
src/Muzich/PlaylistBundle/Resources/views/Show/user.html.twig Просмотреть файл

@@ -92,6 +92,9 @@
92 92
             >
93 93
               {{ playlist.name }}
94 94
             </a>
95
+            {% if app.user|userId == playlist.owner.id %}
96
+              {{ 'playlist.public_word'|trans({}, 'elements') }}
97
+            {% endif %}
95 98
           </div>
96 99
           
97 100