浏览代码

créer un ticket pour: lorsque l'on ajoute plusieurs partages de suite: les tags du tagPrompt reste.

Bastien Sevajol 12 年前
父节点
当前提交
f8f00bd9c2

+ 4 - 0
app/Resources/translations/userui.fr.yml 查看文件

94
   follower_users:
94
   follower_users:
95
     title:                  Suivis par
95
     title:                  Suivis par
96
     nouser:                Aucun
96
     nouser:                Aucun
97
+  otherpages:
98
+    title:                 Pages spéciales
99
+    needtags:
100
+      title:               Partages en demandes de tags
97
 
101
 
98
 filter:
102
 filter:
99
   network: "Résultats de "
103
   network: "Résultats de "

+ 21 - 0
src/Muzich/CoreBundle/Resources/views/Menu/side_menu.html.twig 查看文件

87
       
87
       
88
   </ul>
88
   </ul>
89
   
89
   
90
+  <ul class="secondarymenu">
91
+    <li class="top_menu_element close">
92
+      
93
+      <a href="" class="top_menu_link">
94
+        <div class="blackgradiant">
95
+            {{ 'submenu.otherpages.title'|trans({}, 'userui') }}
96
+            <div class="dart"></div>
97
+        </div>
98
+      </a>
99
+      
100
+      <ul class="submenu">
101
+        <li class="sub_menu_element">
102
+          <a href="{{ path('element_show_need_tags') }}">
103
+            {{ 'submenu.otherpages.needtags.title'|trans({}, 'userui') }}
104
+          </a>
105
+        </li>
106
+      </ul>
107
+    </li>
108
+      
109
+  </ul>
110
+  
90
 </div>
111
 </div>

+ 6 - 0
src/Muzich/CoreBundle/Searcher/ElementSearcher.php 查看文件

157
       'ids'         => $this->getIds(),
157
       'ids'         => $this->getIds(),
158
       'ids_display' => $this->getIdsDisplay(),
158
       'ids_display' => $this->getIdsDisplay(),
159
       'tag_strict'  => $this->getTagStrict(),
159
       'tag_strict'  => $this->getTagStrict(),
160
+      'need_tags'   => $this->getNeedTags(),
160
       'string'      => $this->getString()
161
       'string'      => $this->getString()
161
     );
162
     );
162
   }
163
   }
268
     return $this->tag_strict;
269
     return $this->tag_strict;
269
   }
270
   }
270
   
271
   
272
+  public function getNeedTags()
273
+  {
274
+    return ($this->need_tags);
275
+  }
276
+  
271
   public function setString($string)
277
   public function setString($string)
272
   {
278
   {
273
     $this->string = $string;
279
     $this->string = $string;

+ 8 - 4
src/Muzich/HomeBundle/Controller/HomeController.php 查看文件

44
   
44
   
45
   public function needTagsAction()
45
   public function needTagsAction()
46
   {
46
   {
47
-    $es = new ElementSearcher();
47
+    $es = $this->getNewElementSearcher();
48
     $es->init(array(
48
     $es->init(array(
49
       'count'     => $this->container->getParameter('search_default_count'),
49
       'count'     => $this->container->getParameter('search_default_count'),
50
-      'need_tags' => true
50
+      'need_tags' => true,
51
+      'tags'      => array()
51
     ));
52
     ));
53
+    $this->setElementSearcherParams($es->getParams(), $this->getUser()->getPersonalHash('needstagpage'));
54
+    $elements = $es->getElements($this->getDoctrine(), $this->getUserId());
52
     
55
     
53
     return $this->render('MuzichHomeBundle:Home:need_tags.html.twig', array(
56
     return $this->render('MuzichHomeBundle:Home:need_tags.html.twig', array(
54
-      'elements' => $es->getElements($this->getDoctrine(), $this->getUserId()),
55
-      'topmenu_active' => 'needs-tags'
57
+      'elements'        => $elements,
58
+      'topmenu_active'  => 'needs-tags',
59
+      'last_element_id' => (count($elements))?$elements[count($elements)-1]->getId():null
56
     ));
60
     ));
57
   }
61
   }
58
   
62
   

+ 10 - 3
src/Muzich/HomeBundle/Resources/views/Home/need_tags.html.twig 查看文件

4
 
4
 
5
 {% block content %}
5
 {% block content %}
6
 
6
 
7
-  <h1>{{ 'title.need_tags'|trans({}, 'navigationui') }}</h1>
7
+  <div class="top_tools">
8
+    <h1>{{ 'title.need_tags'|trans({}, 'navigationui') }}</h1>
8
 
9
 
9
-  <p>{{ 'need_tags.text_help'|trans({}, 'userui') }}</p>
10
+    <p>{{ 'need_tags.text_help'|trans({}, 'userui') }}</p>
11
+  </div>
10
   
12
   
11
   <div class="display_more_elements" style="display: none;">
13
   <div class="display_more_elements" style="display: none;">
12
     <span></span>
14
     <span></span>
21
   {% include "MuzichCoreBundle:SearchElement:more_button.html.twig" with {
23
   {% include "MuzichCoreBundle:SearchElement:more_button.html.twig" with {
22
     'display_more_button' : true,
24
     'display_more_button' : true,
23
     'elements_length'     : elements|length,
25
     'elements_length'     : elements|length,
24
-    'more_path'           : 'search_elements'
26
+    'more_path'           : 'search_elements_more',
27
+    'more_path_params'    : {
28
+      'session_id' : app.user.getPersonalHash('needstagpage'),
29
+      'id_limit'   : last_element_id
30
+    },
31
+    'link_class'          : 'event_view'
25
   }%}
32
   }%}
26
   
33
   
27
 {% endblock %}
34
 {% endblock %}

+ 1 - 1
web/css/main.css 查看文件

768
 div#secondarymenu ul.submenu li.sub_menu_element a
768
 div#secondarymenu ul.submenu li.sub_menu_element a
769
 {
769
 {
770
   color: black;
770
   color: black;
771
-  text-transform : capitalize;
771
+  text-transform : uppercase;
772
   font-weight: inherit;
772
   font-weight: inherit;
773
 }
773
 }
774
 
774