Преглед изворни кода

Modification des menu et ajout de bouton playlists

Sevajol Bastien пре 11 година
родитељ
комит
e212999195

+ 1 - 0
app/Resources/translations/navigationui.fr.yml Прегледај датотеку

6
   my_feeds:             Mes diffusions
6
   my_feeds:             Mes diffusions
7
   return:               Retour
7
   return:               Retour
8
   need_tags:            Demandes
8
   need_tags:            Demandes
9
+  my_playlists:         Mes listes de lecture
9
   
10
   
10
 top_bar:
11
 top_bar:
11
   my_account:           Mon compte
12
   my_account:           Mon compte

+ 3 - 2
app/Resources/translations/users.fr.yml Прегледај датотеку

3
   follow:                       Suivre
3
   follow:                       Suivre
4
   following:                    Suivi
4
   following:                    Suivi
5
   notfollow:                    Ne plus suivre
5
   notfollow:                    Ne plus suivre
6
-  view_favorites:               Voir les favoris
7
-  view_profile:                 Voir le profil
6
+  view_favorites:               Favoris
7
+  view_profile:                 Profil
8
   stop_follow:                  Ne plus suivre
8
   stop_follow:                  Ne plus suivre
9
+  view_playlists:               Listes de lectures
9
   show:
10
   show:
10
     title:                      Diffusions de %name%
11
     title:                      Diffusions de %name%
11
   reputation:
12
   reputation:

+ 2 - 0
app/Resources/translations/userui.fr.yml Прегледај датотеку

141
     submit:                 Enregistrer ces tags
141
     submit:                 Enregistrer ces tags
142
 
142
 
143
 submenu:
143
 submenu:
144
+  my_content:
145
+    title:                 Mes contenus
144
   followed_users:
146
   followed_users:
145
     title:                  Utilisateurs suivis
147
     title:                  Utilisateurs suivis
146
     nouser:                Aucun
148
     nouser:                Aucun

+ 4 - 19
src/Muzich/CoreBundle/Resources/views/Menu/main_menu.html.twig Прегледај датотеку

33
   {% endif %}
33
   {% endif %}
34
   <li class="separator"></li>
34
   <li class="separator"></li>
35
   {% if app.user %}
35
   {% if app.user %}
36
-    <li class="{% if app.request.get('topmenu') == 'showuser' and app.request.get('slug') == app.user.slug %}selected{% endif %}">
37
-      <a href="{{ path('show_user', {'slug': app.user.slug}) }}">
38
-        {{ 'container_menu.my_feeds'|trans({}, 'navigationui') }}
36
+    <li class="{% if app.request.get('topmenu') == 'playlists' and app.request.get('user_slug') == app.user.slug %}selected{% endif %}">
37
+      <a href="{{ path('playlists_user', {'user_slug': app.user.slug}) }}">
38
+        {{ 'container_menu.my_playlists'|trans({}, 'navigationui') }}
39
       </a>
39
       </a>
40
     </li>
40
     </li>
41
   {% else %}
41
   {% else %}
42
     <li>
42
     <li>
43
       <a href="#" class="mustbeconnected">
43
       <a href="#" class="mustbeconnected">
44
-        {{ 'container_menu.my_feeds'|trans({}, 'navigationui') }}
45
-      </a>
46
-    </li>
47
-  {% endif %}
48
-  <li class="separator"></li>
49
-  {% if app.user %}
50
-    {% if his_group is not defined %}{% set his_group = false %}{% endif %}
51
-    <li class="{% if app.request.get('topmenu') == 'mygroups' or his_group == true %}selected{% endif %}">
52
-      <a href="{{ path('groups_own_list') }}" >
53
-        {{ 'network.mygroups'|trans({}, 'navigationui') }}
54
-      </a>
55
-    </li>
56
-  {% else %}
57
-    <li>
58
-      <a href="#" class="mustbeconnected">
59
-        {{ 'network.mygroups'|trans({}, 'navigationui') }}
44
+        {{ 'container_menu.my_playlists'|trans({}, 'navigationui') }}
60
       </a>
45
       </a>
61
     </li>
46
     </li>
62
   {% endif %}
47
   {% endif %}

+ 26 - 0
src/Muzich/CoreBundle/Resources/views/Menu/side_menu.html.twig Прегледај датотеку

5
       
5
       
6
       <a href="" class="top_menu_link">
6
       <a href="" class="top_menu_link">
7
         <div class="blackgradiant">
7
         <div class="blackgradiant">
8
+            {{ 'submenu.my_content.title'|trans({}, 'userui') }}
9
+            <div class="dart"></div>
10
+        </div>
11
+      </a>
12
+      
13
+      <ul class="submenu">
14
+        <li class="sub_menu_element">
15
+          <a href="{{ path('show_user', {'slug': app.user.slug}) }}">
16
+            {{ 'container_menu.my_feeds'|trans({}, 'navigationui') }}
17
+          </a>
18
+        </li>
19
+        <li class="sub_menu_element">
20
+          <a href="{{ path('groups_own_list') }}">
21
+            {{ 'network.mygroups'|trans({}, 'navigationui') }}
22
+          </a>
23
+        </li>
24
+      </ul>
25
+    </li>
26
+      
27
+  </ul>
28
+  
29
+  <ul class="secondarymenu">
30
+    <li class="top_menu_element close">
31
+      
32
+      <a href="" class="top_menu_link">
33
+        <div class="blackgradiant">
8
             {{ 'submenu.followed_users.title'|trans({}, 'userui') }}
34
             {{ 'submenu.followed_users.title'|trans({}, 'userui') }}
9
             <div class="dart"></div>
35
             <div class="dart"></div>
10
         </div>
36
         </div>

+ 4 - 0
src/Muzich/HomeBundle/Resources/views/Show/showUser.html.twig Прегледај датотеку

32
         {{ 'user.view_favorites'|trans({}, 'users') }}
32
         {{ 'user.view_favorites'|trans({}, 'users') }}
33
       </a>
33
       </a>
34
       
34
       
35
+      <a class="button darkbutton" href="{{ path('playlists_user', {'user_slug' : viewed_user.slug}) }}" >
36
+        {{ 'user.view_playlists'|trans({}, 'users') }}
37
+      </a>
38
+      
35
     </div>
39
     </div>
36
     
40
     
37
     <h1>{{ 'user.show.title'|trans({'%name%' : viewed_user.name}, 'users') }}</h1>
41
     <h1>{{ 'user.show.title'|trans({'%name%' : viewed_user.name}, 'users') }}</h1>

+ 1 - 1
src/Muzich/PlaylistBundle/Resources/config/routing.yml Прегледај датотеку

1
 playlists_user:
1
 playlists_user:
2
   pattern: /user/{user_slug}/playlists
2
   pattern: /user/{user_slug}/playlists
3
-  defaults: { _controller: MuzichPlaylistBundle:Show:user }
3
+  defaults: { _controller: MuzichPlaylistBundle:Show:user, topmenu: playlists }
4
 
4
 
5
 playlist:
5
 playlist:
6
   pattern: /user/{user_slug}/playlist/{playlist_id}
6
   pattern: /user/{user_slug}/playlist/{playlist_id}

+ 7 - 4
src/Muzich/PlaylistBundle/Resources/views/Show/show.html.twig Прегледај датотеку

9
     <div class="show_options">
9
     <div class="show_options">
10
       
10
       
11
       <a class="autoplay_playlist button darkbutton" href="{{ path('playlist_datas_for_autoplay', { 'playlist_id' : playlist.id }) }}" >
11
       <a class="autoplay_playlist button darkbutton" href="{{ path('playlist_datas_for_autoplay', { 'playlist_id' : playlist.id }) }}" >
12
-        <img src="{{ asset('/img/1361037350_control_play.png') }}" alt="playlist" />
13
-        <span>{{ 'playlist.read'|trans({}, 'elements') }}</span>
12
+        {{ 'playlist.read'|trans({}, 'elements') }}
14
       </a>
13
       </a>
15
 
14
 
16
       {% if app.user %}
15
       {% if app.user %}
27
         {% endif %}
26
         {% endif %}
28
       {% endif %}
27
       {% endif %}
29
       
28
       
29
+      <a class="button darkbutton" href="{{ path('playlists_user', {'user_slug' : viewed_user.slug}) }}" >
30
+        {{ 'user.view_playlists'|trans({}, 'users') }}
31
+      </a>
32
+      
30
     </div>
33
     </div>
31
     
34
     
32
     <h1>{{ playlist.name }}</h1>
35
     <h1>{{ playlist.name }}</h1>
33
-    
36
+    <!--
34
     <a href="{{ path('playlists_user', { 'user_slug' : playlist.owner.slug }) }}">
37
     <a href="{{ path('playlists_user', { 'user_slug' : playlist.owner.slug }) }}">
35
       {{ 'playlist.gotoplaylists'|trans({ '%user_username%' : playlist.owner.username }, 'elements') }}
38
       {{ 'playlist.gotoplaylists'|trans({ '%user_username%' : playlist.owner.username }, 'elements') }}
36
-    </a>
39
+    </a>-->
37
     
40
     
38
     {% include "MuzichCoreBundle:Tag:tag_cloud.html.twig" with {
41
     {% include "MuzichCoreBundle:Tag:tag_cloud.html.twig" with {
39
       'tags' : playlist.tags
42
       'tags' : playlist.tags