瀏覽代碼

Evolution #759: Playlists: public ?

Sevajol Bastien 11 年之前
父節點
當前提交
758da8a2d8

+ 2 - 1
app/Resources/translations/elements.fr.yml 查看文件

133
   create_and_add:        Ajouter ce partage à une nouvelle liste de lecture:
133
   create_and_add:        Ajouter ce partage à une nouvelle liste de lecture:
134
   add_to:                Ou à une liste de lecture existante:
134
   add_to:                Ou à une liste de lecture existante:
135
   create_submit:         Ajouter
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
 {{ form_errors(form.name) }}
2
 {{ form_errors(form.name) }}
3
 {{ form_errors(form.public) }}
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
 <div class="field">
8
 <div class="field">
6
   {{ form_widget(form.name, {'attr':{'class':'niceinput'}}) }}
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
   <input class="niceinput" type="submit" value="{{ 'playlist.create_submit'|trans({}, 'elements') }}" />
10
   <input class="niceinput" type="submit" value="{{ 'playlist.create_submit'|trans({}, 'elements') }}" />
12
 </div>
11
 </div>
13
 
12
 

+ 3 - 0
src/Muzich/PlaylistBundle/Resources/views/Show/prompt.html.twig 查看文件

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

+ 6 - 1
src/Muzich/PlaylistBundle/Resources/views/Show/show.html.twig 查看文件

32
       
32
       
33
     </div>
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
     {% include "MuzichCoreBundle:Tag:tag_cloud.html.twig" with {
42
     {% include "MuzichCoreBundle:Tag:tag_cloud.html.twig" with {
38
       'tags' : playlist.tags
43
       'tags' : playlist.tags

+ 3 - 0
src/Muzich/PlaylistBundle/Resources/views/Show/user.html.twig 查看文件

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