changeset 2717:c868f29f6d90

Fixed #3: Now user can select a filter(open/closed/all) and then choose sort option and only tickets relevant to that filter will be displayed
author Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
date Thu, 14 Aug 2014 23:28:15 +0530
parents b9ef8aedf9ce
children 350e28aa263f
files MoinMoin/templates/tickets.html MoinMoin/themes/basic/static/css/theme.css MoinMoin/themes/basic/static/custom-less/theme.less
diffstat 3 files changed, 40 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/templates/tickets.html	Thu Aug 14 23:12:19 2014 +0530
+++ b/MoinMoin/templates/tickets.html	Thu Aug 14 23:28:15 2014 +0530
@@ -27,14 +27,22 @@
     </button>
     <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
         <li role="presentation">
-            <a role="menuitem" tabindex="-1" href="{{ url_for('frontend.tickets', selected_tags=list(selected_tags), time_sorting='new') }}">
-                {{_("Recently updated")}}
-            </a>
+            <form action="{{ url_for('frontend.tickets', selected_tags=list(selected_tags), time_sorting='new') }}" method="post">
+                <input type="hidden" name="status" value="{{ status }}">
+                <input type="hidden" name="q" value="{{ query if query }}" >
+                <button type="submit">
+                    {{_("Recently updated")}}
+                </button>
+            </form>
         </li>
         <li role="presentation">
-            <a role="menuitem" tabindex="-1" href="{{ url_for('frontend.tickets', selected_tags=list(selected_tags), time_sorting='old') }}">
-                {{_("Least recently updated")}}
-            </a>
+            <form action="{{ url_for('frontend.tickets', selected_tags=list(selected_tags), time_sorting='old') }}" method="post">
+                <input type="hidden" name="status" value="{{ status }}">
+                <input type="hidden" name="q" value="{{ query if query }}" >
+                <button type="submit">
+                    {{_("Least Recently updated")}}
+                </button>
+            </form>
         </li>
     </ul>
 </div>
--- a/MoinMoin/themes/basic/static/css/theme.css	Thu Aug 14 23:12:19 2014 +0530
+++ b/MoinMoin/themes/basic/static/css/theme.css	Thu Aug 14 23:28:15 2014 +0530
@@ -7045,3 +7045,16 @@
 .moin-index-actions .navbar-collapse {
   padding-left: 0;
 }
+.tickets-sort-button .dropdown-menu li form button {
+  display: block;
+  border: none;
+  background-color: #ffffff;
+  padding: 3px 20px;
+  clear: both;
+  font-weight: normal;
+  white-space: nowrap;
+}
+.tickets-sort-button .dropdown-menu li form button:hover,
+.tickets-sort-button .dropdown-menu li form button:focus {
+  background-color: #f5f5f5;
+}
--- a/MoinMoin/themes/basic/static/custom-less/theme.less	Thu Aug 14 23:12:19 2014 +0530
+++ b/MoinMoin/themes/basic/static/custom-less/theme.less	Thu Aug 14 23:28:15 2014 +0530
@@ -768,4 +768,16 @@
     padding-left: 0;
   }
 }
-
+.tickets-sort-button .dropdown-menu li form button {
+  display: block;
+  border: none;
+  background-color: #ffffff;
+  padding: 3px 20px;
+  clear: both;
+  font-weight: normal;
+  white-space: nowrap;
+}
+.tickets-sort-button .dropdown-menu li form button:hover,
+.tickets-sort-button .dropdown-menu li form button:focus {
+  background-color: #f5f5f5;
+}