allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [4/6] allura git commit: Updated design inline with suggestions and removed widget from codebase
Date Wed, 03 Aug 2016 15:06:54 GMT
Updated design inline with suggestions and removed widget from codebase


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/6a960028
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/6a960028
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/6a960028

Branch: refs/heads/master
Commit: 6a9600282da7cbf0f766aeda155d68f9f24d3982
Parents: d7d8b6f
Author: Rohan Verma <rohanverma2004@gmail.com>
Authored: Mon Jul 18 21:33:32 2016 +0530
Committer: Dave Brondsema <dave@brondsema.net>
Committed: Wed Aug 3 11:05:17 2016 -0400

----------------------------------------------------------------------
 Allura/allura/controllers/repository.py         |  5 +---
 Allura/allura/lib/widgets/repo.py               | 12 +-------
 Allura/allura/nf/allura/css/site_style.css      | 30 ++++----------------
 .../allura/templates/repo/merge_requests.html   | 15 ++++++----
 4 files changed, 18 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/6a960028/Allura/allura/controllers/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/repository.py b/Allura/allura/controllers/repository.py
index 14745bf..fe2c9c9 100644
--- a/Allura/allura/controllers/repository.py
+++ b/Allura/allura/controllers/repository.py
@@ -45,7 +45,7 @@ from allura.lib.diff import HtmlSideBySideDiff
 from allura.lib.security import require_access, require_authenticated, has_access
 from allura.lib.widgets import form_fields as ffw
 from allura.lib.widgets.repo import SCMLogWidget, SCMRevisionWidget, SCMTreeWidget
-from allura.lib.widgets.repo import SCMMergeRequestWidget, SCMMergeRequestFilterWidget
+from allura.lib.widgets.repo import SCMMergeRequestWidget
 from allura.lib.widgets.repo import SCMMergeRequestDisposeWidget, SCMCommitBrowserWidget
 from allura.lib.widgets.subscriptions import SubscribeForm
 from allura.controllers import AppDiscussionController
@@ -335,15 +335,12 @@ class RepoRestController(RepoRootController, AppRestControllerMixin):
 
 
 class MergeRequestsController(object):
-    mr_filter = SCMMergeRequestFilterWidget()
 
     @with_trailing_slash
     @expose('jinja:allura:templates/repo/merge_requests.html')
-    @validate(mr_filter)
     def index(self, status=None, **kw):
         status = status or ['open']
         requests = c.app.repo.merge_requests_by_statuses(*status)
-        c.mr_filter = self.mr_filter
         return dict(
             status=status,
             requests=requests)

http://git-wip-us.apache.org/repos/asf/allura/blob/6a960028/Allura/allura/lib/widgets/repo.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/repo.py b/Allura/allura/lib/widgets/repo.py
index a43aa60..767094e 100644
--- a/Allura/allura/lib/widgets/repo.py
+++ b/Allura/allura/lib/widgets/repo.py
@@ -80,17 +80,7 @@ class SCMMergeRequestWidget(ff.ForgeForm):
                 options=self.target_branches),
             ffw.MarkdownEdit(name='description')]
         return result
-
-
-class SCMMergeRequestFilterWidget(ff.ForgeForm):
-    defaults = dict(
-        ff.ForgeForm.defaults,
-        submit_text='Filter',
-        method='GET')
-
-    class fields(ew_core.NameList):
-        status = ew.MultiSelectField(options=M.MergeRequest.statuses)
-
+    
 
 class SCMMergeRequestDisposeWidget(ff.ForgeForm):
 

http://git-wip-us.apache.org/repos/asf/allura/blob/6a960028/Allura/allura/nf/allura/css/site_style.css
----------------------------------------------------------------------
diff --git a/Allura/allura/nf/allura/css/site_style.css b/Allura/allura/nf/allura/css/site_style.css
index 289d4f6..f362abe 100644
--- a/Allura/allura/nf/allura/css/site_style.css
+++ b/Allura/allura/nf/allura/css/site_style.css
@@ -954,6 +954,7 @@ a.btn:active {
   border-radius: 0;
   border: 1px solid #aaaaaa !important;
 }
+
 .btn-set .btn:first-child {
   -moz-border-radius-topleft: 4px;
   -webkit-border-top-left-radius: 4px;
@@ -991,6 +992,10 @@ a.btn:active {
   margin: 0 0 0 0;
 }
 
+.btn-set .joined{
+    margin: 0 0 10px 0 !important;
+}
+
 .btn-bar, #top_nav {
   display: block;
   clear: both;
@@ -1211,7 +1216,7 @@ a.active {
   width: 960px;
 }
 
-.nested-grid-container {
+.filter-container {
   display: inline-block;
   overflow: hidden;
   padding-left: 10px;
@@ -1219,29 +1224,6 @@ a.active {
   width: auto;
 }
 
-label.btn-set{
-    float:left;
-    position:relative;
-    top: 5px;
-    padding-right: 5px;
-}
-
-button.btn-set{
-    margin: 0px;
-    border-radius: 0px;
-    font-weight: bold;
-}
-
-button.btn-set.left{
-    border-top-left-radius: 4px;
-    border-bottom-left-radius: 4px;
-}
-
-button.btn-set.right{
-    border-top-right-radius: 4px;
-    border-bottom-right-radius: 4px;
-}
-
 .grid-block {
   display: inline;
   float: left;

http://git-wip-us.apache.org/repos/asf/allura/blob/6a960028/Allura/allura/templates/repo/merge_requests.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/merge_requests.html b/Allura/allura/templates/repo/merge_requests.html
index 4100daf..61341c9 100644
--- a/Allura/allura/templates/repo/merge_requests.html
+++ b/Allura/allura/templates/repo/merge_requests.html
@@ -18,18 +18,23 @@
 -#}
 {% extends 'allura:templates/repo/repo_master.html' %}
 
+{% set status = request.params.get('status' , '') %}
+
 {% block title %}
   {{c.project.name}} / {{c.app.config.options.mount_label}} / Merge Requests
 {% endblock %}
 
 {% block header %}{{c.app.config.options.mount_label}} Merge Requests{% endblock %}
 {% block content %}
-  <div class="nested-grid-container">
+  <div class="filter-container">
     <form method="GET" action=".">
-        <label class="btn-set">Filter </label>
-        <button type="submit" class="submit btn-set left" style="color:green" name="status"
value="open">Open</button>
-        <button type="submit" class="submit btn-set" style="color:red" name="status" value="closed">Closed</button>
-        <button type="submit" class="submit btn-set right" style="color:DeepSkyBlue" name="status"
value="merged">Merged</button>
+        <div class="btn-set">
+            <button type="button" class="btn duo joined"><i class="fa fa-filter"
aria-hidden="true"></i></button>
+            <button type="submit" class="btn duo joined {% if status == '' %}active{%
endif %}" name="status" value="">All</button>
+            <button type="submit" class="btn duo joined {% if status == 'open' %}active{%
endif %}" style="color:green" name="status" value="open">Open</button>
+            <button type="submit" class="btn duo joined {% if status == 'closed' %}active{%
endif %}" style="color:red" name="status" value="closed">Closed</button>
+            <button type="submit" class="btn duo joined {% if status == 'merged' %}active{%
endif %}" style="color:DeepSkyBlue" name="status" value="merged">Merged</button>
+        </div>
     </form>
   </div>
 


Mime
View raw message