allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [2/2] git commit: [#7324] ticket:577 Hide left bar; move 'add' & 'search' to action bar
Date Fri, 25 Apr 2014 14:31:17 GMT
[#7324] ticket:577 Hide left bar; move 'add' & 'search' to action bar


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

Branch: refs/heads/master
Commit: 33a2baefc6d7e4de86a5f7dfccf3b7850b0d3d7a
Parents: d21626d
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Thu Apr 24 16:37:48 2014 +0300
Committer: Igor Bondarenko <jetmind2@gmail.com>
Committed: Thu Apr 24 16:37:48 2014 +0300

----------------------------------------------------------------------
 ForgeShortUrl/forgeshorturl/main.py               | 11 -----------
 ForgeShortUrl/forgeshorturl/templates/index.html  | 14 ++++++++++++++
 ForgeShortUrl/forgeshorturl/templates/master.html |  7 +++++++
 3 files changed, 21 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/33a2baef/ForgeShortUrl/forgeshorturl/main.py
----------------------------------------------------------------------
diff --git a/ForgeShortUrl/forgeshorturl/main.py b/ForgeShortUrl/forgeshorturl/main.py
index 64ba3e1..377fa62 100644
--- a/ForgeShortUrl/forgeshorturl/main.py
+++ b/ForgeShortUrl/forgeshorturl/main.py
@@ -86,17 +86,6 @@ class ForgeShortUrlApp(Application):
         menu_id = self.config.options.mount_label
         return [SitemapEntry(menu_id, '.')]
 
-    def sidebar_menu(self):
-        links = []
-        if has_access(c.app, "create"):
-            url = '%sadmin/%s/add/' % \
-                  (c.project.url(), self.config.options.mount_point)
-            links = [SitemapEntry('Add Short URL',
-                                  url,
-                                  ui_icon=g.icons['plus'],
-                                  className="add-short-url"), ]
-        return links
-
     def admin_menu(self):
         links = []
         if has_access(c.app, "create"):

http://git-wip-us.apache.org/repos/asf/allura/blob/33a2baef/ForgeShortUrl/forgeshorturl/templates/index.html
----------------------------------------------------------------------
diff --git a/ForgeShortUrl/forgeshorturl/templates/index.html b/ForgeShortUrl/forgeshorturl/templates/index.html
index f24e475..c0607f3 100644
--- a/ForgeShortUrl/forgeshorturl/templates/index.html
+++ b/ForgeShortUrl/forgeshorturl/templates/index.html
@@ -19,6 +19,20 @@
 {% extends 'forgeshorturl:templates/master.html' %}
 
 {% set can_update = c.user and h.has_access(c.app, 'update') %}
+{% set can_create = c.user and h.has_access(c.app, 'create') %}
+
+{% block actions %}
+  {% if can_create %}
+  <a href="{{ '{}admin/{}/add/'.format(c.project.url(), c.app.config.options.mount_point)
}}"
+     title="Add Short URL"
+     class="add-short-url">
+    <b data-icon="{{g.icons['plus'].char}}" class="ico {{g.icons['plus'].css}}"></b>
+  </a>
+  {% endif %}
+  <a href="search/" title="Search">
+    <b data-icon="{{g.icons['search'].char}}" class="ico {{g.icons['search'].css}}"></b>
+  </a>
+{% endblock %}
 
 {% block content %}
 <table>

http://git-wip-us.apache.org/repos/asf/allura/blob/33a2baef/ForgeShortUrl/forgeshorturl/templates/master.html
----------------------------------------------------------------------
diff --git a/ForgeShortUrl/forgeshorturl/templates/master.html b/ForgeShortUrl/forgeshorturl/templates/master.html
index 98186ec..d67e9d4 100644
--- a/ForgeShortUrl/forgeshorturl/templates/master.html
+++ b/ForgeShortUrl/forgeshorturl/templates/master.html
@@ -16,6 +16,7 @@
        specific language governing permissions and limitations
        under the License.
 -#}
+{% set hide_left_bar = True %}
 {% extends g.theme.master %}
 {% block title %}{{c.project.name}} / {{c.app.config.options.mount_label}} / Link is not
configured{% endblock %}
 
@@ -39,3 +40,9 @@
     });
 </script>
 {% endblock %}
+
+{% block extra_css %}
+<style>
+  .pad table { width: 915px; }
+</style>
+{% endblock %}


Mime
View raw message