changeset 2691:43987f1b008e

Added ticket-create button and blog-entry-create button in +tickets view and blog view respectively in all themes with a TODO of creating items without any initial fqname/name
author Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
date Wed, 06 Aug 2014 05:32:51 +0530
parents 86e3b39c4b02
children fba2cb757335
files MoinMoin/apps/frontend/views.py MoinMoin/templates/blog/layout.html MoinMoin/templates/tickets.html MoinMoin/themes/basic/static/css/theme.css MoinMoin/themes/basic/static/custom-less/theme.less MoinMoin/themes/foobar/static/css/stylus/theme.styl MoinMoin/themes/foobar/static/css/theme.css MoinMoin/themes/foobar/templates/blog/layout.html MoinMoin/themes/modernized/static/css/stylus/theme.styl MoinMoin/themes/modernized/static/css/theme.css
diffstat 10 files changed, 66 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/frontend/views.py	Sat Aug 02 21:13:03 2014 +0200
+++ b/MoinMoin/apps/frontend/views.py	Wed Aug 06 05:32:51 2014 +0530
@@ -2309,6 +2309,12 @@
         )
 
 
+@frontend.route('/+new', methods=['GET', 'POST'])
+def new():
+    # TODO: Implement creation of blog entries and ticket items
+    raise NotImplementedError
+
+
 @frontend.errorhandler(404)
 def page_not_found(e):
     return render_template('404.html',
--- a/MoinMoin/templates/blog/layout.html	Sat Aug 02 21:13:03 2014 +0200
+++ b/MoinMoin/templates/blog/layout.html	Wed Aug 06 05:32:51 2014 +0530
@@ -32,6 +32,11 @@
                     {{ blog_header }}
                 {% endif %}
             </div>
+
+            <a id="moin-blog-entry-create-link" href="{{ url_for('frontend.new', itemtype='blogentry') }}" >
+                <button class="btn btn-primary">{{ _("Create Blog entry") }}</button>
+            </a>
+
             <div id="moin-blog-body">
                 <div id="moin-blog-content">
                 {% block blog_content %}<br />{% endblock %}
--- a/MoinMoin/templates/tickets.html	Sat Aug 02 21:13:03 2014 +0200
+++ b/MoinMoin/templates/tickets.html	Wed Aug 06 05:32:51 2014 +0530
@@ -39,6 +39,10 @@
     </ul>
 </div>
 
+<a id="moin-ticket-create-link" href="{{ url_for('frontend.new', itemtype='ticket') }}" >
+    <button class="btn btn-primary btn-lg btn-block">{{ _("Create ticket") }}</button>
+</a>
+
 <form action="{{ url_for('frontend.tickets',selected_tags=list(selected_tags), time_sorting=time_sorting if time_sorting) }}" method="post">
     <input type="hidden" name="status" value="{{ status }}">
     <input type="text" name="q" value="{{ query if query }}" id="moin-ticketsearch-query" class="form-control" placeholder="{{_('Find tickets')}}">
--- a/MoinMoin/themes/basic/static/css/theme.css	Sat Aug 02 21:13:03 2014 +0200
+++ b/MoinMoin/themes/basic/static/css/theme.css	Wed Aug 06 05:32:51 2014 +0530
@@ -7001,6 +7001,17 @@
 .tickets-sort-button.dropdown {
   display: inline;
 }
+#moin-ticket-create-link {
+  display: inline;
+  position: absolute;
+  right: 100px;
+  top: 40px;
+}
+#moin-ticket-create-link button {
+  width: 150px;
+  height: 35px;
+  padding-top: 6px;
+}
 html {
   overflow-y: scroll;
 }
--- a/MoinMoin/themes/basic/static/custom-less/theme.less	Sat Aug 02 21:13:03 2014 +0200
+++ b/MoinMoin/themes/basic/static/custom-less/theme.less	Wed Aug 06 05:32:51 2014 +0530
@@ -729,6 +729,17 @@
 .tickets-sort-button.dropdown {
   display: inline;
 }
+#moin-ticket-create-link {
+  display: inline;
+  position: absolute;
+  right: 100px;
+  top: 40px;
+}
+#moin-ticket-create-link button {
+  width: 150px;
+  height: 35px;
+  padding-top: 6px;
+}
 html{
   overflow-y: scroll;
 }
--- a/MoinMoin/themes/foobar/static/css/stylus/theme.styl	Sat Aug 02 21:13:03 2014 +0200
+++ b/MoinMoin/themes/foobar/static/css/stylus/theme.styl	Wed Aug 06 05:32:51 2014 +0530
@@ -1239,6 +1239,16 @@
 .moin-ticket-tags
     border-bottom none
 
+#moin-ticket-create-link
+    display inline
+    position absolute
+    right 70px
+    top 80px
+
+#moin-ticket-create-link button
+    width 150px
+    height 35px
+
 /* fix tests -- currently checking <big> and <small> */
 @media print
     #moin-global-tray
--- a/MoinMoin/themes/foobar/static/css/theme.css	Sat Aug 02 21:13:03 2014 +0200
+++ b/MoinMoin/themes/foobar/static/css/theme.css	Wed Aug 06 05:32:51 2014 +0530
@@ -470,5 +470,7 @@
 .tickets-sort-button.dropdown ul.dropdown-menu li a{display:inline}
 .tickets-sort-button.dropdown:hover ul.dropdown-menu{display:inline-block}
 .moin-ticket-tags{border-bottom:none}
+#moin-ticket-create-link{display:inline;position:absolute;right:70px;top:80px}
+#moin-ticket-create-link button{width:150px;height:35px}
 @media print{#moin-global-tray,#moin-local-panel,#moin-footer,#moin-searchform{display:none}
 }
--- a/MoinMoin/themes/foobar/templates/blog/layout.html	Sat Aug 02 21:13:03 2014 +0200
+++ b/MoinMoin/themes/foobar/templates/blog/layout.html	Wed Aug 06 05:32:51 2014 +0530
@@ -26,6 +26,11 @@
                     {{ blog_header }}
                 {% endif %}
             </div>
+
+            <a id="moin-blog-entry-create-link" href="{{ url_for('frontend.new', itemtype='blogentry') }}" >
+                <button class="btn btn-primary">{{ _("Create Blog entry") }}</button>
+            </a>
+
             <div id="moin-blog-body">
                 <div id="moin-blog-content">
                 {% block blog_content %}<br />{% endblock %}
--- a/MoinMoin/themes/modernized/static/css/stylus/theme.styl	Sat Aug 02 21:13:03 2014 +0200
+++ b/MoinMoin/themes/modernized/static/css/stylus/theme.styl	Wed Aug 06 05:32:51 2014 +0530
@@ -1735,3 +1735,13 @@
 
 .moin-ticket-tags
     border-bottom none
+
+#moin-ticket-create-link
+    display inline
+    position absolute
+    right 70px
+    top 170px
+
+#moin-ticket-create-link button
+  width 150px
+  height 35px
--- a/MoinMoin/themes/modernized/static/css/theme.css	Sat Aug 02 21:13:03 2014 +0200
+++ b/MoinMoin/themes/modernized/static/css/theme.css	Wed Aug 06 05:32:51 2014 +0530
@@ -569,3 +569,5 @@
 .tickets-sort-button.dropdown ul.dropdown-menu li a{display:inline}
 .tickets-sort-button.dropdown:hover ul.dropdown-menu{display:inline-block}
 .moin-ticket-tags{border-bottom:none}
+#moin-ticket-create-link{display:inline;position:absolute;right:70px;top:170px}
+#moin-ticket-create-link button{width:150px;height:35px}