changeset 2699:3bc9fd6d054e

merged
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 07 Aug 2014 16:38:02 +0200
parents c66d1f0a05ba (diff) 2f3301de742f (current diff)
children 842fc45e8060 b41fae684e47
files MoinMoin/themes/basic/static/css/theme.css MoinMoin/themes/basic/static/custom-less/theme.less
diffstat 16 files changed, 205 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/frontend/views.py	Thu Aug 07 19:53:15 2014 +0530
+++ b/MoinMoin/apps/frontend/views.py	Thu Aug 07 16:38:02 2014 +0200
@@ -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	Thu Aug 07 19:53:15 2014 +0530
+++ b/MoinMoin/templates/blog/layout.html	Thu Aug 07 16:38:02 2014 +0200
@@ -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/blog/utils.html	Thu Aug 07 19:53:15 2014 +0530
+++ b/MoinMoin/templates/blog/utils.html	Thu Aug 07 16:38:02 2014 +0200
@@ -2,44 +2,45 @@
 {% import "utils.html" as utils %}
 
 {% macro show_blog_entry(entry_item) %}
-    {% set title = entry_item.meta['summary'] %}
-    <h1><a href="{{ url_for('frontend.show_item', item_name=entry_item.name) }}"
-        title="{{ title }}" class="moin-blog-entry-link">{{ title }}</a></h1>
-    {% if user.may.write(entry_item.name) %}
-        <div class="moin-blog-entry-modify">
-            <span class="moin-blog-icon">&#x2710;</span>
-            <a href="{{ url_for('frontend.modify_item', item_name=entry_item.name) }}">{{ _("Modify entry") }}</a>
-        </div>
-    {% endif %}
-    <div class="moin-blog-entry-info">
-        {% set publication_time = entry_item.meta['ptime'] or entry_item.meta['mtime'] %}
-        {% if publication_time %}
-            {{ _("Published on") }} {{ publication_time|datetimeformat }}
-            {{ _("by") }} {{ utils.editor_info(entry_item.meta) }}
-        {% else %}
-            {{ _("Not published yet.") }}
-        {% endif %}
-    </div>
-    <div class="moin-blog-entry-content">
-        {{ entry_item.content._render_data()|safe }} {# rendered blog entry content #}
-    </div>
-    <div class="moin-blog-entry-bottominfo">
-        {% set tags = entry_item.meta['tags']|sort %}
-        {% if tags %} {# display blog entry's tags as a list if it is not empty #}
-            <div class="moin-blog-entry-tags">
-                {{ _("Tags:") }}
-                <ul class="moin-blog-entry-tags">
-                    {% for tag in tags %}
-                        <li><a href="{{ url_for('frontend.tagged_items', tag=tag) }}">{{ tag }}</a></li>
-                    {% endfor %}
-                </ul>
+    {% set summary = entry_item.meta['summary'] %}
+    <div class="bg-info moin-blog-entry">
+        <h1><a href="{{ url_for('frontend.show_item', item_name=entry_item.name) }}"
+            title="{{ summary }}" class="moin-blog-entry-link">{{ summary }}</a></h1>
+        {% if user.may.write(entry_item.fqname) %}
+            <div class="moin-blog-entry-modify">
+                <span class="moin-blog-icon">&#x2710;</span>
+                <a href="{{ url_for('frontend.modify_item', item_name=entry_item.fqname) }}">{{ _("Modify") }}</a>
             </div>
         {% endif %}
-        <div class="moin-blog-entry-comments">
-            {% set discussion_item_name = '{0}/{1}'.format(entry_item.name, cfg.supplementation_item_names[0]) %}
-            <a href="{{ url_for('frontend.show_item', item_name=discussion_item_name) }}">{{ _("Discussion page") }}</a>
+        <div class="moin-blog-entry-info">
+            {% set publication_time = entry_item.meta['ptime'] or entry_item.meta['mtime'] %}
+            {% if publication_time %}
+                {{ _("Published on") }} {{ publication_time|datetimeformat }}
+                {{ _("by") }} {{ utils.editor_info(entry_item.meta) }}
+            {% endif %}
         </div>
-    </div>
+        <div class="moin-blog-entry-content">
+            {{ entry_item.content._render_data()|safe }} {# rendered blog entry content #}
+        </div>
+        <div class="moin-blog-entry-bottominfo">
+            {% set tags = entry_item.meta['tags']|sort %}
+            {% if tags %} {# display blog entry's tags as a list if it is not empty #}
+                <div class="moin-blog-entry-tags">
+                    {{ _("Tags:") }}
+                    <ul class="moin-blog-entry-tags">
+                        {% for tag in tags %}
+                            <li><a href="{{ url_for('frontend.tagged_items', tag=tag) }}">{{ tag }}</a></li>
+                        {% endfor %}
+                    </ul>
+                </div>
+            {% endif %}
+            {# TODO: If entry has no name then subitem cannot be defined #}
+            <div class="moin-blog-entry-comments">
+                {% set discussion_item_name = '{0}/{1}'.format(entry_item.name, cfg.supplementation_item_names[0]) %}
+                <a href="{{ url_for('frontend.show_item', item_name=discussion_item_name) }}">{{ _("Discussion page") }}</a>
+            </div>
+        </div>
+    </div><br><br>
 {% endmacro %}
 
 {% macro widget_supertags(blog_name, supertags) %}
--- a/MoinMoin/templates/tickets.html	Thu Aug 07 19:53:15 2014 +0530
+++ b/MoinMoin/templates/tickets.html	Thu Aug 07 16:38:02 2014 +0200
@@ -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')}}">
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/themes/basic/static/css/blog.css	Thu Aug 07 16:38:02 2014 +0200
@@ -0,0 +1,51 @@
+#moin-blog-header {
+  margin: -0.5em 0 0.5em 0;
+  font-size: 20px;
+}
+#moin-blog-content{
+  padding: 10px 0 0 0;
+  display: table-cell;
+  width: 100%;
+}
+#moin-blog-body {
+  display: table;
+  width: 80%;
+}
+.moin-blog-entry-comments {
+  padding-bottom: 10px;
+}
+#moin-blog-content h1 a {
+  text-decoration: none;
+  font-size: 30px;
+}
+.moin-blog-entry {
+  border: 2px solid #99CCFF;
+  padding-left: 10px;
+  padding-right: 10px;
+  border-radius: 10px;
+}
+.moin-blog-icon {
+  font-size: 1.6em
+}
+.moin-blog-entry-info {
+  font-size: 12px;
+  color: #737373;
+  padding-bottom: 10px;
+}
+.moin-blog-entry-modify {
+  font-size: 15px;
+  margin: 0;
+  float: right;
+  padding-left: 10px;
+}
+ul.moin-blog-entry-tags {
+  list-style: none;
+  display: inline;
+  margin: 0;
+}
+ul.moin-blog-entry-tags li {
+  display: inline;
+}
+ul.moin-blog-entry-tags li:after {
+  content: ",";
+}
--- a/MoinMoin/themes/basic/static/css/theme.css	Thu Aug 07 19:53:15 2014 +0530
+++ b/MoinMoin/themes/basic/static/css/theme.css	Thu Aug 07 16:38:02 2014 +0200
@@ -7013,6 +7013,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	Thu Aug 07 19:53:15 2014 +0530
+++ b/MoinMoin/themes/basic/static/custom-less/theme.less	Thu Aug 07 16:38:02 2014 +0200
@@ -736,6 +736,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/blog.css	Thu Aug 07 19:53:15 2014 +0530
+++ b/MoinMoin/themes/foobar/static/css/blog.css	Thu Aug 07 16:38:02 2014 +0200
@@ -8,3 +8,7 @@
 ul.moin-blog-entry-tags li{display:inline;}
 ul.moin-blog-entry-tags li:after{content:","}
 ul.moin-blog-entry-tags li:last-child:after{content:""}
+.moin-blog-entry{border:2px solid #d6d5d0;padding-left:10px;padding-right:10px;padding-bottom:10px;border-radius:10px;background-color:#e8e8e8}
+.moin-blog-entry h1{border-bottom:none;margin: 0.10em}
+#moin-blog-header{margin:1em 0 -1em 0;font-size:20px;padding-bottom:20px}
+#moin-blog-content h1 a{text-decoration:none;font-size:30px}
--- a/MoinMoin/themes/foobar/static/css/stylus/blog.styl	Thu Aug 07 19:53:15 2014 +0530
+++ b/MoinMoin/themes/foobar/static/css/stylus/blog.styl	Thu Aug 07 16:38:02 2014 +0200
@@ -40,3 +40,24 @@
 ul.moin-blog-entry-tags li:last-child
     &:after
         content ""
+
+.moin-blog-entry
+    border 2px solid #d6d5d0
+    padding-left 10px
+    padding-right 10px
+    padding-bottom 10px
+    border-radius 10px
+    background-color #e8e8e8
+
+.blog-entry h1
+    border-bottom none
+    margin: 0.10em
+
+#moin-blog-header
+    margin 1em 0 -1em 0
+    font-size 20px
+    padding-bottom 20px
+
+#moin-blog-content h1 a
+    text-decoration none
+    font-size 30px
--- a/MoinMoin/themes/foobar/static/css/stylus/theme.styl	Thu Aug 07 19:53:15 2014 +0530
+++ b/MoinMoin/themes/foobar/static/css/stylus/theme.styl	Thu Aug 07 16:38:02 2014 +0200
@@ -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	Thu Aug 07 19:53:15 2014 +0530
+++ b/MoinMoin/themes/foobar/static/css/theme.css	Thu Aug 07 16:38:02 2014 +0200
@@ -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	Thu Aug 07 19:53:15 2014 +0530
+++ b/MoinMoin/themes/foobar/templates/blog/layout.html	Thu Aug 07 16:38:02 2014 +0200
@@ -1,5 +1,6 @@
 {% extends theme("layout.html") %}
 {% import theme("blog/utils.html") as blog_utils %}
+{% import "itemviews.html" as itemviews with context %}
 
 {% if blog_item %}
     {% set blog_header = blog_item.content._render_data()|safe %}
@@ -26,6 +27,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/blog.css	Thu Aug 07 19:53:15 2014 +0530
+++ b/MoinMoin/themes/modernized/static/css/blog.css	Thu Aug 07 16:38:02 2014 +0200
@@ -4,9 +4,13 @@
 #moin-blog-sidebar{display:table-cell;width:20%}
 .moin-blog-icon{font-size:1.6em}
 .moin-blog-entry-info{font-size:.8em;color:#737373}
-.moin-blog-entry-bottominfo{font-size:.8em;color:#737373;padding:0 1em;border:1px solid #4e7da9}
+.moin-blog-entry-bottominfo{font-size:.8em;color:#737373;padding:0 1em;}
 .moin-blog-entry-modify{font-size:.8em;margin:0;float:right}
 ul.moin-blog-entry-tags{list-style:none;display:inline;margin:0;}
 ul.moin-blog-entry-tags li{display:inline;}
 ul.moin-blog-entry-tags li:after{content:","}
 ul.moin-blog-entry-tags li:last-child:after{content:""}
+.moin-blog-entry{border:2px solid #dfdfdf;padding-left:10px;padding-right:10px;padding-bottom:10px;border-radius:10px;background-color:#eef1f6}
+.moin-blog-entry h1{border-bottom:none;margin: 0.10em}
+#moin-blog-header{margin:1em 0 -1em 0;font-size:20px;padding-bottom:10px}
+#moin-blog-content h1 a{text-decoration:none;font-size: 30px}
--- a/MoinMoin/themes/modernized/static/css/stylus/blog.styl	Thu Aug 07 19:53:15 2014 +0530
+++ b/MoinMoin/themes/modernized/static/css/stylus/blog.styl	Thu Aug 07 16:38:02 2014 +0200
@@ -30,7 +30,6 @@
     font-size 0.8em
     color footer_color
     padding 0em 1em
-    border border_style
 
 .moin-blog-entry-modify
     font-size 0.8em
@@ -49,3 +48,24 @@
 ul.moin-blog-entry-tags li:last-child
     &:after
         content ""
+
+.moin-blog-entry
+    border 2px solid base_color
+    padding-left 10px
+    padding-right 10px
+    padding-bottom 10px
+    border-radius 10px
+    background-color table_bg_color
+
+.moin-blog-entry h1
+    border-bottom none
+    margin 0.10em
+
+#moin-blog-header
+    margin 1em 0 -1em 0
+    font-size 20px
+    padding-bottom 10px
+
+#moin-blog-content h1 a
+    text-decoration none
+    font-size 30px
--- a/MoinMoin/themes/modernized/static/css/stylus/theme.styl	Thu Aug 07 19:53:15 2014 +0530
+++ b/MoinMoin/themes/modernized/static/css/stylus/theme.styl	Thu Aug 07 16:38:02 2014 +0200
@@ -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	Thu Aug 07 19:53:15 2014 +0530
+++ b/MoinMoin/themes/modernized/static/css/theme.css	Thu Aug 07 16:38:02 2014 +0200
@@ -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}