소스 검색

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,6 +94,10 @@ submenu:
94 94
   follower_users:
95 95
     title:                  Suivis par
96 96
     nouser:                Aucun
97
+  otherpages:
98
+    title:                 Pages spéciales
99
+    needtags:
100
+      title:               Partages en demandes de tags
97 101
 
98 102
 filter:
99 103
   network: "Résultats de "

+ 21 - 0
src/Muzich/CoreBundle/Resources/views/Menu/side_menu.html.twig 파일 보기

@@ -87,4 +87,25 @@
87 87
       
88 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 111
 </div>

+ 6 - 0
src/Muzich/CoreBundle/Searcher/ElementSearcher.php 파일 보기

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

+ 8 - 4
src/Muzich/HomeBundle/Controller/HomeController.php 파일 보기

@@ -44,15 +44,19 @@ class HomeController extends Controller
44 44
   
45 45
   public function needTagsAction()
46 46
   {
47
-    $es = new ElementSearcher();
47
+    $es = $this->getNewElementSearcher();
48 48
     $es->init(array(
49 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 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,9 +4,11 @@
4 4
 
5 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 13
   <div class="display_more_elements" style="display: none;">
12 14
     <span></span>
@@ -21,7 +23,12 @@
21 23
   {% include "MuzichCoreBundle:SearchElement:more_button.html.twig" with {
22 24
     'display_more_button' : true,
23 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 34
 {% endblock %}

+ 1 - 1
web/css/main.css 파일 보기

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