Browse Source

inte suite

Sevajol Bastien 11 years ago
parent
commit
0468d24d62
51 changed files with 968 additions and 567 deletions
  1. 2 2
      app/Resources/FOSUserBundle/translations/FOSUserBundle.fr.yml
  2. 2 0
      app/Resources/translations/groups.fr.yml
  3. 1 1
      app/Resources/translations/navigationui.fr.yml
  4. 32 2
      app/Resources/translations/userui.fr.yml
  5. 18 2
      src/Muzich/CoreBundle/Controller/CoreController.php
  6. 1 2
      src/Muzich/CoreBundle/Controller/ElementController.php
  7. 20 15
      src/Muzich/CoreBundle/Controller/SearchController.php
  8. 3 3
      src/Muzich/CoreBundle/Resources/config/routing.yml
  9. 13 11
      src/Muzich/CoreBundle/Resources/views/GlobalSearch/form.html.twig
  10. 53 51
      src/Muzich/CoreBundle/Resources/views/GlobalSearch/results.html.twig
  11. 14 12
      src/Muzich/CoreBundle/Resources/views/Info/container.html.twig
  12. 3 3
      src/Muzich/CoreBundle/Resources/views/Language/languages.html.twig
  13. 90 0
      src/Muzich/CoreBundle/Resources/views/Menu/side_menu.html.twig
  14. 12 16
      src/Muzich/CoreBundle/Resources/views/SearchElement/element.html.twig
  15. 9 1
      src/Muzich/CoreBundle/Resources/views/SearchElement/more_button.html.twig
  16. 1 1
      src/Muzich/CoreBundle/Resources/views/Tag/tagFavoritesForm.html.twig
  17. 1 2
      src/Muzich/CoreBundle/Resources/views/Tag/tagsList.favorite.html.twig
  18. 116 164
      src/Muzich/CoreBundle/Resources/views/layout.html.twig
  19. 5 0
      src/Muzich/CoreBundle/Searcher/ElementSearcher.php
  20. 30 28
      src/Muzich/CoreBundle/Searcher/ElementSearcherQueryBuilder.php
  21. 1 2
      src/Muzich/CoreBundle/Tests/Controller/HomeControllerTest.php
  22. 18 5
      src/Muzich/CoreBundle/lib/Controller.php
  23. 2 3
      src/Muzich/FavoriteBundle/Controller/FavoriteController.php
  24. 1 1
      src/Muzich/FavoriteBundle/Resources/config/routing.yml
  25. 24 21
      src/Muzich/FavoriteBundle/Resources/views/Favorite/myList.html.twig
  26. 29 27
      src/Muzich/FavoriteBundle/Resources/views/Favorite/userList.html.twig
  27. 1 1
      src/Muzich/GroupBundle/Resources/config/routing.yml
  28. 16 9
      src/Muzich/GroupBundle/Resources/views/Default/edit.html.twig
  29. 18 10
      src/Muzich/GroupBundle/Resources/views/Default/myList.html.twig
  30. 5 5
      src/Muzich/GroupBundle/Resources/views/Form/form.html.twig
  31. 2 3
      src/Muzich/HomeBundle/Controller/ShowController.php
  32. 2 2
      src/Muzich/HomeBundle/Resources/config/routing.yml
  33. 1 1
      src/Muzich/HomeBundle/Resources/views/Show/showGroup.html.twig
  34. 5 1
      src/Muzich/HomeBundle/Resources/views/Show/showUser.html.twig
  35. 11 15
      src/Muzich/IndexBundle/Resources/views/Index/index.html.twig
  36. 14 21
      src/Muzich/UserBundle/Controller/EventController.php
  37. 47 0
      src/Muzich/UserBundle/Resources/views/Event/elements.html.twig
  38. 8 8
      src/Muzich/UserBundle/Resources/views/Registration/register.html.twig
  39. 16 10
      src/Muzich/UserBundle/Resources/views/Security/login.html.twig
  40. 1 0
      src/Muzich/UserBundle/Resources/views/User/account.html.twig
  41. 3 2
      src/Muzich/UserBundle/Resources/views/User/start.html.twig
  42. 16 16
      web/bundles/muzichcore/css/old.css
  43. 82 54
      web/bundles/muzichcore/js/muzich.js
  44. 2 2
      web/bundles/muzichgroups/css/groups.css
  45. 3 3
      web/bundles/muzichgroups/js/groups.js
  46. 6 6
      web/bundles/muzichhome/css/home.css
  47. 2 2
      web/bundles/muzichhome/js/home.js
  48. 3 3
      web/bundles/muzichindex/css/index.css
  49. 4 0
      web/bundles/muzichindex/js/index.js
  50. 199 18
      web/css/main.css
  51. BIN
      web/img/header_menu_separator.png

+ 2 - 2
app/Resources/FOSUserBundle/translations/FOSUserBundle.fr.yml View File

14
 # Security
14
 # Security
15
 security:
15
 security:
16
     login:
16
     login:
17
-        username: "Nom d'utilisateur:"
18
-        password: "Mot de passe:"
17
+        username: "Identifiant (adresse email)"
18
+        password: "Mot de passe"
19
         remember_me: Rester connecté
19
         remember_me: Rester connecté
20
         submit: Connexion
20
         submit: Connexion
21
 
21
 

+ 2 - 0
app/Resources/translations/groups.fr.yml View File

12
   notfollow:                    Ne plus suivre
12
   notfollow:                    Ne plus suivre
13
   remove:
13
   remove:
14
     link:                       Supprimer le groupe
14
     link:                       Supprimer le groupe
15
+  form:
16
+    submit:                     Enregistrer le groupe

+ 1 - 1
app/Resources/translations/navigationui.fr.yml View File

8
   need_tags:            Demandes
8
   need_tags:            Demandes
9
   
9
   
10
 top_bar:
10
 top_bar:
11
-  my_account:           Mon compte (%name%)
11
+  my_account:           Mon compte
12
   logout:               Déconnexion
12
   logout:               Déconnexion
13
   
13
   
14
 network:
14
 network:

+ 32 - 2
app/Resources/translations/userui.fr.yml View File

2
   remember_me:
2
   remember_me:
3
     label:     Rester connecté
3
     label:     Rester connecté
4
 
4
 
5
+security:
6
+  login:
7
+    username: "Identifiant (adresse email)"
8
+    password: "Mot de passe"
9
+
5
 start:
10
 start:
6
   title:       Inscription terminé
11
   title:       Inscription terminé
7
   titleh2:     Bienvenue sur Muzich !
12
   titleh2:     Bienvenue sur Muzich !
72
     display_more:           Des tags ont été cachés, cliquez ici pour les afficher tous
77
     display_more:           Des tags ont été cachés, cliquez ici pour les afficher tous
73
     filter:
78
     filter:
74
       text:                 Chercher un tag parmis la liste
79
       text:                 Chercher un tag parmis la liste
75
-           
80
+  favorites:
81
+    submit:                 Enregistrer ces tags
82
+
83
+submenu:
84
+  followed_users:
85
+    title:                  Utilisateurs suivis
86
+    nouser:                Aucun
87
+  followed_groups:
88
+    title:                  Groupes suivis
89
+    nouser:                Aucun
90
+  follower_users:
91
+    title:                  Suivis par
92
+    nouser:                Aucun
93
+
76
 filter:
94
 filter:
77
   network: "Résultats de "
95
   network: "Résultats de "
78
   submit:  Filtrer
96
   submit:  Filtrer
172
                          Les utilisateurs ayant partagés leurs découvertes ont
190
                          Les utilisateurs ayant partagés leurs découvertes ont
173
                          demandé de l'aide pour tagger correctement leurs partages.
191
                          demandé de l'aide pour tagger correctement leurs partages.
174
                          Gagnez en réputation en leurs proposants les tags qui conviennent !
192
                          Gagnez en réputation en leurs proposants les tags qui conviennent !
193
+register:
194
+  title:                 Création d'un compte
195
+registration:
196
+  submit:                Procéder a l'inscription
175
 
197
 
176
 autoplay:
198
 autoplay:
177
-  limitations_players:   La lecture automatique ne supporte actuellement que les lecteurs youtube, soundcloud et jamendo.
199
+  limitations_players:   La lecture automatique ne supporte actuellement que les lecteurs youtube, soundcloud et jamendo.
200
+
201
+events:
202
+  view:
203
+    title:
204
+      comments:          Commentaires
205
+      nvxfav:            Mis en favoris
206
+      tagsprop:          Proposition de tags
207
+      

+ 18 - 2
src/Muzich/CoreBundle/Controller/CoreController.php View File

680
     
680
     
681
     $html = $this->render('MuzichCoreBundle:SearchElement:default.html.twig', array(
681
     $html = $this->render('MuzichCoreBundle:SearchElement:default.html.twig', array(
682
       'user'        => $this->getUser(),
682
       'user'        => $this->getUser(),
683
-      'elements'    => $es->getElements($this->getDoctrine(), $this->getUserId()),
684
-      'invertcolor' => false
683
+      'elements'    => $es->getElements($this->getDoctrine(), $this->getUserId())
685
     ))->getContent();
684
     ))->getContent();
686
 
685
 
687
     return $this->jsonResponse(array(
686
     return $this->jsonResponse(array(
703
     )));
702
     )));
704
   }
703
   }
705
   
704
   
705
+  public function renderSideMenuAction()
706
+  {
707
+    $user = $this->getUser(true, array('join' => array(
708
+      'followeds_users', 'followers_users', 'followeds_groups'
709
+    )), true);
710
+    
711
+    
712
+    return $this->render(
713
+      'MuzichCoreBundle:Menu:side_menu.html.twig', 
714
+      array(
715
+        'followeds_users'  => $user->getFollowedsUsers(),
716
+        'followeds_groups' =>  $user->getFollowedGroups(),
717
+        'followers_users'  => $user->getFollowersUsers()
718
+      )
719
+    );
720
+  }
721
+  
706
 }
722
 }

+ 1 - 2
src/Muzich/CoreBundle/Controller/ElementController.php View File

412
     // On en fait un rendu graphique
412
     // On en fait un rendu graphique
413
     $html_elements = $this->render('MuzichCoreBundle:SearchElement:default.html.twig', array(
413
     $html_elements = $this->render('MuzichCoreBundle:SearchElement:default.html.twig', array(
414
       'user'        => $this->getUser(),
414
       'user'        => $this->getUser(),
415
-      'elements'    => $elements,
416
-      'invertcolor' => false
415
+      'elements'    => $elements
417
     ))->getContent();
416
     ))->getContent();
418
     
417
     
419
     // On calcule le nouveau compte de nouveaux
418
     // On calcule le nouveau compte de nouveaux

+ 20 - 15
src/Muzich/CoreBundle/Controller/SearchController.php View File

21
    * par defalt de la liste d'élément.
21
    * par defalt de la liste d'élément.
22
    * 
22
    * 
23
    * @param Collection $elements
23
    * @param Collection $elements
24
-   * @param boolean $invertcolors
25
    * @param sring $message
24
    * @param sring $message
25
+   * @param string $session_id
26
    * @return Response 
26
    * @return Response 
27
    */
27
    */
28
-  protected function searchElementsMore($elements, $invertcolors, $message)
28
+  protected function searchElementsMore($elements, $message, $session_id)
29
   {
29
   {
30
     
30
     
31
+    $data = array();
31
     $end = (($count = count($elements)) < $this->container->getParameter('search_ajax_more'));
32
     $end = (($count = count($elements)) < $this->container->getParameter('search_ajax_more'));
32
     $html = '';
33
     $html = '';
33
     if ($count)
34
     if ($count)
34
     {
35
     {
35
       $html = $this->render('MuzichCoreBundle:SearchElement:default.html.twig', array(
36
       $html = $this->render('MuzichCoreBundle:SearchElement:default.html.twig', array(
36
         'user'        => $this->getUser(),
37
         'user'        => $this->getUser(),
37
-        'elements'    => $elements,
38
-        'invertcolor' => $invertcolors
38
+        'elements'    => $elements
39
       ))->getContent();
39
       ))->getContent();
40
+      
41
+      $data['more_link_href'] = $this->generateUrl('search_elements_more', array(
42
+        'id_limit'   => $elements[count($elements)-1]->getId(),
43
+        'session_id' => $session_id
44
+      ));
40
     }
45
     }
41
     
46
     
42
     return $this->jsonResponse(array(
47
     return $this->jsonResponse(array(
44
       'count'   => $count,
49
       'count'   => $count,
45
       'message' => $message,
50
       'message' => $message,
46
       'html'    => $html,
51
       'html'    => $html,
47
-      'end'     => $end
52
+      'end'     => $end,
53
+      'data'    => $data
48
     ));
54
     ));
49
   }
55
   }
50
   
56
   
53
    * que les paramétres en session). 
59
    * que les paramétres en session). 
54
    * 
60
    * 
55
    */
61
    */
56
-  public function searchElementsAction($id_limit = null, $invertcolors = false)
62
+  public function searchElementsAction($id_limit = null, $session_id = null)
57
   {
63
   {
58
     if (($response = $this->mustBeConnected()))
64
     if (($response = $this->mustBeConnected()))
59
     {
65
     {
61
     }
67
     }
62
     
68
     
63
     $request = $this->getRequest();
69
     $request = $this->getRequest();
64
-    $search_object = $this->getElementSearcher();
70
+    $search_object = $this->getElementSearcher(null, false, $session_id);
65
     
71
     
66
     $search_form = $this->getSearchForm($search_object);
72
     $search_form = $this->getSearchForm($search_object);
67
     
73
     
89
     }
95
     }
90
     
96
     
91
     if ($this->getRequest()->isXmlHttpRequest())
97
     if ($this->getRequest()->isXmlHttpRequest())
92
-    { 
98
+    {
93
       if ($form_submited && !$id_limit)
99
       if ($form_submited && !$id_limit)
94
       {
100
       {
95
         $message = $this->trans(
101
         $message = $this->trans(
112
       }
118
       }
113
       
119
       
114
       // template qui apelle doSearchElementsAction 
120
       // template qui apelle doSearchElementsAction 
115
-      $search = $this->getElementSearcher();
116
-      $search->update(array(
121
+      $search_object->update(array(
117
         'count'    => $this->container->getParameter('search_ajax_more'),
122
         'count'    => $this->container->getParameter('search_ajax_more'),
118
         'id_limit' => $id_limit
123
         'id_limit' => $id_limit
119
       ));
124
       ));
120
-      $elements = $search->getElements($this->getDoctrine(), $this->getUserId());
121
       
125
       
122
-      return $this->searchElementsMore($elements, $invertcolors, $message);      
126
+      $elements = $search_object->getElements($this->getDoctrine(), $this->getUserId());
127
+      
128
+      return $this->searchElementsMore($elements, $message, $session_id);      
123
     }
129
     }
124
     else
130
     else
125
     {
131
     {
134
    * @param string $type
140
    * @param string $type
135
    * @param string $object_id
141
    * @param string $object_id
136
    * @param int $id_limit
142
    * @param int $id_limit
137
-   * @param boolean $invertcolors
138
    * @return Response 
143
    * @return Response 
139
    */
144
    */
140
-  public function searchElementsShowAction($type, $object_id, $id_limit, $invertcolors)
145
+  public function searchElementsShowAction($type, $object_id, $id_limit)
141
   {
146
   {
142
     if ($this->getRequest()->isXmlHttpRequest())
147
     if ($this->getRequest()->isXmlHttpRequest())
143
     {
148
     {
173
 
178
 
174
       $elements = $search->getElements($this->getDoctrine(), $this->getUserId());
179
       $elements = $search->getElements($this->getDoctrine(), $this->getUserId());
175
       
180
       
176
-      return $this->searchElementsMore($elements, $invertcolors,
181
+      return $this->searchElementsMore($elements,
177
         $this->trans(
182
         $this->trans(
178
           'elements.ajax.more.noelements', 
183
           'elements.ajax.more.noelements', 
179
           array(), 
184
           array(), 

+ 3 - 3
src/Muzich/CoreBundle/Resources/config/routing.yml View File

5
   defaults: { _controller: MuzichCoreBundle:Search:searchElements }
5
   defaults: { _controller: MuzichCoreBundle:Search:searchElements }
6
   
6
   
7
 search_elements_more:
7
 search_elements_more:
8
-  pattern:  /search-elements/{id_limit}/{invertcolors}
9
-  defaults: { _controller: MuzichCoreBundle:Search:searchElements }
8
+  pattern:  /search-elements/{id_limit}/{session_id}
9
+  defaults: { _controller: MuzichCoreBundle:Search:searchElements, session_id: null }
10
    
10
    
11
 search_elements_show_more_empty:
11
 search_elements_show_more_empty:
12
   pattern:  /search-elements/show/{type}/{object_id}
12
   pattern:  /search-elements/show/{type}/{object_id}
13
   defaults: { _controller: MuzichCoreBundle:Search:searchElementsShow }
13
   defaults: { _controller: MuzichCoreBundle:Search:searchElementsShow }
14
     
14
     
15
 search_elements_show_more:
15
 search_elements_show_more:
16
-  pattern:  /search-elements/show/{type}/{object_id}/{id_limit}/{invertcolors}
16
+  pattern:  /search-elements/show/{type}/{object_id}/{id_limit}
17
   defaults: { _controller: MuzichCoreBundle:Search:searchElementsShow }
17
   defaults: { _controller: MuzichCoreBundle:Search:searchElementsShow }
18
    
18
    
19
 global_search_elements_empty:
19
 global_search_elements_empty:

+ 13 - 11
src/Muzich/CoreBundle/Resources/views/GlobalSearch/form.html.twig View File

1
-<form action="{{ path('global_search') }}" method="post" {{ form_enctype(form) }}>
1
+<div class="seachboxcontainer">
2
+  <form action="{{ path('global_search') }}" method="post" {{ form_enctype(form) }}>
2
     
3
     
3
-  {% form_theme form 'MuzichCoreBundle:Form:errors.html.twig' %}
4
-  {{ form_errors(form) }}
5
-
6
-  {{ form_errors(form.string) }}
7
-  {{ form_widget(form.string) }}
8
-  <input type="submit" class="button" value="{{ 'search.form.submit_value'|trans({}, 'network') }}" />
9
-  
10
-  {{ form_rest(form) }}
11
-
12
-</form>
4
+    {% form_theme form 'MuzichCoreBundle:Form:errors.html.twig' %}
5
+    {{ form_errors(form) }}
6
+    {{ form_errors(form.string) }}
7
+    {{ form_widget(form.string) }}
8
+    {{ form_rest(form) }}
9
+    
10
+    <a href="#" class="global_search_link">
11
+      <img src="{{ asset('/img/icon_search.png') }}" alt="search" />
12
+    </a>
13
+  </form>
14
+</div>

+ 53 - 51
src/Muzich/CoreBundle/Resources/views/GlobalSearch/results.html.twig View File

1
 {% extends "MuzichCoreBundle::layout.html.twig" %}
1
 {% extends "MuzichCoreBundle::layout.html.twig" %}
2
 
2
 
3
 {% block title %}Recherche{% endblock %}
3
 {% block title %}Recherche{% endblock %}
4
+{% block mainbox_classes %}mainbox_padding{% endblock %}
4
 
5
 
5
 {% block main_content %}
6
 {% block main_content %}
6
 
7
 
7
-  {% include "MuzichCoreBundle:Menu:containerMenu.html.twig" with {'active': null} %}
8
-  
9
   <div id="results_search_form">
8
   <div id="results_search_form">
10
     {% include "MuzichCoreBundle:GlobalSearch:form.html.twig" with {'form': form } %}
9
     {% include "MuzichCoreBundle:GlobalSearch:form.html.twig" with {'form': form } %}
11
   </div>
10
   </div>
12
   
11
   
13
-  {% if results.users|length or results.groups|length or results.elements|length %}
12
+  <div class="global_search_results">
13
+    {% if results.users|length or results.groups|length or results.elements|length %}
14
+    
15
+      {% if results.users %}
14
   
16
   
15
-    {% if results.users %}
16
-
17
-      <b>{{ 'search.users'|trans({}, 'network') }}</b>
18
-      
19
-      <ul id="search_users" class="inline">
20
-      {% for user in results.users %} 
21
-        <li>
22
-          <a href="{{ path('show_user', { 'slug': user.slug }) }}">{{ user.username }}</a>
23
-        </li>
24
-      {% endfor %}
25
-      </ul>
26
-
27
-    {% endif %}
17
+        <b>{{ 'search.users'|trans({}, 'network') }}</b>
18
+        
19
+        <ul id="search_users" class="inline">
20
+        {% for user in results.users %} 
21
+          <li>
22
+            <a href="{{ path('show_user', { 'slug': user.slug }) }}">{{ user.username }}</a>
23
+          </li>
24
+        {% endfor %}
25
+        </ul>
28
   
26
   
29
-    {% if results.groups %}
30
-
31
-      <b>{{ 'search.groups'|trans({}, 'network') }}</b>
32
-      
33
-      <ul id="search_groups" class="inline">
34
-      {% for group in results.groups %} 
35
-        <li>
36
-          <a href="{{ path('show_group', { 'slug': group.slug }) }}">{{ group.name }}</a>
37
-        </li>
38
-      {% endfor %}
39
-      </ul>
40
-
41
-    {% endif %}
27
+      {% endif %}
28
+    
29
+      {% if results.groups %}
42
   
30
   
43
-    {% if results.elements %}
44
-
45
-      <b>{{ 'search.elements'|trans({}, 'network') }}</b>
46
-      
47
-      {% include "MuzichCoreBundle:SearchElement:default.html.twig" with {
48
-        'noelements_filter' : true,
49
-        'elements'          : results.elements
50
-      }%}
51
-      
52
-      {% include "MuzichCoreBundle:SearchElement:more_button.html.twig" with {
53
-        'display_more_button' : display_more_button,
54
-        'elements_length'     : results.elements|length,
55
-        'more_path'           : 'global_search_elements_empty'
56
-      }%}
57
-      
31
+        <b>{{ 'search.groups'|trans({}, 'network') }}</b>
32
+        
33
+        <ul id="search_groups" class="inline">
34
+        {% for group in results.groups %} 
35
+          <li>
36
+            <a href="{{ path('show_group', { 'slug': group.slug }) }}">{{ group.name }}</a>
37
+          </li>
38
+        {% endfor %}
39
+        </ul>
40
+  
41
+      {% endif %}
42
+    
43
+      {% if results.elements %}
44
+  
45
+        <b>{{ 'search.elements'|trans({}, 'network') }}</b>
46
+        
47
+        {% include "MuzichCoreBundle:SearchElement:default.html.twig" with {
48
+          'noelements_filter' : true,
49
+          'elements'          : results.elements
50
+        }%}
51
+        
52
+        {% include "MuzichCoreBundle:SearchElement:more_button.html.twig" with {
53
+          'display_more_button' : display_more_button,
54
+          'elements_length'     : results.elements|length,
55
+          'more_path'           : 'global_search_elements_empty'
56
+        }%}
57
+        
58
+      {% endif %}
59
+        
60
+    {% elseif app.request.getMethod == 'POST' %}
61
+        <p>
62
+          {{ 'global_search.no_results'|trans({}, 'userui') }}
63
+        </p>
58
     {% endif %}
64
     {% endif %}
59
-      
60
-  {% elseif app.request.getMethod == 'POST' %}
61
-      <p>
62
-        {{ 'global_search.no_results'|trans({}, 'userui') }}
63
-      </p>
64
-  {% endif %}
65
-
65
+  
66
+  </div>
67
+  
66
 {% endblock %}
68
 {% endblock %}

+ 14 - 12
src/Muzich/CoreBundle/Resources/views/Info/container.html.twig View File

27
     </a>
27
     </a>
28
   </li>
28
   </li>
29
 </ul>
29
 </ul>
30
-<ul class="footer_pages_links footer_pages_links_user">
31
-  <li>
32
-    <a href="" >
33
-      Profil
34
-    </a>
35
-  </li>
36
-  <li>
37
-    <a href="" >
38
-      Paramètres
39
-    </a>
40
-  </li>
41
-</ul>
30
+{% if app.user %}
31
+  <ul class="footer_pages_links footer_pages_links_user">
32
+    <li>
33
+      <a href="" >
34
+        Profil
35
+      </a>
36
+    </li>
37
+    <li>
38
+      <a href="" >
39
+        Paramètres
40
+      </a>
41
+    </li>
42
+  </ul>
43
+{% endif %}

+ 3 - 3
src/Muzich/CoreBundle/Resources/views/Language/languages.html.twig View File

1
-<div id="choose_language">
2
-  <a href="{{ path('change_language', {'language' : 'fr'}) }}">fr</a> |
3
-  <a href="{{ path('change_language', {'language' : 'en'}) }}">en</a>
1
+<div id="languages">
2
+  <a href="{{ path('change_language', {'language' : 'fr'}) }}">FR</a>
3
+  <a href="{{ path('change_language', {'language' : 'en'}) }}">EN</a>
4
 </div>
4
 </div>

+ 90 - 0
src/Muzich/CoreBundle/Resources/views/Menu/side_menu.html.twig View File

1
+<div id="secondarymenu" class="nicebox">
2
+  
3
+  <ul class="secondarymenu">
4
+    <li class="top_menu_element close">
5
+      
6
+      <a href="" class="top_menu_link">
7
+        <div class="blackgradiant">
8
+            {{ 'submenu.followed_users.title'|trans({}, 'userui') }}
9
+            <div class="dart"></div>
10
+        </div>
11
+      </a>
12
+      
13
+      <ul class="submenu">
14
+        {% if followeds_users %}
15
+          {% for user in followeds_users %}
16
+            <li class="sub_menu_element">
17
+              <a href="{{ path('show_user', { 'slug': user.slug }) }}">
18
+                {{ user.username }}
19
+              </a>
20
+            </li>
21
+          {% endfor %}
22
+        {% else %}
23
+          <li class="sub_menu_element">
24
+            {{ 'submenu.followed_users.nouser'|trans({}, 'userui') }}
25
+          </li>
26
+        {% endif %}
27
+      </ul>
28
+    </li>
29
+      
30
+  </ul>
31
+  
32
+  <ul class="secondarymenu">
33
+    <li class="top_menu_element close">
34
+      
35
+      <a href="" class="top_menu_link">
36
+        <div class="blackgradiant">
37
+            {{ 'submenu.followed_groups.title'|trans({}, 'userui') }}
38
+            <div class="dart"></div>
39
+        </div>
40
+      </a>
41
+      
42
+      <ul class="submenu">
43
+        {% if followeds_groups %}
44
+          {% for group in followeds_groups %}
45
+            <li class="sub_menu_element">
46
+              <a href="{{ path('show_group', { 'slug': group.slug }) }}">
47
+                {{ group.name }}
48
+              </a>
49
+            </li>
50
+          {% endfor %}
51
+        {% else %}
52
+          <li class="sub_menu_element">
53
+            {{ 'submenu.followed_groups.nouser'|trans({}, 'userui') }}
54
+          </li>
55
+        {% endif %}
56
+      </ul>
57
+    </li>
58
+      
59
+  </ul>
60
+  
61
+  <ul class="secondarymenu">
62
+    <li class="top_menu_element close">
63
+      
64
+      <a href="" class="top_menu_link">
65
+        <div class="blackgradiant">
66
+            {{ 'submenu.follower_users.title'|trans({}, 'userui') }}
67
+            <div class="dart"></div>
68
+        </div>
69
+      </a>
70
+      
71
+      <ul class="submenu">
72
+        {% if followers_users %}
73
+          {% for user in followers_users %}
74
+            <li class="sub_menu_element">
75
+              <a href="{{ path('show_user', { 'slug': user.slug }) }}">
76
+                {{ user.username }}
77
+              </a>
78
+            </li>
79
+          {% endfor %}
80
+        {% else %}
81
+          <li class="sub_menu_element">
82
+            {{ 'submenu.follower_users.nouser'|trans({}, 'userui') }}
83
+          </li>
84
+        {% endif %}
85
+      </ul>
86
+    </li>
87
+      
88
+  </ul>
89
+  
90
+</div>

+ 12 - 16
src/Muzich/CoreBundle/Resources/views/SearchElement/element.html.twig View File

80
       
80
       
81
     </td>
81
     </td>
82
     <td class="element_content">
82
     <td class="element_content">
83
-      
84
-      <span class="element_name">
85
-        {% if element.embed %}
86
-          <a href="#" class="element_open element_name_embed_open_link">
87
-            {{ element.name }}
88
-          </a>
89
-        {% else %}
90
-          <a href="{{ element.url }}" class="element_open" target="_blank">
91
-            {{ element.name }}
92
-          </a>
93
-        {% endif %}
94
-      </span> 
95
-      
83
+            
96
       <ul class="element_links_actions" class="gradient">
84
       <ul class="element_links_actions" class="gradient">
97
         <li class="element_link">
85
         <li class="element_link">
98
           <a title="{{ 'element.link'|trans({}, 'elements') }}" class="element_link" href="{{ element.url }}" target="_blank">
86
           <a title="{{ 'element.link'|trans({}, 'elements') }}" class="element_link" href="{{ element.url }}" target="_blank">
166
         
154
         
167
       </ul>
155
       </ul>
168
       
156
       
169
-      
170
-      
171
-      
157
+      <span class="element_name">
158
+        {% if element.embed %}
159
+          <a href="#" class="element_open element_name_embed_open_link">
160
+            {{ element.name }}
161
+          </a>
162
+        {% else %}
163
+          <a href="{{ element.url }}" class="element_open" target="_blank">
164
+            {{ element.name }}
165
+          </a>
166
+        {% endif %}
167
+      </span>
172
       
168
       
173
       <br />
169
       <br />
174
       {% autoescape false %}
170
       {% autoescape false %}

+ 9 - 1
src/Muzich/CoreBundle/Resources/views/SearchElement/more_button.html.twig View File

2
   <img class="elements_more_loader" style="display: none;" src="{{ asset('/bundles/muzichcore/img/ajax-loader.gif') }}" alt="loading" />
2
   <img class="elements_more_loader" style="display: none;" src="{{ asset('/bundles/muzichcore/img/ajax-loader.gif') }}" alt="loading" />
3
 </div>
3
 </div>
4
 
4
 
5
+{% if more_path_params is not defined %}
6
+  {% set more_path_params = {} %}
7
+{% endif %}
8
+
9
+{% if link_class is not defined %}
10
+  {% set link_class = '' %}
11
+{% endif %}
12
+
5
 {% if display_more_button and elements_length %} 
13
 {% if display_more_button and elements_length %} 
6
-  <a href="{{ path(more_path) }}" class="elements_more">
14
+  <a href="{{ path(more_path, more_path_params) }}" class="elements_more {{ link_class }}">
7
     <div>
15
     <div>
8
       {{ 'more'|trans({}, 'userui') }}
16
       {{ 'more'|trans({}, 'userui') }}
9
     </div>
17
     </div>

+ 1 - 1
src/Muzich/CoreBundle/Resources/views/Tag/tagFavoritesForm.html.twig View File

11
 
11
 
12
   {{ form_row(form._token) }}
12
   {{ form_row(form._token) }}
13
 
13
 
14
-  <input type="submit" class="button" />
14
+  <input type="submit" class="button" value="{{ 'tags.favorites.submit'|trans([], 'userui') }}" />
15
 </form>
15
 </form>

+ 1 - 2
src/Muzich/CoreBundle/Resources/views/Tag/tagsList.favorite.html.twig View File

11
   <ul id="favorite_tags">
11
   <ul id="favorite_tags">
12
     {% for key, tag in tags %}
12
     {% for key, tag in tags %}
13
       <li class="{{ css_list_length_class(key, tags|length) }}" {% if loop.index0 > cloud_tags_limit_to_display %}style="display: none;"{% endif %}>
13
       <li class="{{ css_list_length_class(key, tags|length) }}" {% if loop.index0 > cloud_tags_limit_to_display %}style="display: none;"{% endif %}>
14
-        <a id="filtering_tag_{{ tag.id }}" href="#" class="button tag">
14
+        <a id="filtering_tag_{{ tag.id }}" href="#" class="tag">
15
           {{ tag.name }}
15
           {{ tag.name }}
16
         </a>
16
         </a>
17
       </li>
17
       </li>
24
       {{ 'tags.cloud.display_more'|trans({}, 'userui') }}
24
       {{ 'tags.cloud.display_more'|trans({}, 'userui') }}
25
     </a>
25
     </a>
26
   {% endif %}
26
   {% endif %}
27
-  
28
 {% endif %}
27
 {% endif %}

+ 116 - 164
src/Muzich/CoreBundle/Resources/views/layout.html.twig View File

172
     
172
     
173
   </div>
173
   </div>
174
   
174
   
175
-    <header id="header">
176
-      <hgroup>
177
-        <ul id="parameters">
178
-          <li>
179
-            <a href="" class="languages">
180
-              FR
181
-            </a>
182
-          </li>
183
-          <li>
184
-            <a href="">
185
-              <img src="{{ asset('img/header_icon_params.png') }}" alt="parameters" />
186
-            </a>
187
-          </li>
188
-        </ul>
189
-        <a id="header_logo" href="{{ path('index') }}" title="">
190
-          <img src="{{ asset('img/header_logo.png') }}" alt="logo" />
191
-        </a>
192
-        <ul id="register_and_login">
193
-          <li>
194
-            <a href="" class="left">
195
-              Devenir membre
196
-            </a>
197
-          </li>
198
-          <li>
199
-            <a href="" class="right">
200
-              Connexion
201
-            </a>
202
-          </li>
203
-        </ul>
204
-        <ul id="header_menu">
205
-          
206
-          {% if network_public is not defined %}
207
-            {% set network_public = '' %}
208
-          {% endif %}
209
-          
210
-          <li class="{% if network_public == '1' and not ids_display %}selected{% endif %}">
211
-            <a href="{{ path('home') }}" class="all_network">
212
-              {{ 'filter.network_all'|trans({}, 'userui') }}
213
-            </a>
214
-          </li>
215
-          <li class="separator"></li>
216
-          <li class="{% if network_public == '0' and not ids_display %}selected{% endif %}">
217
-            <a href="{{ path('home') }}" class="my_network" >
218
-              {{ 'filter.network_my'|trans({}, 'userui') }}
219
-            </a>
220
-          </li>
221
-          <li class="separator"></li>
222
-          <li>
223
-            <a href="{{ path('show_user', {'slug': app.user.slug}) }}">
224
-              {{ 'container_menu.my_feeds'|trans({}, 'navigationui') }}
225
-            </a>
226
-          </li>
227
-          <li class="separator"></li>
228
-          <li>
229
-            <a href="{{ path('groups_own_list') }}" >
230
-              {{ 'network.mygroups'|trans({}, 'navigationui') }}
231
-            </a>
232
-          </li>
233
-          <li class="separator"></li>
234
-          <li>
235
-            <a href="{{ path('favorites_my_list') }}" >
236
-              {{ 'container_menu.my_favorites'|trans({}, 'navigationui') }}
237
-            </a>
238
-          </li>
239
-          <li class="separator"></li>
240
-        </ul>
241
-      </hgroup>
242
-    </header>
243
-    
244
-    <div id="content">
175
+  <div id="container">
176
+  
177
+    <div id="main_content">
245
       
178
       
246
-      <div id="main">
247
-        
248
-        <div id="mainbox" class="nicebox {% block mainbox_classes %}{% endblock %}">
249
-          {% block main_content %}{% endblock %}
250
-          {% block fos_user_content %}{% endblock %}
251
-        </div>
252
-        
253
-      </div>
254
-        
255
-      <aside id="sidebar">
256
-        
257
-        <div id="user_statusbox" class="nicebox">
258
-          {% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
259
-            {% render "MuzichUserBundle:Event:infoBar" %}
260
-          {% endif %}
261
-        </div>
262
-        
263
-        <div id="searchbox" class="nicebox">
264
-          <div class="seachboxcontainer">
265
-            <form>
266
-              <input type="text" />
179
+      <header id="header">
180
+        <hgroup>
181
+            {% include "MuzichCoreBundle:Language:languages.html.twig" %}
182
+            <!--
183
+          <ul id="parameters"><li>
267
               <a href="">
184
               <a href="">
268
-                <img src="{{ asset('/img/icon_search.png') }}" alt="search" />
185
+                <img src="{{ asset('img/header_icon_params.png') }}" alt="parameters" />
269
               </a>
186
               </a>
270
-            </form>
271
-          </div>
272
-        </div>
273
-        
274
-        <div id="social" class="nicebox">
275
-          <ul class="social_links">
276
-            <li>
277
-              <a href="" >
278
-                <img src="{{ asset('/img/icon_facebook.png') }}" alt="facebook" />
187
+            </li></ul>-->
188
+          
189
+          <a id="header_logo" href="{{ path('index') }}" title="">
190
+            <img src="{{ asset('img/header_logo.png') }}" alt="logo" />
191
+          </a>
192
+          <ul id="register_and_login">
193
+            {% if not app.user %}
194
+              <!--<li>
195
+                <a href="" class="left">
196
+                  Devenir membre
197
+                </a>
198
+              </li>
199
+              <li>
200
+                <a href="" class="right">
201
+                  Connexion
202
+                </a>
203
+              </li>-->
204
+            {% else %}
205
+              <li>
206
+                <a href="{{ path('my_account') }}" class="left">
207
+                  {{ 'top_bar.my_account'|trans({}, 'navigationui') }}
208
+                </a>
209
+              </li>
210
+              <li>
211
+                <a class="right" href="{{ path('fos_user_security_logout') }}">
212
+                    {{ 'top_bar.logout'|trans({}, 'navigationui') }}
213
+                </a>
214
+              </li>
215
+            {% endif %}
216
+          </ul>
217
+          
218
+          {% if app.user %}
219
+          <ul id="header_menu">
220
+            
221
+            {% if network_public is not defined %}
222
+              {% set network_public = '' %}
223
+            {% endif %}
224
+            
225
+            <li class="{% if network_public == '1' and not ids_display %}selected{% endif %}">
226
+              <a href="{{ path('home') }}" class="all_network">
227
+                {{ 'filter.network_all'|trans({}, 'userui') }}
279
               </a>
228
               </a>
280
             </li>
229
             </li>
281
-            <li>
282
-              <a href="" >
283
-                <img src="{{ asset('/img/icon_twitter.png') }}" alt="twitter" />
230
+            <li class="separator"></li>
231
+            <li class="{% if network_public == '0' and not ids_display %}selected{% endif %}">
232
+              <a href="{{ path('home') }}" class="my_network" >
233
+                {{ 'filter.network_my'|trans({}, 'userui') }}
284
               </a>
234
               </a>
285
             </li>
235
             </li>
286
-            <li>
287
-              <a href="" >
288
-                <img src="{{ asset('/img/icon_googleplus.png') }}" alt="google plus" />
236
+            <li class="separator"></li>
237
+            <li class="{% if app.request.get('topmenu') == 'showuser' and app.request.get('slug') == app.user.slug %}selected{% endif %}">
238
+              <a href="{{ path('show_user', {'slug': app.user.slug}) }}">
239
+                {{ 'container_menu.my_feeds'|trans({}, 'navigationui') }}
289
               </a>
240
               </a>
290
             </li>
241
             </li>
291
-          </ul>
292
-        </div>
293
-        
294
-        <div id="secondarymenu" class="nicebox">
295
-          
296
-          <ul class="secondarymenu">
297
-            <li class="top_menu_element open">
298
-              
299
-              <a href="" class="top_menu_link">
300
-                <div class="blackgradiant">
301
-                    Menu element
302
-                    <div class="dart"></div>
303
-                </div>
242
+            <li class="separator"></li>
243
+            {% if his_group is not defined %}{% set his_group = false %}{% endif %}
244
+            <li class="{% if app.request.get('topmenu') == 'mygroups' or his_group == true %}selected{% endif %}">
245
+              <a href="{{ path('groups_own_list') }}" >
246
+                {{ 'network.mygroups'|trans({}, 'navigationui') }}
304
               </a>
247
               </a>
305
-              
306
-              <ul class="submenu">
307
-                <li class="sub_menu_element">
308
-                  <a href="" >
309
-                    sub menu element
310
-                  </a>
311
-                </li>
312
-                <li class="sub_menu_element">
313
-                  <a href="" >
314
-                    sub menu element
315
-                  </a>
316
-                </li>
317
-                <li class="sub_menu_element">
318
-                  <a href="" >
319
-                    sub menu element
320
-                  </a>
321
-                </li>
322
-              </ul>
323
             </li>
248
             </li>
324
-              
249
+            <li class="separator"></li>
250
+            <li class="{% if app.request.get('topmenu') == 'myfavorites' %}selected{% endif %}">
251
+              <a href="{{ path('favorites_my_list') }}" >
252
+                {{ 'container_menu.my_favorites'|trans({}, 'navigationui') }}
253
+              </a>
254
+            </li>
255
+            <li class="separator"></li>
325
           </ul>
256
           </ul>
257
+          {% endif %}
326
           
258
           
327
-          <ul class="secondarymenu">
328
-            <li class="top_menu_element close">
329
-              
330
-              <a href="" class="top_menu_link">
331
-                <div class="blackgradiant">
332
-                    Menu element
333
-                    <div class="dart"></div>
334
-                </div>
335
-              </a>
336
-              
337
-              <ul class="submenu">
338
-                <li class="sub_menu_element">
259
+        </hgroup>
260
+      </header>
261
+      
262
+      <div id="content">
263
+        
264
+        <div id="main">
265
+          
266
+          <div id="mainbox" class="nicebox {% block mainbox_classes %}{% endblock %}">
267
+            {% block main_content %}{% endblock %}
268
+            {% block fos_user_content %}{% endblock %}
269
+          </div>
270
+          
271
+        </div>
272
+          
273
+        <aside id="sidebar">
274
+          
275
+          {% if app.user %}
276
+            <div id="user_statusbox" class="nicebox">
277
+              {% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
278
+                {% render "MuzichUserBundle:Event:infoBar" %}
279
+              {% endif %}
280
+            </div>
281
+          
282
+            <div id="searchbox" class="nicebox">
283
+              {% render "MuzichCoreBundle:Search:renderGlobalSearchForm" %}
284
+            </div>
285
+            
286
+            <!--<div id="social" class="nicebox">
287
+              <ul class="social_links">
288
+                <li>
339
                   <a href="" >
289
                   <a href="" >
340
-                    sub menu element
290
+                    <img src="{{ asset('/img/icon_facebook.png') }}" alt="facebook" />
341
                   </a>
291
                   </a>
342
                 </li>
292
                 </li>
343
-                <li class="sub_menu_element">
293
+                <li>
344
                   <a href="" >
294
                   <a href="" >
345
-                    sub menu element
295
+                    <img src="{{ asset('/img/icon_twitter.png') }}" alt="twitter" />
346
                   </a>
296
                   </a>
347
                 </li>
297
                 </li>
348
-                <li class="sub_menu_element">
298
+                <li>
349
                   <a href="" >
299
                   <a href="" >
350
-                    sub menu element
300
+                    <img src="{{ asset('/img/icon_googleplus.png') }}" alt="google plus" />
351
                   </a>
301
                   </a>
352
                 </li>
302
                 </li>
353
               </ul>
303
               </ul>
354
-            </li>
355
-              
356
-          </ul>
304
+            </div>-->
305
+            
306
+            {% render 'MuzichCoreBundle:Core:renderSideMenu' %}
357
           
307
           
358
-        </div>
359
-                
360
-      </aside>
361
-        
308
+          {% endif %}
309
+          
310
+        </aside>
311
+          
312
+      </div>
313
+      
362
     </div>
314
     </div>
363
     
315
     
364
     <div id="footer">
316
     <div id="footer">
377
       
329
       
378
     </div>
330
     </div>
379
     
331
     
380
-    
332
+  </div>
381
     
333
     
382
   </body>
334
   </body>
383
 </html>
335
 </html>

+ 5 - 0
src/Muzich/CoreBundle/Searcher/ElementSearcher.php View File

184
     return false;
184
     return false;
185
   }
185
   }
186
   
186
   
187
+  public function setNoTags()
188
+  {
189
+    $this->tags = array();
190
+  }
191
+  
187
   public function getTags($tags_string = false)
192
   public function getTags($tags_string = false)
188
   {
193
   {
189
     if (!$tags_string)
194
     if (!$tags_string)

+ 30 - 28
src/Muzich/CoreBundle/Searcher/ElementSearcherQueryBuilder.php View File

273
       $this->query_ids->andWhere("e.need_tags  = '1'");
273
       $this->query_ids->andWhere("e.need_tags  = '1'");
274
     }
274
     }
275
   }
275
   }
276
+  
277
+  private function buildIdsLimits()
278
+  {
279
+    if ($this->es->hasIds())
280
+    {
281
+      $this->query_ids->andWhere('e.id IN (:limiteds_ids)');
282
+      $this->parameters_ids['limiteds_ids'] = $this->es->getIds();
283
+    }
284
+  }
276
 
285
 
277
   /**
286
   /**
278
    *
287
    *
313
     }
322
     }
314
     // Si on recherche des partages en demande de tags
323
     // Si on recherche des partages en demande de tags
315
     $this->buildNeedTags();
324
     $this->buildNeedTags();
325
+    // Si on a fournis des ids dés le départ
326
+    $this->buildIdsLimits();
316
     
327
     
317
     $this->query_ids->setParameters($this->parameters_ids);
328
     $this->query_ids->setParameters($this->parameters_ids);
318
   }
329
   }
325
    */
336
    */
326
   public function getIdsQuery($disable_limit = false)
337
   public function getIdsQuery($disable_limit = false)
327
   {
338
   {
328
-    // Contrôle de la demande
329
-    if ($this->es->hasIds())
330
-    {
331
-      throw new \Exception("Vous demandez un Query_ids avec un ElementSearcher "
332
-        ."possédant déjà une liste d'ids");
333
-    }
339
+    //// Contrôle de la demande
340
+    //if ($this->es->hasIds())
341
+    //{
342
+    //  throw new \Exception("Vous demandez un Query_ids avec un ElementSearcher "
343
+    //    ."possédant déjà une liste d'ids");
344
+    //}
334
     
345
     
335
     if ($this->proceedIdsQuery($disable_limit) === false)
346
     if ($this->proceedIdsQuery($disable_limit) === false)
336
     {
347
     {
344
   {
355
   {
345
     
356
     
346
     // On récupère les ids d'éléments
357
     // On récupère les ids d'éléments
347
-    if (!$this->es->hasIds())
358
+    if (($ids_query = $this->getIdsQuery()) === false)
348
     {
359
     {
349
-      
350
-      if (($ids_query = $this->getIdsQuery()) === false)
351
-      {
352
-        return false;
353
-      }
354
-      
355
-      // On va récupérer les ids en base en fonction des paramètres
356
-      $q_ids = $ids_query->getArrayResult();
357
-     
358
-      $element_ids = array();
359
-      if (count($q_ids))
360
-      {
361
-        // On prépare les ids pour la requete des éléments
362
-        foreach ($q_ids as $r_id)
363
-        {
364
-          $element_ids[] = $r_id['id'];
365
-        }
366
-      }
360
+      return false;
367
     }
361
     }
368
-    else
362
+    
363
+    // On va récupérer les ids en base en fonction des paramètres
364
+    $q_ids = $ids_query->getArrayResult();
365
+   
366
+    $element_ids = array();
367
+    if (count($q_ids))
369
     {
368
     {
370
-      // Les ids sont déjà transmis par la demande
371
-      $element_ids = $this->es->getIds();
369
+      // On prépare les ids pour la requete des éléments
370
+      foreach ($q_ids as $r_id)
371
+      {
372
+        $element_ids[] = $r_id['id'];
373
+      }
372
     }
374
     }
373
     
375
     
374
     if (!count($element_ids))
376
     if (!count($element_ids))

+ 1 - 2
src/Muzich/CoreBundle/Tests/Controller/HomeControllerTest.php View File

736
     $id_limit = (int)str_replace('element_', '', $extract[9]);
736
     $id_limit = (int)str_replace('element_', '', $extract[9]);
737
     
737
     
738
     $url = $this->generateUrl('search_elements_more', array(
738
     $url = $this->generateUrl('search_elements_more', array(
739
-      'id_limit'  => $id_limit,
740
-      'invertcolors' => 0
739
+      'id_limit'  => $id_limit
741
     ));
740
     ));
742
     
741
     
743
     // We want mooooore
742
     // We want mooooore

+ 18 - 5
src/Muzich/CoreBundle/lib/Controller.php View File

36
    * 
36
    * 
37
    * @param array $params
37
    * @param array $params
38
    */
38
    */
39
-  protected function setElementSearcherParams($params)
39
+  protected function setElementSearcherParams($params, $session_id = '')
40
   {
40
   {
41
-    $this->get("session")->set('user.element_search.params', $params);
41
+    if ($session_id != '')
42
+    {
43
+      $session_id = '.'.$session_id;
44
+    }
45
+    $this->get("session")->set('user.element_search.params'.$session_id, $params);
42
   }
46
   }
43
   
47
   
44
   /**
48
   /**
51
    * 
55
    * 
52
    * @return  ElementSearcher
56
    * @return  ElementSearcher
53
    */
57
    */
54
-  protected function getElementSearcher($count = null, $force_new = false)
58
+  protected function getElementSearcher($count = null, $force_new = false, $session_id = '')
55
   {
59
   {
56
     $session = $this->get("session");
60
     $session = $this->get("session");
61
+    if ($session_id != '')
62
+    {
63
+      $session_id = '.'.$session_id;
64
+    }
57
     // Si l'objet n'existe pas encore, a t-on déjà des paramètres de recherche
65
     // Si l'objet n'existe pas encore, a t-on déjà des paramètres de recherche
58
-    if (!$session->has('user.element_search.params') || $force_new)
66
+    if (!$session->has('user.element_search.params'.$session_id) || $force_new)
59
     {
67
     {
60
       // Il nous faut instancier notre premier objet recherche
68
       // Il nous faut instancier notre premier objet recherche
61
       // Premièrement on récupère les tags favoris de l'utilisateur
69
       // Premièrement on récupère les tags favoris de l'utilisateur
77
       // Des paramètres existes, on fabrique l'objet recherche
85
       // Des paramètres existes, on fabrique l'objet recherche
78
       $this->ElementSearcher = new ElementSearcher();
86
       $this->ElementSearcher = new ElementSearcher();
79
       // et on l'initatialise avec ces paramétres connus
87
       // et on l'initatialise avec ces paramétres connus
80
-      $this->ElementSearcher->init($session->get('user.element_search.params'));
88
+      $this->ElementSearcher->init($session->get('user.element_search.params'.$session_id));
81
       if ($count)
89
       if ($count)
82
       {
90
       {
83
         $this->ElementSearcher->update(array('count' => $count));
91
         $this->ElementSearcher->update(array('count' => $count));
88
     return $this->ElementSearcher;
96
     return $this->ElementSearcher;
89
   }
97
   }
90
   
98
   
99
+  protected function getNewElementSearcher()
100
+  {
101
+    return $this->getElementSearcher(null, true);
102
+  }
103
+  
91
   /**
104
   /**
92
    * Retourne l'objet User. Il est possible de préciser de quel manière récupérer 
105
    * Retourne l'objet User. Il est possible de préciser de quel manière récupérer 
93
    * l'utilisateur:
106
    * l'utilisateur:

+ 2 - 3
src/Muzich/FavoriteBundle/Controller/FavoriteController.php View File

237
     );
237
     );
238
   }
238
   }
239
   
239
   
240
-  public function getElementsAction($user_id, $tags_ids_json, $id_limit = null, $invert = false)
240
+  public function getElementsAction($user_id, $tags_ids_json, $id_limit = null)
241
   {
241
   {
242
     if (($response = $this->mustBeConnected()))
242
     if (($response = $this->mustBeConnected()))
243
     {
243
     {
278
     {
278
     {
279
       $html = $this->render('MuzichCoreBundle:SearchElement:default.html.twig', array(
279
       $html = $this->render('MuzichCoreBundle:SearchElement:default.html.twig', array(
280
         'user'        => $this->getUser(),
280
         'user'        => $this->getUser(),
281
-        'elements'    => $elements,
282
-        'invertcolor' => $invert
281
+        'elements'    => $elements
283
       ))->getContent();
282
       ))->getContent();
284
     }
283
     }
285
     
284
     

+ 1 - 1
src/Muzich/FavoriteBundle/Resources/config/routing.yml View File

9
 
9
 
10
 favorites_my_list:
10
 favorites_my_list:
11
   pattern:   /favorites
11
   pattern:   /favorites
12
-  defaults: { _controller: MuzichFavoriteBundle:Favorite:myList }
12
+  defaults: { _controller: MuzichFavoriteBundle:Favorite:myList, topmenu: myfavorites }
13
 
13
 
14
 favorite_user_list:
14
 favorite_user_list:
15
   pattern:   /user/{slug}/favorites
15
   pattern:   /user/{slug}/favorites

+ 24 - 21
src/Muzich/FavoriteBundle/Resources/views/Favorite/myList.html.twig View File

1
 {% extends "MuzichFavoriteBundle::layout.html.twig" %}
1
 {% extends "MuzichFavoriteBundle::layout.html.twig" %}
2
 
2
 
3
 {% block title %}Mes favoris{% endblock %}
3
 {% block title %}Mes favoris{% endblock %}
4
+{% block mainbox_classes %}mainbox_nopadding{% endblock %}
4
 
5
 
5
 {% block content %}
6
 {% block content %}
6
 
7
 
7
-  {% include "MuzichCoreBundle:Menu:containerMenu.html.twig" with {'active': 'myfavorites'} %}
8
-
9
-  <h2>{{ 'favorites.your_favorites'|trans({}, 'network') }}</h2>
10
-
11
-  {% include "MuzichCoreBundle:Tag:tagsList.favorite.html.twig" with {
12
-    'user_id' : app.user.id
13
-  } %}
8
+  <div class="top_tools">
9
+    
10
+    <h1>{{ 'favorites.your_favorites'|trans({}, 'network') }}</h1>
14
   
11
   
15
-  <a href="{{ path('elements_get_filter_data_autoplay_favorite', {
16
-        'show_type'  : 'user',
17
-        'show_id'    : app.user.id, 
18
-        'data'       : '[]'
19
-      }) }}" class="button" id="autoplay_launch" 
20
-     title="{{ 'elements.autoplay.launch'|trans({}, 'elements') }}" >
21
-    <img src="{{ asset('/bundles/muzichcore/img/1353494305_player_play.png') }}" alt="" />
22
-  </a>
12
+    {% include "MuzichCoreBundle:Tag:tagsList.favorite.html.twig" with {
13
+      'user_id' : app.user.id
14
+    } %}
15
+    
16
+    <a href="{{ path('elements_get_filter_data_autoplay_favorite', {
17
+          'show_type'  : 'user',
18
+          'show_id'    : app.user.id, 
19
+          'data'       : '[]'
20
+        }) }}" class="button" id="autoplay_launch" 
21
+       title="{{ 'elements.autoplay.launch'|trans({}, 'elements') }}" >
22
+      <img src="{{ asset('/bundles/muzichcore/img/1353494305_player_play.png') }}" alt="" />
23
+    </a>
24
+  
25
+  </div>
23
   
26
   
24
   {% include "MuzichCoreBundle:SearchElement:default.html.twig" %}
27
   {% include "MuzichCoreBundle:SearchElement:default.html.twig" %}
25
     
28
     
28
   </div>
31
   </div>
29
   
32
   
30
   {% if elements|length %}
33
   {% if elements|length %}
31
-     <span class="elements_more">
32
-       <input type="hidden" id="more_elements_url" value="{{ path('favorite_get', {'user_id': app.user.id, 'tags_ids_json' : ''}) }}" />
33
-       <a href="{{ path('favorite_get', {'user_id': app.user.id, 'tags_ids_json' : '[]'}) }}" class="elements_more button">
34
-         {{ 'more'|trans({}, 'userui') }}
35
-       </a>
36
-     </span>
34
+    <input type="hidden" id="more_elements_url" value="{{ path('favorite_get', {'user_id': app.user.id, 'tags_ids_json' : ''}) }}" />
35
+    <a href="{{ path('favorite_get', {'user_id': app.user.id, 'tags_ids_json' : '[]'}) }}" class="elements_more">
36
+      <div>
37
+       {{ 'more'|trans({}, 'userui') }}
38
+     </div>
39
+    </a>
37
   {% endif %}
40
   {% endif %}
38
   
41
   
39
   <input type="hidden" id="autoplay_url" value="{{ path('elements_get_filter_data_autoplay_favorite', {
42
   <input type="hidden" id="autoplay_url" value="{{ path('elements_get_filter_data_autoplay_favorite', {

+ 29 - 27
src/Muzich/FavoriteBundle/Resources/views/Favorite/userList.html.twig View File

1
 {% extends "MuzichFavoriteBundle::layout.html.twig" %}
1
 {% extends "MuzichFavoriteBundle::layout.html.twig" %}
2
 
2
 
3
 {% block title %}Favoris de {{ viewed_user.name }}{% endblock %}
3
 {% block title %}Favoris de {{ viewed_user.name }}{% endblock %}
4
+{% block mainbox_classes %}mainbox_nopadding{% endblock %}
4
 
5
 
5
 {% block content %}
6
 {% block content %}
6
 
7
 
7
-  {% include "MuzichCoreBundle:Menu:containerMenu.html.twig" with {'active': ''} %}
8
-
9
-  <div class="show_options">
8
+  <div class="top_tools">
10
     
9
     
11
-    <a class="button" href="{{ path('show_user', {'slug' : viewed_user.slug}) }}" >
12
-      {{ 'user.view_profile'|trans({}, 'users') }}
10
+    <div class="show_options">
11
+      
12
+      <a class="button darkbutton" href="{{ path('show_user', {'slug' : viewed_user.slug}) }}" >
13
+        {{ 'user.view_profile'|trans({}, 'users') }}
14
+      </a>
15
+      
16
+    </div>
17
+  
18
+    <h1>{{ 'favorites.user_favorites'|trans({'%name%' : viewed_user.name}, 'network') }}</h1>
19
+  
20
+    {% include "MuzichCoreBundle:Tag:tagsList.favorite.html.twig" with {
21
+      'user_id' : viewed_user.id
22
+    } %}
23
+    
24
+    <a href="{{ path('elements_get_filter_data_autoplay_favorite', {
25
+          'show_type'  : 'user',
26
+          'show_id'    : viewed_user.id, 
27
+          'data'       : '[]'
28
+        }) }}" class="button" id="autoplay_launch" 
29
+       title="{{ 'elements.autoplay.launch'|trans({}, 'elements') }}" >
30
+      <img src="{{ asset('/bundles/muzichcore/img/1353494305_player_play.png') }}" alt="" />
13
     </a>
31
     </a>
14
     
32
     
15
   </div>
33
   </div>
16
 
34
 
17
-  <h2>{{ 'favorites.user_favorites'|trans({'%name%' : viewed_user.name}, 'network') }}</h2>
18
-
19
-  {% include "MuzichCoreBundle:Tag:tagsList.favorite.html.twig" with {
20
-    'user_id' : viewed_user.id
21
-  } %}
22
-  
23
-  <a href="{{ path('elements_get_filter_data_autoplay_favorite', {
24
-        'show_type'  : 'user',
25
-        'show_id'    : viewed_user.id, 
26
-        'data'       : '[]'
27
-      }) }}" class="button" id="autoplay_launch" 
28
-     title="{{ 'elements.autoplay.launch'|trans({}, 'elements') }}" >
29
-    <img src="{{ asset('/bundles/muzichcore/img/1353494305_player_play.png') }}" alt="" />
30
-  </a>
31
-  
32
-
33
   {% include "MuzichCoreBundle:SearchElement:default.html.twig" %}
35
   {% include "MuzichCoreBundle:SearchElement:default.html.twig" %}
34
     
36
     
35
   <div class="elements_loader_div">
37
   <div class="elements_loader_div">
37
   </div>
39
   </div>
38
   
40
   
39
   {% if elements|length %}
41
   {% if elements|length %}
40
-     <span class="elements_more">
41
-       <input type="hidden" id="more_elements_url" value="{{ path('favorite_get', {'user_id': viewed_user.id, 'tags_ids_json' : ''}) }}" />
42
-       <a href="{{ path('favorite_get', {'user_id': viewed_user.id, 'tags_ids_json' : '[]'}) }}" class="elements_more button">
43
-         {{ 'more'|trans({}, 'userui') }}
44
-       </a>
45
-     </span>
42
+    <input type="hidden" id="more_elements_url" value="{{ path('favorite_get', {'user_id': viewed_user.id, 'tags_ids_json' : ''}) }}" />
43
+    <a href="{{ path('favorite_get', {'user_id': viewed_user.id, 'tags_ids_json' : '[]'}) }}" class="elements_more">
44
+      <div>
45
+       {{ 'more'|trans({}, 'userui') }}
46
+     </div>
47
+    </a>
46
   {% endif %}
48
   {% endif %}
47
   
49
   
48
   <input type="hidden" id="autoplay_url" value="{{ path('elements_get_filter_data_autoplay_favorite', {
50
   <input type="hidden" id="autoplay_url" value="{{ path('elements_get_filter_data_autoplay_favorite', {

+ 1 - 1
src/Muzich/GroupBundle/Resources/config/routing.yml View File

1
 
1
 
2
 groups_own_list:
2
 groups_own_list:
3
   pattern:  /my-groups
3
   pattern:  /my-groups
4
-  defaults: { _controller: MuzichGroupBundle:Default:myList }
4
+  defaults: { _controller: MuzichGroupBundle:Default:myList, topmenu: mygroups }
5
 
5
 
6
 group_add:
6
 group_add:
7
   pattern:   /my-groups/add
7
   pattern:   /my-groups/add

+ 16 - 9
src/Muzich/GroupBundle/Resources/views/Default/edit.html.twig View File

1
 {% extends "MuzichGroupBundle::layout.html.twig" %}
1
 {% extends "MuzichGroupBundle::layout.html.twig" %}
2
 
2
 
3
 {% block title %}Edition du groupe {{ group.name }}{% endblock %}
3
 {% block title %}Edition du groupe {{ group.name }}{% endblock %}
4
+{% block mainbox_classes %}mainbox_padding{% endblock %}
4
 
5
 
5
 {% block content %}
6
 {% block content %}
6
 
7
 
7
-  <h2>Edition du groupe {{ group.name }}</h2>
8
+  <div id="group_add_box" style="">
8
 
9
 
9
-  <form name="{{ form_name }}" action="{{ path('group_update', { 'slug': group.slug }) }}" method="post" {{ form_enctype(form) }}>
10
-    
11
-    {% include "MuzichGroupBundle:Form:form.html.twig" %}
12
-
13
-    {{ form_widget(form.tags, { 'attr': {'class': 'tagBox_tags_ids'} }) }}
14
-    
15
-    <input type="submit" class="button" />
16
-  </form>
10
+    <h2>Edition du groupe {{ group.name }}</h2>
11
+  
12
+    <form class="nicelabels" name="{{ form_name }}" action="{{ path('group_update', { 'slug': group.slug }) }}" method="post" {{ form_enctype(form) }}>
13
+      
14
+      {% include "MuzichGroupBundle:Form:form.html.twig" %}
15
+  
16
+      {{ form_widget(form.tags, { 'attr': {'class': 'tagBox_tags_ids'} }) }}
17
+      
18
+      <div class="alignright">
19
+        <input type="submit" class="button" value="{{ 'group.form.submit'|trans({}, 'groups') }}" />
20
+      </div>
21
+    </form>
22
+  
23
+  </div>
17
 
24
 
18
 {% endblock %}
25
 {% endblock %}

+ 18 - 10
src/Muzich/GroupBundle/Resources/views/Default/myList.html.twig View File

1
 {% extends "MuzichGroupBundle::layout.html.twig" %}
1
 {% extends "MuzichGroupBundle::layout.html.twig" %}
2
 
2
 
3
 {% block title %}{{ 'my_groups.title'|trans({}, 'navigationui') }}{% endblock %}
3
 {% block title %}{{ 'my_groups.title'|trans({}, 'navigationui') }}{% endblock %}
4
+{% block mainbox_classes %}mainbox_padding{% endblock %}
4
 
5
 
5
 {% block content %}
6
 {% block content %}
6
 
7
 
7
-  <a href="#" id="group_add_link" class="button">
8
-    {{ 'group.add_group'|trans({}, 'navigationui') }} &gt;&gt;
9
-  </a>
10
-
8
+  <div class="top_tools">
9
+    
10
+    <a href="#" id="group_add_link" class="button gradient justtopright">
11
+      {{ 'group.add_group'|trans({}, 'navigationui') }}
12
+      <img src="{{ asset('/img/icon_dart_right_white.png') }}" alt="" />
13
+    </a>
14
+    <a href="#" id="group_add_close_link" class="button gradient justtopright" style="display: none;">
15
+      {{ 'group.add_group_box.close'|trans({}, 'navigationui') }}
16
+      <img src="{{ asset('/img/icon_dart_left_white.png') }}" alt="" />
17
+    </a>
18
+    
19
+  </div>
20
+  
11
   {% if groups|length %}
21
   {% if groups|length %}
12
 
22
 
13
     {{ 'havegroups.sentence'|trans({}, 'groups') }}
23
     {{ 'havegroups.sentence'|trans({}, 'groups') }}
36
 
46
 
37
   <div id="group_add_box" style="{% if not open_add_group %}display: none;{% endif %}">
47
   <div id="group_add_box" style="{% if not open_add_group %}display: none;{% endif %}">
38
 
48
 
39
-    <a href="#" id="group_add_close_link" class="button">
40
-      &lt;&lt; {{ 'group.add_group_box.close'|trans({}, 'navigationui') }}
41
-    </a>
42
-    
43
     <h2>{{ 'group.add_group'|trans({}, 'navigationui') }}</h2>
49
     <h2>{{ 'group.add_group'|trans({}, 'navigationui') }}</h2>
44
 
50
 
45
-    <form name="{{ form_new_name }}" action="{{ path('group_add') }}" method="post" {{ form_enctype(form_new) }}>
51
+    <form class="nicelabels" name="{{ form_new_name }}" action="{{ path('group_add') }}" method="post" {{ form_enctype(form_new) }}>
46
 
52
 
47
       {% include "MuzichGroupBundle:Form:form.html.twig" with { 'form': form_new, 'form_name': form_new_name } %}
53
       {% include "MuzichGroupBundle:Form:form.html.twig" with { 'form': form_new, 'form_name': form_new_name } %}
48
 
54
 
49
-      <input type="submit" class="button" />
55
+      <div class="alignright">
56
+        <input type="submit" class="button" value="{{ 'group.form.submit'|trans({}, 'groups') }}" />
57
+      </div>
50
     </form>
58
     </form>
51
   
59
   
52
   </div>
60
   </div>

+ 5 - 5
src/Muzich/GroupBundle/Resources/views/Form/form.html.twig View File

2
 
2
 
3
 {{ form_errors(form) }}
3
 {{ form_errors(form) }}
4
 
4
 
5
-<div class="field">
5
+<div class="field name">
6
   {{ form_errors(form.name) }}
6
   {{ form_errors(form.name) }}
7
   {{ form_label(form.name, 'name'|trans({}, 'groupform')) }}
7
   {{ form_label(form.name, 'name'|trans({}, 'groupform')) }}
8
-  {{ form_widget(form.name) }}
8
+  {{ form_widget(form.name, {'attr':{'class':'niceinput'}}) }}
9
 </div>
9
 </div>
10
 
10
 
11
-<div class="field">
11
+<div class="field description">
12
   {{ form_errors(form.description) }}
12
   {{ form_errors(form.description) }}
13
   {{ form_label(form.description, 'description'|trans({}, 'groupform')) }}
13
   {{ form_label(form.description, 'description'|trans({}, 'groupform')) }}
14
-  {{ form_widget(form.description) }}
14
+  {{ form_widget(form.description, {'attr':{'class':'nicetextbox'}}) }}
15
 </div>
15
 </div>
16
 
16
 
17
   <i>{{ 'openhelp'|trans({}, 'groupform') }}</i>
17
   <i>{{ 'openhelp'|trans({}, 'groupform') }}</i>
18
 
18
 
19
-<div class="field">
19
+<div class="field open">
20
   {{ form_errors(form.open) }}
20
   {{ form_errors(form.open) }}
21
   {{ form_label(form.open, 'open'|trans({}, 'groupform')) }}
21
   {{ form_label(form.open, 'open'|trans({}, 'groupform')) }}
22
   {{ form_widget(form.open) }}
22
   {{ form_widget(form.open) }}

+ 2 - 3
src/Muzich/HomeBundle/Controller/ShowController.php View File

144
     );
144
     );
145
   }
145
   }
146
   
146
   
147
-  public function getElementsAction($type, $object_id, $tags_ids_json, $id_limit = null, $invert = false)
147
+  public function getElementsAction($type, $object_id, $tags_ids_json, $id_limit = null)
148
   {
148
   {
149
     if (($response = $this->mustBeConnected()))
149
     if (($response = $this->mustBeConnected()))
150
     {
150
     {
190
     {
190
     {
191
       $html = $this->render('MuzichCoreBundle:SearchElement:default.html.twig', array(
191
       $html = $this->render('MuzichCoreBundle:SearchElement:default.html.twig', array(
192
         'user'        => $this->getUser(),
192
         'user'        => $this->getUser(),
193
-        'elements'    => $elements,
194
-        'invertcolor' => $invert
193
+        'elements'    => $elements
195
       ))->getContent();
194
       ))->getContent();
196
     }
195
     }
197
     
196
     

+ 2 - 2
src/Muzich/HomeBundle/Resources/config/routing.yml View File

10
   
10
   
11
 show_user:
11
 show_user:
12
   pattern: /user/{slug}
12
   pattern: /user/{slug}
13
-  defaults: { _controller: MuzichHomeBundle:Show:showUser }
13
+  defaults: { _controller: MuzichHomeBundle:Show:showUser, topmenu: showuser }
14
   
14
   
15
 show_user_more:
15
 show_user_more:
16
   pattern: /user/{slug}/more/{count}
16
   pattern: /user/{slug}/more/{count}
17
-  defaults: { _controller: MuzichHomeBundle:Show:showUser, count: null }
17
+  defaults: { _controller: MuzichHomeBundle:Show:showUser, count: null, topmenu: showgroup }
18
   
18
   
19
 show_group:
19
 show_group:
20
   pattern: /group/{slug}
20
   pattern: /group/{slug}

+ 1 - 1
src/Muzich/HomeBundle/Resources/views/Show/showGroup.html.twig View File

24
     <div class="show_options">
24
     <div class="show_options">
25
       
25
       
26
       {% if his_group %}
26
       {% if his_group %}
27
-        <a class="button" href="{{ path('group_edit', { 'slug': group.slug }) }}" >
27
+        <a class="button darkbutton" href="{{ path('group_edit', { 'slug': group.slug }) }}" >
28
           {{ 'group.edit'|trans({}, 'groups') }}
28
           {{ 'group.edit'|trans({}, 'groups') }}
29
         </a>
29
         </a>
30
       {% endif %}
30
       {% endif %}

+ 5 - 1
src/Muzich/HomeBundle/Resources/views/Show/showUser.html.twig View File

19
     {% endif %}
19
     {% endif %}
20
     
20
     
21
     <div class="show_options">
21
     <div class="show_options">
22
-      
22
+            
23
       {% if app.user.id != viewed_user.id %}
23
       {% if app.user.id != viewed_user.id %}
24
         <a href="{{ path('follow', { 'type': 'user', 'id': viewed_user.id, 'token': user.personalHash }) }}" 
24
         <a href="{{ path('follow', { 'type': 'user', 'id': viewed_user.id, 'token': user.personalHash }) }}" 
25
            class="follow_link button darkbutton {% if following %}following{% else %}notfollowing{% endif %}" >
25
            class="follow_link button darkbutton {% if following %}following{% else %}notfollowing{% endif %}" >
31
         </a>
31
         </a>
32
       {% endif %}
32
       {% endif %}
33
       
33
       
34
+      <a class="button darkbutton" href="{{ path('favorite_user_list', {'slug' : viewed_user.slug}) }}" >
35
+        {{ 'user.view_favorites'|trans({}, 'users') }}
36
+      </a>
37
+      
34
     </div>
38
     </div>
35
     
39
     
36
     <h1>{{ 'user.show.title'|trans({'%name%' : viewed_user.name}, 'users') }}</h1>
40
     <h1>{{ 'user.show.title'|trans({'%name%' : viewed_user.name}, 'users') }}</h1>

+ 11 - 15
src/Muzich/IndexBundle/Resources/views/Index/index.html.twig View File

1
 {% extends "MuzichIndexBundle::layout.html.twig" %}
1
 {% extends "MuzichIndexBundle::layout.html.twig" %}
2
 
2
 
3
 {% block title %}{{ 'title.hello'|trans({}, 'navigationui') }}{% endblock %}
3
 {% block title %}{{ 'title.hello'|trans({}, 'navigationui') }}{% endblock %}
4
+{% block mainbox_classes %}mainbox_margintop mainbox_padding{% endblock %}
4
 
5
 
5
 {% block content %}
6
 {% block content %}
6
     
7
     
7
-  <div class="hello">
8
-
8
+    <a href="#" id="registration_link" class="button gradient">
9
+      {{ 'registration.display'|trans({}, 'navigationui') }}
10
+      <img src="{{ asset('/img/icon_dart_right_white.png') }}" alt="" />
11
+    </a>
12
+    <a href="#" id="login_link" class="button gradient" style="display: none;">
13
+      {{ 'login.display'|trans({}, 'navigationui') }}
14
+      <img src="{{ asset('/img/icon_dart_left_white.png') }}" alt="" />
15
+    </a>
16
+    
9
     <div id="login_box" style="{% if registration_page is defined %}display: none;{% endif %}">
17
     <div id="login_box" style="{% if registration_page is defined %}display: none;{% endif %}">
10
       {% include "MuzichUserBundle:Security:login.html.twig" %}
18
       {% include "MuzichUserBundle:Security:login.html.twig" %}
11
-        
12
-      <a href="#" id="registration_link">
13
-        {{ 'registration.display'|trans({}, 'navigationui') }} &gt;&gt;
14
-      </a>
15
     </div>
19
     </div>
16
     
20
     
17
     <div id="registration_box" style="{% if registration_page is not defined %}display: none;{% endif %}">
21
     <div id="registration_box" style="{% if registration_page is not defined %}display: none;{% endif %}">
18
-      
22
+      <h1>{{ 'register.title'|trans({}, 'userui') }}</h1>
19
       <span class="sinfo">{{ 'index.beta.warning'|trans({}, 'userui') }}</span>
23
       <span class="sinfo">{{ 'index.beta.warning'|trans({}, 'userui') }}</span>
20
-
21
       {% include "MuzichUserBundle:Registration:register.html.twig" %}
24
       {% include "MuzichUserBundle:Registration:register.html.twig" %}
22
-        
23
-      <a href="#" id="login_link">
24
-        &lt;&lt; {{ 'login.display'|trans({}, 'navigationui') }}
25
-      </a>
26
     </div>
25
     </div>
27
     
26
     
28
-  </div>
29
-    
30
-    
31
 {% endblock %}
27
 {% endblock %}
32
 
28
 

+ 14 - 21
src/Muzich/UserBundle/Controller/EventController.php View File

53
     // A partir d'ici on a ce qu'il faut.
53
     // A partir d'ici on a ce qu'il faut.
54
     // On modifie l'Element Searcher en lui donnat les ids correspondant a l'event
54
     // On modifie l'Element Searcher en lui donnat les ids correspondant a l'event
55
     
55
     
56
-    $es = $this->getElementSearcher();
56
+    $user = $this->getUser();
57
+    $es = $this->getNewElementSearcher();
58
+    $es->setNoTags();
57
     $es->setIds($event->getIds());
59
     $es->setIds($event->getIds());
58
     $es->setIdsDisplay($event->getType());
60
     $es->setIdsDisplay($event->getType());
59
-    $this->setElementSearcherParams($es->getParams());
60
-    $this->getDoctrine()->getEntityManager()->remove($event);
61
-    $this->getDoctrine()->getEntityManager()->flush();
62
     
61
     
63
-    // Si ajax
64
-    if ($this->getRequest()->isXmlHttpRequest())
65
-    {
66
-      $html = $this->render('MuzichCoreBundle:SearchElement:default.html.twig', array(
67
-        'user'        => $this->getUser(),
68
-        'elements'    => $es->getElements($this->getDoctrine(), $this->getUserId()),
69
-        'invertcolor' => false
70
-      ))->getContent();
71
-      
72
-      return $this->jsonResponse(array(
73
-        'status'  => 'success',
74
-        'html'    => $html
75
-      ));
76
-    }
62
+    $this->setElementSearcherParams($es->getParams(), $user->getPersonalHash($event->getId()));
63
+    //$this->getDoctrine()->getEntityManager()->remove($event);
64
+    //$this->getDoctrine()->getEntityManager()->flush();
65
+        
66
+    $elements = $es->getElements($this->getDoctrine(), $this->getUserId());
77
     
67
     
78
-    // Sinon on redirige vers home
79
-    return $this->redirect($this->generateUrl('home'));
68
+    return $this->render('MuzichUserBundle:Event:elements.html.twig', array(
69
+      'elements'        => $elements,
70
+      'last_element_id' => $elements[count($elements)-1]->getId(),
71
+      'event'           => $event
72
+    ));
80
   }
73
   }
81
-    
74
+  
82
 }
75
 }

+ 47 - 0
src/Muzich/UserBundle/Resources/views/Event/elements.html.twig View File

1
+{% extends "MuzichHomeBundle::layout.html.twig" %}
2
+
3
+{% block title %}TODO{% endblock %}
4
+{% block mainbox_classes %}mainbox_nopadding{% endblock %}
5
+
6
+{% block content %}
7
+
8
+  <div class="top_tools">
9
+    
10
+    {% if event.type == event_const('TYPE_COMMENT_ADDED_ELEMENT') %}
11
+      
12
+      <h1>{{ 'events.view.title.comments'|trans({}, 'userui') }}</h1>
13
+      
14
+    {% endif %}
15
+    {% if event.type == event_const('TYPE_FAV_ADDED_ELEMENT') %}
16
+      
17
+      <h1>{{ 'events.view.title.nvxfav'|trans({}, 'userui') }}</h1>
18
+      
19
+    {% endif %}
20
+    {% if event.type == event_const('TYPE_TAGS_PROPOSED') %}
21
+      
22
+      <h1>{{ 'events.view.title.tagsprop'|trans({}, 'userui') }}</h1>
23
+      
24
+    {% endif %}
25
+    
26
+  </div>
27
+
28
+  <div class="elements_loader_div">
29
+    <img class="elements_new_loader" style="display: none;" src="{{ asset('/bundles/muzichcore/img/ajax-loader.gif') }}" alt="loading" />
30
+  </div>
31
+
32
+  {% include "MuzichCoreBundle:SearchElement:default.html.twig" with {
33
+    'noelements_filter' : true 
34
+  }%}
35
+    
36
+  {% include "MuzichCoreBundle:SearchElement:more_button.html.twig" with {
37
+    'display_more_button' : true,
38
+    'elements_length'     : elements|length,
39
+    'more_path'           : 'search_elements_more',
40
+    'more_path_params'    : {
41
+      'session_id' : app.user.getPersonalHash(app.request.get('event_id')),
42
+      'id_limit'   : last_element_id
43
+    },
44
+    'link_class'          : 'event_view'
45
+  }%}
46
+  
47
+{% endblock %}

+ 8 - 8
src/Muzich/UserBundle/Resources/views/Registration/register.html.twig View File

1
 <div class="register">
1
 <div class="register">
2
   <form action="{{ path('register') }}" {{ form_enctype(form) }} 
2
   <form action="{{ path('register') }}" {{ form_enctype(form) }} 
3
     method="POST" 
3
     method="POST" 
4
-    class="fos_user_registration_register"
4
+    class="fos_user_registration_register nicelabels"
5
   >
5
   >
6
         
6
         
7
     {% form_theme form 'MuzichCoreBundle:Form:errors.html.twig' %}
7
     {% form_theme form 'MuzichCoreBundle:Form:errors.html.twig' %}
19
     <div class="field">
19
     <div class="field">
20
       {{ form_errors(form.username) }}
20
       {{ form_errors(form.username) }}
21
       {{ form_label(form.username, 'username'|trans({}, 'userform')) }}
21
       {{ form_label(form.username, 'username'|trans({}, 'userform')) }}
22
-      {{ form_widget(form.username) }}
22
+      {{ form_widget(form.username, {'attr':{'class':'niceinput'}}) }}
23
     </div>   
23
     </div>   
24
         
24
         
25
     <div class="field">
25
     <div class="field">
26
       {{ form_errors(form.email) }}
26
       {{ form_errors(form.email) }}
27
       {{ form_label(form.email, 'email'|trans({}, 'userform')) }}
27
       {{ form_label(form.email, 'email'|trans({}, 'userform')) }}
28
-      {{ form_widget(form.email) }}
28
+      {{ form_widget(form.email, {'attr':{'class':'niceinput'}}) }}
29
     </div> 
29
     </div> 
30
     
30
     
31
     <div class="field">
31
     <div class="field">
32
       {{ form_errors(form.plainPassword.first) }}
32
       {{ form_errors(form.plainPassword.first) }}
33
       {{ form_label(form.plainPassword.first, 'password.first'|trans({}, 'userform')) }}
33
       {{ form_label(form.plainPassword.first, 'password.first'|trans({}, 'userform')) }}
34
-      {{ form_widget(form.plainPassword.first) }}
34
+      {{ form_widget(form.plainPassword.first, {'attr':{'class':'niceinput'}}) }}
35
     </div> 
35
     </div> 
36
     
36
     
37
     <div class="field">
37
     <div class="field">
38
       {{ form_errors(form.plainPassword.second) }}
38
       {{ form_errors(form.plainPassword.second) }}
39
       {{ form_label(form.plainPassword.second, 'password.second'|trans({}, 'userform')) }}
39
       {{ form_label(form.plainPassword.second, 'password.second'|trans({}, 'userform')) }}
40
-      {{ form_widget(form.plainPassword.second) }}
40
+      {{ form_widget(form.plainPassword.second, {'attr':{'class':'niceinput'}}) }}
41
     </div> 
41
     </div> 
42
     
42
     
43
     <span class="help">{{ 'help.token'|trans({}, 'userform') }}</span>
43
     <span class="help">{{ 'help.token'|trans({}, 'userform') }}</span>
45
     <div class="field">
45
     <div class="field">
46
       {{ form_errors(form.token) }}
46
       {{ form_errors(form.token) }}
47
       {{ form_label(form.token, 'token'|trans({}, 'userform')) }}
47
       {{ form_label(form.token, 'token'|trans({}, 'userform')) }}
48
-      {{ form_widget(form.token) }}
48
+      {{ form_widget(form.token, {'attr':{'class':'niceinput'}}) }}
49
     </div> 
49
     </div> 
50
 
50
 
51
     {{ form_rest(form) }}
51
     {{ form_rest(form) }}
52
     
52
     
53
-    <div>
54
-        <input type="submit" class="button" value="{{ 'registration.submit'|trans({}, 'FOSUserBundle') }}" />
53
+    <div class="alignright">
54
+        <input type="submit" class="button" value="{{ 'registration.submit'|trans({}, 'userui') }}" />
55
     </div>
55
     </div>
56
   </form>
56
   </form>
57
 </div>
57
 </div>

+ 16 - 10
src/Muzich/UserBundle/Resources/views/Security/login.html.twig View File

4
   {% endif %}
4
   {% endif %}
5
 
5
 
6
   <form action="{{ path("fos_user_security_check") }}" method="post">
6
   <form action="{{ path("fos_user_security_check") }}" method="post">
7
-      <label for="username">{{ 'security.login.username'|trans({}, 'FOSUserBundle') }}</label>
8
-      <input type="text" id="username" name="_username" value="{{ last_username }}" />
7
+    
8
+      <input type="text" id="username" name="_username" value="{{ last_username }}"
9
+        class="niceinput"
10
+        placeholder="{{ 'security.login.username'|trans({}, 'userui') }}"
11
+      />
9
 
12
 
10
-      <label for="password">{{ 'security.login.password'|trans({}, 'FOSUserBundle') }}</label>
11
-      <input type="password" id="password" name="_password" />
12
-
13
-      <br />
14
-      <input type="checkbox" id="remember_me" name="_remember_me" value="on" />
15
-      <label for="remember_me">{{ 'login.remember_me.label'|trans({}, 'userui') }}</label>
13
+      <input type="password" id="password" name="_password"
14
+        class="niceinput"
15
+        placeholder="{{ 'security.login.password'|trans({}, 'userui') }}""
16
+      />
16
 
17
 
17
       <input type="submit" class="button" id="_submit" name="_submit" value="{{ 'security.login.submit'|trans({}, 'FOSUserBundle') }}" />
18
       <input type="submit" class="button" id="_submit" name="_submit" value="{{ 'security.login.submit'|trans({}, 'FOSUserBundle') }}" />
19
+      
20
+      <div class="textcenter">
21
+        <input type="checkbox" id="remember_me" name="_remember_me" value="on" />
22
+        <label for="remember_me">{{ 'login.remember_me.label'|trans({}, 'userui') }}</label>
23
+        - <a href="{{ path('fos_user_resetting_request') }}">{{ 'connexion.password_lost'|trans({}, 'userui') }}</a>
24
+      </div>
25
+
18
   </form>
26
   </form>
19
 </div>
27
 </div>
20
-
21
-<a href="{{ path('fos_user_resetting_request') }}">{{ 'connexion.password_lost'|trans({}, 'userui') }}</a>

+ 1 - 0
src/Muzich/UserBundle/Resources/views/User/account.html.twig View File

1
 {% extends "MuzichUserBundle::layout.html.twig" %}
1
 {% extends "MuzichUserBundle::layout.html.twig" %}
2
 
2
 
3
 {% block title %}Mon compte{% endblock %}
3
 {% block title %}Mon compte{% endblock %}
4
+{% block mainbox_classes %}mainbox_padding{% endblock %}
4
 
5
 
5
 {% block content %}
6
 {% block content %}
6
 
7
 

+ 3 - 2
src/Muzich/UserBundle/Resources/views/User/start.html.twig View File

1
 {% extends "MuzichUserBundle::layout.html.twig" %}
1
 {% extends "MuzichUserBundle::layout.html.twig" %}
2
 
2
 
3
 {% block title %}{{ 'start.title'|trans([], 'userui') }}{% endblock %}
3
 {% block title %}{{ 'start.title'|trans([], 'userui') }}{% endblock %}
4
+{% block mainbox_classes %}mainbox_padding mainbox_start{% endblock %}
4
 
5
 
5
 {% block content %}
6
 {% block content %}
6
 
7
 
7
-  <h2>{{ 'start.titleh2'|trans([], 'userui') }}</h2>
8
+  <h1>{{ 'start.titleh2'|trans([], 'userui') }}</h1>
8
   
9
   
9
   <p>
10
   <p>
10
-    {{ 'start.description'|trans([], 'userui') }}</h2>
11
+    {{ 'start.description'|trans([], 'userui') }}
11
   </p>
12
   </p>
12
   
13
   
13
   <h3>{{ 'start.tags.title'|trans([], 'userui') }}</h3>
14
   <h3>{{ 'start.tags.title'|trans([], 'userui') }}</h3>

+ 16 - 16
web/bundles/muzichcore/css/old.css View File

5
 }*/
5
 }*/
6
 
6
 
7
 
7
 
8
-#container
8
+/*#container
9
 {
9
 {
10
   text-align: left;
10
   text-align: left;
11
   position: relative;
11
   position: relative;
50
 #container h4
50
 #container h4
51
 {
51
 {
52
   
52
   
53
-}
53
+}*/
54
 
54
 
55
 div.clearboth
55
 div.clearboth
56
 {
56
 {
84
   background-color: #39C9CC;
84
   background-color: #39C9CC;
85
 }*/
85
 }*/
86
 
86
 
87
-#container a, #autoplay a
87
+/*#container a, #autoplay a
88
 {
88
 {
89
   text-decoration: none;
89
   text-decoration: none;
90
   color: #00d0de;
90
   color: #00d0de;
91
-}
91
+}*/
92
 
92
 
93
 #autoplay div.jp-audio a
93
 #autoplay div.jp-audio a
94
 {
94
 {
95
   color: black;
95
   color: black;
96
 }
96
 }
97
 
97
 
98
-#container a.button, #autoplay a.button
98
+/*#container a.button, #autoplay a.button
99
 {
99
 {
100
   color: white;
100
   color: white;
101
 }
101
 }
132
   border-radius: 5px 5px 0px 0px;
132
   border-radius: 5px 5px 0px 0px;
133
   -moz-border-radius: 5px 5px 0px 0px;
133
   -moz-border-radius: 5px 5px 0px 0px;
134
   -webkit-border-radius: 5px 5px 0px 0px;
134
   -webkit-border-radius: 5px 5px 0px 0px;
135
-}
135
+}*/
136
 
136
 
137
 /* Noscript */
137
 /* Noscript */
138
 div#noscript_warning
138
 div#noscript_warning
184
   background-color: white;
184
   background-color: white;
185
 }
185
 }
186
 
186
 
187
-#container #top-tabs li.active, .top-tabs-right ul.active, .top-tabs-right ul.active li
187
+/*#container #top-tabs li.active, .top-tabs-right ul.active, .top-tabs-right ul.active li
188
 {
188
 {
189
   background-color: white;
189
   background-color: white;
190
 }
190
 }
193
 {
193
 {
194
   text-decoration: none;
194
   text-decoration: none;
195
   color: black;
195
   color: black;
196
-}
196
+}*/
197
 
197
 
198
 .top-tabs-right
198
 .top-tabs-right
199
 {
199
 {
547
   left: 483px;
547
   left: 483px;
548
 }*/
548
 }*/
549
 
549
 
550
-#container li.element a.favorite_link:hover, #autoplay li.element a.favorite_link:hover
550
+/*#container li.element a.favorite_link:hover, #autoplay li.element a.favorite_link:hover
551
 {
551
 {
552
   text-decoration: none;
552
   text-decoration: none;
553
-}
553
+}*/
554
 
554
 
555
 li.element a.element_open
555
 li.element a.element_open
556
 {
556
 {
590
   height: 90px;
590
   height: 90px;
591
 }
591
 }
592
 
592
 
593
-#container li.element span.element_name a, #autoplay li.element span.element_name a
593
+/*#container li.element span.element_name a, #autoplay li.element span.element_name a
594
 {
594
 {
595
   color: black;
595
   color: black;
596
-}
596
+}*/
597
 
597
 
598
 li.element img.play, li.element img.open
598
 li.element img.play, li.element img.open
599
 {
599
 {
1004
 
1004
 
1005
 /* END POPIN BLOCK */
1005
 /* END POPIN BLOCK */
1006
 
1006
 
1007
-#container a.element_edit_link
1007
+/*#container a.element_edit_link
1008
 {
1008
 {
1009
   text-decoration: none;
1009
   text-decoration: none;
1010
-}
1010
+}*/
1011
 
1011
 
1012
 div.display_more_elements
1012
 div.display_more_elements
1013
 {
1013
 {
1307
   color: blue;
1307
   color: blue;
1308
 }
1308
 }
1309
 
1309
 
1310
-div#add_url_title
1310
+/*div#add_url_title
1311
 {
1311
 {
1312
   width: 510px;
1312
   width: 510px;
1313
   font-weight: bold;
1313
   font-weight: bold;
1315
   white-space: nowrap;
1315
   white-space: nowrap;
1316
   overflow: hidden;
1316
   overflow: hidden;
1317
   text-overflow: ellipsis;
1317
   text-overflow: ellipsis;
1318
-}
1318
+}*/
1319
 
1319
 
1320
 div#autoplay
1320
 div#autoplay
1321
 {
1321
 {

+ 82 - 54
web/bundles/muzichcore/js/muzich.js View File

292
       $(this).parent('li').addClass('selected');
292
       $(this).parent('li').addClass('selected');
293
     }
293
     }
294
     
294
     
295
-    if ($('div#home_top_tools:visible').length)
295
+    if ($('div.top_tools:visible').length)
296
     {
296
     {
297
-      $('div#home_top_tools').slideUp();
297
+      $('div.top_tools').slideUp();
298
     }
298
     }
299
     
299
     
300
     // On initialise la liste de tags déjà ajouté
300
     // On initialise la liste de tags déjà ajouté
314
     $(this).parents('ul#tabs_tag_search_buttons').find('li').removeClass('selected');
314
     $(this).parents('ul#tabs_tag_search_buttons').find('li').removeClass('selected');
315
     $(this).parent('li').addClass('selected');
315
     $(this).parent('li').addClass('selected');
316
     
316
     
317
-    if ($('div#home_top_tools:visible').length == 0)
317
+    if ($('div.top_tools:visible').length == 0)
318
     {
318
     {
319
-      $('div#home_top_tools').slideDown();
319
+      $('div.top_tools').slideDown();
320
     }
320
     }
321
     
321
     
322
     var form = $('form[name="search"]');
322
     var form = $('form[name="search"]');
357
       {
357
       {
358
         $('ul#tabs_tag_search_buttons').find('li').removeClass('selected');
358
         $('ul#tabs_tag_search_buttons').find('li').removeClass('selected');
359
         $('li#tab_li_tag_search_with_tags').addClass('selected');
359
         $('li#tab_li_tag_search_with_tags').addClass('selected');
360
-        if (!$('div#home_top_tools:visible').length)
360
+        if (!$('div.top_tools:visible').length)
361
         {
361
         {
362
-          $('div#home_top_tools').slideDown();
362
+          $('div.top_tools').slideDown();
363
         }
363
         }
364
       }
364
       }
365
       
365
       
517
    // Plus d'éléments
517
    // Plus d'éléments
518
    var last_id = null;
518
    var last_id = null;
519
    $('a.elements_more').click(function(){
519
    $('a.elements_more').click(function(){
520
-     var link = $(this);
521
-     var last_element = $('ul.elements li.element:last-child');
522
-     var id_last = str_replace('element_', '', last_element.attr('id'));
523
-     var invertcolor = 0;
524
-     if (last_element.hasClass('even'))
525
-     {
526
-       invertcolor = 1;
527
-     }
528
-     $('img.elements_more_loader').show();
529
-     
530
-     var url = link.attr('href')+'/'+id_last+'/'+invertcolor;
531
-     // Cas exeptionel si on se trouve sur la global_search
532
-     if ($('div#results_search_form').length)
533
-     {
534
-       url = link.attr('href')+id_last+'/'+$('div#results_search_form form input[type="text"]').val();
535
-     }
536
-     
537
-     var old_form_action = $('form[name="search"]').attr('action');
538
-     $('form[name="search"]').attr('action', url);
520
+    
521
+    $('img.elements_more_loader').show();
522
+    // On fait un cas isolé (pour l'instant!!)
523
+    if (!$(this).hasClass('event_view'))
524
+    {
525
+      var link = $(this);
526
+      var last_element = $('ul.elements li.element:last-child');
527
+      var id_last = str_replace('element_', '', last_element.attr('id'));
528
+      
529
+      
530
+      var url = link.attr('href')+'/'+id_last;
531
+      // Cas exeptionel si on se trouve sur la global_search
532
+      if ($('div#results_search_form').length)
533
+      {
534
+        url = link.attr('href')+id_last+'/'+$('div#results_search_form form input[type="text"]').val();
535
+      }
536
+      
537
+      var old_form_action = $('form[name="search"]').attr('action');
538
+      $('form[name="search"]').attr('action', url);
539
+      
540
+      var data = $('form[name="search"]').serialize();
541
+      var type = 'POST';
542
+    }
543
+    else
544
+    {
545
+      var link = $(this);
546
+      var url = $(this).attr('href');
547
+      var data = {};
548
+      var type = 'GET';
549
+    }
539
          
550
          
540
      $.ajax({
551
      $.ajax({
541
-       type: 'POST',
552
+       type: type,
542
        url: url,
553
        url: url,
543
-       data: $('form[name="search"]').serialize(),
554
+       data: data,
544
        success: function(response) {
555
        success: function(response) {
545
           if (response.status == 'mustbeconnected')
556
           if (response.status == 'mustbeconnected')
546
            {
557
            {
552
             $('ul.elements').append(response.html);
563
             $('ul.elements').append(response.html);
553
             $('img.elements_more_loader').hide();
564
             $('img.elements_more_loader').hide();
554
             recolorize_element_list();
565
             recolorize_element_list();
566
+            
567
+            if (link.hasClass('event_view'))
568
+            {
569
+              link.attr('href', response.data.more_link_href);
570
+            }
555
           }
571
           }
556
-
572
+          
557
           if (response.end || response.count < 1)
573
           if (response.end || response.count < 1)
558
           {
574
           {
559
             $('img.elements_more_loader').hide();
575
             $('img.elements_more_loader').hide();
564
         },
580
         },
565
        dataType: "json"
581
        dataType: "json"
566
      });
582
      });
567
-         
568
-     $('form[name="search"]').attr('action', old_form_action);
569
      
583
      
570
-//     $.getJSON(url, function(response) {
571
-//       if (response.status == 'mustbeconnected')
572
-//        {
573
-//          $(location).attr('href', url_index);
574
-//        }
575
-//       
576
-//       if (response.count)
577
-//       {
578
-//         $('ul.elements').append(response.html);
579
-//         $('img.elements_more_loader').hide();
580
-//         recolorize_element_list();
581
-//       }
582
-//       
583
-//       if (response.end || response.count < 1)
584
-//       {
585
-//         $('img.elements_more_loader').hide();
586
-//         $('ul.elements').after('<div class="no_elements"><p class="no-elements">'+
587
-//           response.message+'</p></div>');
588
-//         link.hide();
589
-//       }
590
-//     });
591
-
592
-     return false;
584
+     if (!$(this).hasClass('event_view'))
585
+    {
586
+      $('form[name="search"]').attr('action', old_form_action);
587
+    }
588
+    return false;
593
    });
589
    });
594
    
590
    
595
   tag_box_input_value = $('ul.tagbox input[type="text"]').val();
591
   tag_box_input_value = $('ul.tagbox input[type="text"]').val();
1177
       {
1173
       {
1178
         if ($('a#tabs_tag_search_with_tags').parent('li').hasClass('selected'))
1174
         if ($('a#tabs_tag_search_with_tags').parent('li').hasClass('selected'))
1179
         {
1175
         {
1180
-          $('div#home_top_tools').slideDown();
1176
+          $('div.top_tools').slideDown();
1181
         }
1177
         }
1182
       }
1178
       }
1183
       remove_tags('add');
1179
       remove_tags('add');
2439
     }
2435
     }
2440
     
2436
     
2441
   });
2437
   });
2438
+  
2439
+  /* Click sur le bouton de recherche des champs de recherches */
2440
+  $('div.seachboxcontainer a.global_search_link').click(function(){
2441
+    $(this).parents('div.seachboxcontainer').find('form').submit();
2442
+  });
2443
+  
2444
+  /* Ouverture des menus deroulants */
2445
+  $('ul.secondarymenu a.top_menu_link').click(function(){
2446
+    
2447
+    if ($(this).parents('li.top_menu_element').hasClass('close'))
2448
+    {
2449
+      $(this).parents('li.top_menu_element').find('ul.submenu').hide();
2450
+      $(this).parents('li.top_menu_element').removeClass('close');
2451
+      $(this).parents('li.top_menu_element').addClass('open');
2452
+      $(this).parents('li.top_menu_element').find('ul.submenu').slideDown();
2453
+    }
2454
+    else
2455
+    {
2456
+      $(this).parents('li.top_menu_element').removeClass('open');
2457
+      $(this).parents('li.top_menu_element').addClass('close');
2458
+    }
2459
+    
2460
+    return false;
2461
+  });
2462
+
2463
+  $('div#secondarymenu ul.submenu').each(function(){
2464
+    if ($(this).find('li').length > 7)
2465
+    {
2466
+      $(this).css('overflow', 'auto');
2467
+      $(this).css('height', '283px');
2468
+    }
2469
+  });
2442
 
2470
 
2443
 });
2471
 });
2444
 
2472
 

+ 2 - 2
web/bundles/muzichgroups/css/groups.css View File

5
   float: right;
5
   float: right;
6
 }
6
 }
7
 
7
 
8
-#container #group_add_box
8
+/*#container #group_add_box
9
 {
9
 {
10
   background-color: #e3f6fd;
10
   background-color: #e3f6fd;
11
   padding: 20px;
11
   padding: 20px;
12
-}
12
+}*/

+ 3 - 3
web/bundles/muzichgroups/js/groups.js View File

1
 $(document).ready(function(){
1
 $(document).ready(function(){
2
-   
3
    // Ouverture de la zone "ajouter un group""
2
    // Ouverture de la zone "ajouter un group""
4
    $('#group_add_link').click(function(){
3
    $('#group_add_link').click(function(){
5
      $('#group_add_box').slideDown("slow");
4
      $('#group_add_box').slideDown("slow");
6
      $('#group_add_link').hide();
5
      $('#group_add_link').hide();
6
+     $('#group_add_close_link').show();
7
      return false;
7
      return false;
8
    });   
8
    });   
9
    
9
    
11
    $('#group_add_close_link').click(function(){
11
    $('#group_add_close_link').click(function(){
12
      $('#group_add_box').slideUp("slow");
12
      $('#group_add_box').slideUp("slow");
13
      $('#group_add_link').show();
13
      $('#group_add_link').show();
14
+     $(this).hide();
14
      return false;
15
      return false;
15
-   }); 
16
-   
16
+   });
17
  });
17
  });

+ 6 - 6
web/bundles/muzichhome/css/home.css View File

16
   text-align: center;
16
   text-align: center;
17
 }
17
 }
18
 
18
 
19
-#container a.following
19
+/*#container a.following
20
 {
20
 {
21
   background: -moz-linear-gradient(top, #08ec00 0%, #10d400 39%, #0a9800 100%);
21
   background: -moz-linear-gradient(top, #08ec00 0%, #10d400 39%, #0a9800 100%);
22
   background: -webkit-linear-gradient(top, #08ec00 0%, #10d400 39%, #0a9800 100%);
22
   background: -webkit-linear-gradient(top, #08ec00 0%, #10d400 39%, #0a9800 100%);
40
 
40
 
41
   border: 1px solid #bf0a00;
41
   border: 1px solid #bf0a00;
42
   text-decoration: none;
42
   text-decoration: none;
43
-}
43
+}*/
44
 
44
 
45
-#container #element_add_link, #container #element_add_close_link
45
+/*#container #element_add_link, #container #element_add_close_link
46
 {
46
 {
47
   color: white;
47
   color: white;
48
   font-size: 120%;
48
   font-size: 120%;
49
   float: right;
49
   float: right;
50
-}
50
+}*/
51
 
51
 
52
-#container #element_add_box
52
+/*#container #element_add_box
53
 {
53
 {
54
   background-color: #e3f6fd;
54
   background-color: #e3f6fd;
55
   padding: 20px;
55
   padding: 20px;
56
-}
56
+}*/
57
 
57
 
58
 #container div.select_network a
58
 #container div.select_network a
59
 {
59
 {

+ 2 - 2
web/bundles/muzichhome/js/home.js View File

7
      $('#element_add_close_link').show();
7
      $('#element_add_close_link').show();
8
      if ($('a#tabs_tag_search_with_tags').parent('li').hasClass('selected'))
8
      if ($('a#tabs_tag_search_with_tags').parent('li').hasClass('selected'))
9
      {
9
      {
10
-       $('div#home_top_tools').slideUp();
10
+       $('div.top_tools').slideUp();
11
      }
11
      }
12
      // Au cas ou firefox garde la valeur step 2:
12
      // Au cas ou firefox garde la valeur step 2:
13
         $('input#form_add_step').val('1');
13
         $('input#form_add_step').val('1');
23
      
23
      
24
      if ($('a#tabs_tag_search_with_tags').parent('li').hasClass('selected'))
24
      if ($('a#tabs_tag_search_with_tags').parent('li').hasClass('selected'))
25
      {
25
      {
26
-       $('div#home_top_tools').slideDown();
26
+       $('div.top_tools').slideDown();
27
      }
27
      }
28
      
28
      
29
      //form_add_reinit();
29
      //form_add_reinit();

+ 3 - 3
web/bundles/muzichindex/css/index.css View File

17
 
17
 
18
 #login_box input[id="username"], #login_box input[id="password"]
18
 #login_box input[id="username"], #login_box input[id="password"]
19
 {
19
 {
20
-  width: 100px;
20
+  width: 230px;
21
 }
21
 }
22
 
22
 
23
-#registration_link, #login_link
23
+/*#registration_link, #login_link
24
 {
24
 {
25
   float: right;
25
   float: right;
26
   font-size: 120%;
26
   font-size: 120%;
27
-}
27
+}*/

+ 4 - 0
web/bundles/muzichindex/js/index.js View File

3
    $('#registration_link').click(function(){
3
    $('#registration_link').click(function(){
4
      $('#registration_box').slideDown("slow");
4
      $('#registration_box').slideDown("slow");
5
      $('#login_box').slideUp("slow");
5
      $('#login_box').slideUp("slow");
6
+     $(this).hide();
7
+     $('#login_link').show();
6
      return false;
8
      return false;
7
    });
9
    });
8
    
10
    
9
    $('#login_link').click(function(){
11
    $('#login_link').click(function(){
10
      $('#login_box').slideDown("slow");
12
      $('#login_box').slideDown("slow");
11
      $('#registration_box').slideUp("slow");
13
      $('#registration_box').slideUp("slow");
14
+     $('#registration_link').show();
15
+     $(this).hide();
12
      return false;
16
      return false;
13
    });
17
    });
14
    
18
    

+ 199 - 18
web/css/main.css View File

9
   color: #B80C1A;
9
   color: #B80C1A;
10
 }
10
 }
11
 
11
 
12
+html, body
13
+{
14
+  height:100%;
15
+}
16
+
12
 body a:visited
17
 body a:visited
13
 {
18
 {
14
   text-decoration: none;
19
   text-decoration: none;
20
   text-decoration: none;
25
   text-decoration: none;
21
 }
26
 }
22
 
27
 
28
+div#container
29
+{
30
+  position : relative;
31
+  min-height: 100%;
32
+}
33
+
23
 header#header
34
 header#header
24
 {
35
 {
25
   height: 80px;
36
   height: 80px;
84
 {
95
 {
85
   background-image: url("/img/header_menu_separator.png");
96
   background-image: url("/img/header_menu_separator.png");
86
   background-repeat: no-repeat;
97
   background-repeat: no-repeat;
87
-  width: 3px;
88
-  padding-left: 1px;
89
-  padding-right: 1px;
98
+  width: 5px;
99
+  padding-left: 0px;
100
+  padding-right: 0px;
101
+}
102
+
103
+#header_menu li.separator:hover
104
+{
105
+  background: none;
90
 }
106
 }
91
 
107
 
92
 #register_and_login
108
 #register_and_login
137
   border-bottom-right-radius: 5px;
153
   border-bottom-right-radius: 5px;
138
 }
154
 }
139
 
155
 
140
-#parameters
156
+/*#parameters
141
 {
157
 {
142
   float: right;
158
   float: right;
143
   border-right-width: 0;
159
   border-right-width: 0;
144
   margin-bottom: 0;
160
   margin-bottom: 0;
145
-  margin-left: -58px;
146
-  margin-right: 10px;
147
-  margin-top: 5px;
148
-  padding: 0px
149
-}
161
+  margin-left: 0;
162
+  margin-right: 0;
163
+  margin-top: 8px;
164
+}*/
150
 
165
 
151
-#parameters li
166
+/*#parameters li
152
 {
167
 {
153
   float: left;
168
   float: left;
154
   display: inline;
169
   display: inline;
160
   display: inline;
175
   display: inline;
161
   font-size: 80%;
176
   font-size: 80%;
162
   font-weight: bold;
177
   font-weight: bold;
178
+}*/
179
+
180
+div#languages
181
+{
182
+  float: right;
183
+  height: 16px;
184
+  overflow: hidden;
185
+  padding: 2px;
186
+  text-align: center;
187
+  width: 15px;
188
+  position: absolute;
189
+  margin-left: 945px;
190
+  margin-top: 7px;
191
+  -moz-border-radius: 3px;
192
+  -webkit-border-radius: 3px;
193
+  -khtml-border-radius: 3px;
194
+  border-radius: 3px;
195
+}
196
+
197
+div#languages a
198
+{
199
+  color: white;
200
+  font-weight: bold;
201
+  font-size: 11px;
163
 }
202
 }
164
 
203
 
165
-#parameters li a.languages
204
+div#languages:hover
166
 {
205
 {
167
-  padding-right: 3px;
168
-  padding-top: 4px;
206
+  height: auto;
207
+  background: #474747; /* Old browsers */
208
+  /* IE9 SVG, needs conditional override of 'filter' to 'none' */
209
+  background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzQ3NDc0NyIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjAlIiBzdG9wLWNvbG9yPSIjNDc0NzQ3IiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzIxMjEyMSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMyMTIxMjEiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
210
+  background: -moz-linear-gradient(top,  #474747 0%, #474747 0%, #212121 100%, #212121 100%); /* FF3.6+ */
211
+  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#474747), color-stop(0%,#474747), color-stop(100%,#212121), color-stop(100%,#212121)); /* Chrome,Safari4+ */
212
+  background: -webkit-linear-gradient(top,  #474747 0%,#474747 0%,#212121 100%,#212121 100%); /* Chrome10+,Safari5.1+ */
213
+  background: -o-linear-gradient(top,  #474747 0%,#474747 0%,#212121 100%,#212121 100%); /* Opera 11.10+ */
214
+  background: -ms-linear-gradient(top,  #474747 0%,#474747 0%,#212121 100%,#212121 100%); /* IE10+ */
215
+  background: linear-gradient(to bottom,  #474747 0%,#474747 0%,#212121 100%,#212121 100%); /* W3C */
216
+  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#474747', endColorstr='#212121',GradientType=0 ); /* IE6-8 */
169
 }
217
 }
170
 
218
 
219
+
171
 #content
220
 #content
172
 {
221
 {
173
   display: table;
222
   display: table;
174
   width: 980px;
223
   width: 980px;
175
   margin-right: auto;
224
   margin-right: auto;
176
   margin-left: auto;
225
   margin-left: auto;
226
+  padding-bottom: 135px;
227
+}
228
+
229
+#main_content
230
+{
231
+  position: relative;
232
+  min-height: 100%;
177
 }
233
 }
178
 
234
 
179
 #main
235
 #main
200
   padding: 0px;
256
   padding: 0px;
201
 }
257
 }
202
 
258
 
259
+#mainbox.mainbox_padding
260
+{
261
+  padding: 10px;
262
+}
263
+
203
 #mainbox h1
264
 #mainbox h1
204
 {
265
 {
205
   margin-top: 10px;
266
   margin-top: 10px;
882
   margin-right: 0px;
943
   margin-right: 0px;
883
 }
944
 }
884
 
945
 
885
-#element_add_link, #element_add_close_link
946
+#element_add_link, #element_add_close_link, #group_add_link, #group_add_close_link, #registration_link, #login_link
886
 {
947
 {
887
   float: right;
948
   float: right;
888
   margin-top: -58px;
949
   margin-top: -58px;
903
 
964
 
904
 }
965
 }
905
 
966
 
906
-#element_add_link img, #element_add_close_link img
967
+#registration_link, #login_link
968
+{
969
+  margin-right: -10px;
970
+  margin-top: -68px;
971
+}
972
+
973
+#element_add_link img, #element_add_close_link img, #group_add_link img, #group_add_close_link img, #registration_link img, #login_link img
907
 {
974
 {
908
   margin-bottom: -5px;
975
   margin-bottom: -5px;
909
     margin-right: -5px;
976
     margin-right: -5px;
910
 }
977
 }
911
 
978
 
912
-#element_add_link.justtopright, #element_add_close_link.justtopright
979
+#element_add_link.justtopright, #element_add_close_link.justtopright, #group_add_link.justtopright, #group_add_close_link.justtopright
913
 {
980
 {
914
   margin-top: 0px;
981
   margin-top: 0px;
915
   margin-right: 0px;
982
   margin-right: 0px;
953
   padding-right: 10px;
1020
   padding-right: 10px;
954
 }
1021
 }
955
 
1022
 
1023
+.nicetextbox
1024
+{
1025
+  -webkit-box-shadow: inset 0px 0px 2px 3px #c8c8c8;
1026
+  box-shadow: inset 0px 0px 2px 3px #c8c8c8; 
1027
+  height: 34px;
1028
+  -moz-border-radius: 4px;
1029
+  -webkit-border-radius: 4px;
1030
+   -khtml-border-radius: 4px;
1031
+  border-radius: 4px;
1032
+  border: medium none;
1033
+  padding: 10px;
1034
+  padding-right: 10px;
1035
+}
1036
+
956
 input:-moz-placeholder, textarea:-moz-placeholder {
1037
 input:-moz-placeholder, textarea:-moz-placeholder {
957
   color: black;
1038
   color: black;
958
 }
1039
 }
1047
 div#form_add_second_part input[type="submit"]
1128
 div#form_add_second_part input[type="submit"]
1048
 {
1129
 {
1049
   float: right;
1130
   float: right;
1050
-  margin-top: -10px;
1131
+  margin-top: -25px;
1051
 }
1132
 }
1052
 
1133
 
1053
 div#footer
1134
 div#footer
1058
   border-top: 4px solid #E51936;
1139
   border-top: 4px solid #E51936;
1059
   background-color: #171717;
1140
   background-color: #171717;
1060
   text-align: center;
1141
   text-align: center;
1142
+  position: absolute;
1143
+  bottom:0;
1061
 }
1144
 }
1062
 
1145
 
1063
 div#footer_content
1146
 div#footer_content
1172
 
1255
 
1173
 #container ul.search_tag_list li a
1256
 #container ul.search_tag_list li a
1174
 {
1257
 {
1175
-  color: black;
1258
+  color: #E7E7E7;
1176
 }
1259
 }
1177
 
1260
 
1178
 #container ul.search_tag_list li a:hover
1261
 #container ul.search_tag_list li a:hover
1322
   color: #999999;
1405
   color: #999999;
1323
 }
1406
 }
1324
 
1407
 
1408
+ul#favorite_tags li a.highlight
1409
+{
1410
+  color: #E51936;
1411
+}
1412
+
1413
+ul#favorite_tags li a.highlight.active
1414
+{
1415
+  color: #999999;
1416
+}
1417
+
1325
 input#element_add_name
1418
 input#element_add_name
1326
 {
1419
 {
1327
   width: 450px;
1420
   width: 450px;
1346
   float: right;
1439
   float: right;
1347
   padding: 10px;
1440
   padding: 10px;
1348
 }
1441
 }
1442
+
1443
+div.show_options a
1444
+{
1445
+  color: white;
1446
+}
1447
+
1448
+.nicelabels label
1449
+{
1450
+  display: block;
1451
+  float: left;
1452
+  font-size: 16px;
1453
+  font-weight: bold;
1454
+  padding-top: 6px;
1455
+  width: 100px;
1456
+}
1457
+
1458
+div#group_add_box label
1459
+{
1460
+  width: 110px;
1461
+}
1462
+
1463
+div#group_add_box input#group_name
1464
+{
1465
+  width: 488px;
1466
+}
1467
+
1468
+div#group_add_box textarea#group_description
1469
+{
1470
+  width: 487px;
1471
+  height: 85px;
1472
+}
1473
+
1474
+div#group_add_box input.tag_prompt
1475
+{
1476
+  width: 96%;
1477
+}
1478
+
1479
+div.alignright
1480
+{
1481
+  text-align: right;
1482
+}
1483
+
1484
+div#group_add_box input[type="submit"]
1485
+{
1486
+  margin-top: 10px;
1487
+}
1488
+
1489
+div#registration_box input.niceinput
1490
+{
1491
+  width: 430px;
1492
+}
1493
+
1494
+div#registration_box label
1495
+{
1496
+  width: 170px;
1497
+}
1498
+
1499
+div#registration_box div.field
1500
+{
1501
+  margin-bottom: 5px;
1502
+}
1503
+
1504
+.mainbox_start input.tag_prompt
1505
+{
1506
+  width: 96%;
1507
+}
1508
+
1509
+.mainbox_start input[type="submit"]
1510
+{
1511
+  float: right;
1512
+  margin-right: 7px;
1513
+  margin-top: 10px;
1514
+}
1515
+
1516
+div.global_search_results
1517
+{
1518
+  margin-top: 10px;
1519
+}
1520
+
1521
+div#add_url_title, div.element_title
1522
+{
1523
+  width: 510px;
1524
+  font-weight: bold;
1525
+  font-size: 15px;
1526
+  white-space: nowrap;
1527
+  overflow: hidden;
1528
+  text-overflow: ellipsis;
1529
+}

BIN
web/img/header_menu_separator.png View File