changeset 2749:53d6f0ec8073

merged
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 18 Aug 2014 13:59:14 +0200
parents 58baea76af1e (current diff) 7b87431f2d35 (diff)
children 8c29936b3d29 e115734daf87
files MoinMoin/apps/frontend/views.py MoinMoin/themes/modernized/static/css/stylus/theme.styl MoinMoin/themes/modernized/static/css/theme.css
diffstat 9 files changed, 60 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/frontend/views.py	Sun Aug 17 03:57:39 2014 +0530
+++ b/MoinMoin/apps/frontend/views.py	Mon Aug 18 13:59:14 2014 +0200
@@ -2275,6 +2275,8 @@
     else:
         query = None
         status = u'open'
+
+    current_timestamp = datetime.now().strftime("%Y_%m_%d-%H_%M_%S")
     idx_name = ALL_REVS
     qp = flaskg.storage.query_parser([TAGS, SUMMARY, CONTENT, ITEMID], idx_name=idx_name)
     terms = [Term(ITEMTYPE, ITEMTYPE_TICKET)]
@@ -2319,6 +2321,7 @@
                                tags=tags,
                                selected_tags=selected_tags,
                                time_sorting=time_sorting,
+                               current_timestamp=current_timestamp,
         )
 
 
--- a/MoinMoin/datastruct/backends/wiki_groups.py	Sun Aug 17 03:57:39 2014 +0530
+++ b/MoinMoin/datastruct/backends/wiki_groups.py	Mon Aug 18 13:59:14 2014 +0200
@@ -41,8 +41,8 @@
         To find group pages, app.cfg.cache.item_group_regexact pattern is used.
         """
         # TODO: use whoosh to search for group_regex matching items
-        item_list = [rev.name for rev in flaskg.unprotected_storage.documents()
-                     if self.item_group_regex.search(rev.name)]
+        item_list = [rev.fqname.value for rev in flaskg.unprotected_storage.documents()
+                     if self.item_group_regex.search(rev.fqname.value)]
         return iter(item_list)
 
     def __getitem__(self, group_name):
--- a/MoinMoin/static/css/stylus/ticket.styl	Sun Aug 17 03:57:39 2014 +0530
+++ b/MoinMoin/static/css/stylus/ticket.styl	Mon Aug 18 13:59:14 2014 +0200
@@ -73,7 +73,7 @@
     margin 5px 1px 3px 0px
     border 1px solid rgba(81, 203, 238, 1)
 
-input[type=submit], #f_submit_update, #f_submit_update_negate_status
+.moin-ticket-submit input[type=submit], #f_submit_update, #f_submit_update_negate_status
     margin-top 10px
     margin-bottom 20px
     width auto
@@ -97,13 +97,14 @@
     border-radius 4px
     -webkit-user-select none
 
-.moin-ticket-comments
-    float right
-    width 50%
+.moin-ticket-submit, .moin-ticket-comments
+    float left
+    width 35em
+    clear both
 
 .moin-ticket-metadata
-    float left
-    width 50%
+    float right
+    width 30em
 
 #f_message
     width 100%
@@ -120,3 +121,14 @@
 
 .moin-ticket-link
     padding-left 150px
+
+.moin-ticket-tags
+    padding-bottom 20px
+
+textarea
+    resize vertical
+
+.moin-form dt, .moin-form dd
+    text-align left
+    width 100%
+    padding-bottom 5px
--- a/MoinMoin/static/css/ticket.css	Sun Aug 17 03:57:39 2014 +0530
+++ b/MoinMoin/static/css/ticket.css	Mon Aug 18 13:59:14 2014 +0200
@@ -6,12 +6,14 @@
 label.moin-inline-label{background-image:url("../img/radiobutton.png")}
 #f_meta_tags,#f_meta_summary{-webkit-transition:all .3s ease-in-out;-moz-transition:all .3s ease-in-out;-ms-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;outline:none;width:200px;margin-top:20px;margin-bottom:20px;height:25px;padding:3px 0 3px 3px;margin:5px 1px 3px 0;border:1px solid #ddd}
 #f_meta_tags:focus,#f_meta_summary:focus{box-shadow:0 0 5px #51cbee;margin-top:20px;margin-bottom:20px;height:25px;padding:3px 0 3px 3px;margin:5px 1px 3px 0;border:1px solid #51cbee}
-input[type=submit],#f_submit_update,#f_submit_update_negate_status{margin-top:10px;margin-bottom:20px;width:auto;background-color:#1b436d;height:40px;color:#fff;border:2px solid}
+.moin-ticket-submit input[type=submit],#f_submit_update,#f_submit_update_negate_status{margin-top:10px;margin-bottom:20px;width:auto;background-color:#1b436d;height:40px;color:#fff;border:2px solid}
 select{display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;cursor:pointer;border:1px solid;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none}
-.moin-ticket-comments{float:right;width:50%}
-.moin-ticket-metadata{float:left;width:50%}
+.moin-ticket-submit,.moin-ticket-comments{float:left;width:35em;clear:both}
+.moin-ticket-metadata{float:right;width:30em}
 #f_message{width:100%;height:150px}
 h2{border-bottom:none}
 dt label{padding-top:10px}
 dl dd{padding-bottom:10px}
 .moin-ticket-link{padding-left:150px}
+.moin-ticket-tags{padding-bottom:20px}
+.moin-form dt,.moin-form dd{text-align:left;width:100%;padding-bottom:5px}
--- a/MoinMoin/templates/ticket/modify.html	Sun Aug 17 03:57:39 2014 +0530
+++ b/MoinMoin/templates/ticket/modify.html	Mon Aug 18 13:59:14 2014 +0200
@@ -19,18 +19,21 @@
             {{ forms.render_errors(form) }}
             {{ render_meta() }}
         </dl>
+        <div class="moin-ticket-tags">
             {{ _("Suggested Tags: ") }}
             {% for suggested_tag in suggested_tags %}
                 {{ suggested_tag }}
             {% endfor %}
+        </div>
         <dl>
             {{ render_selectlists() }}
         </dl>
-
-        {{ forms.render(form['submit']) }}
         <h2>{{ _("Back references") }}</h2>
         <dl>
             {{ render_backref() }}
         </dl>
     </div>
+    <div class="moin-ticket-submit">
+        {{ forms.render(form['submit']) }}
+    </div>
 {% endblock %}
--- a/MoinMoin/templates/ticket/submit.html	Sun Aug 17 03:57:39 2014 +0530
+++ b/MoinMoin/templates/ticket/submit.html	Mon Aug 18 13:59:14 2014 +0200
@@ -16,18 +16,23 @@
 {% endblock %}
 {% block ticket_metadata %}
 
-    <h2>{{ _("Provide metadata") }}</h2>
-    <dl>
-    {{ forms.render_errors(form) }}
-    {{ render_meta() }}
-    </dl>
-    {{ _("Suggested Tags: ") }}
-    {% for suggested_tag in suggested_tags %}
-        {{ suggested_tag }}
-    {% endfor %}
-    <dl>
-    {{ render_selectlists() }}
-    </dl>
-
-    {{ forms.render_submit(form) }}
+    <div class="moin-ticket-metadata">
+        <h2>{{ _("Provide metadata") }}</h2>
+        <dl>
+        {{ forms.render_errors(form) }}
+        {{ render_meta() }}
+        </dl>
+        <div class="moin-ticket-tags">
+            {{ _("Suggested Tags: ") }}
+            {% for suggested_tag in suggested_tags %}
+                {{ suggested_tag }}
+            {% endfor %}
+        </div>
+        <dl>
+        {{ render_selectlists() }}
+        </dl>
+    </div>
+    <div class="moin-ticket-submit">
+        {{ forms.render_submit(form) }}
+    </div>
 {% endblock %}
--- a/MoinMoin/templates/tickets.html	Sun Aug 17 03:57:39 2014 +0530
+++ b/MoinMoin/templates/tickets.html	Mon Aug 18 13:59:14 2014 +0200
@@ -8,8 +8,8 @@
 {% set status_values = ['all', 'open', 'closed']  %}
 {{_("Filter:")}}
 {% for status_value in status_values %}
-    <form action="{{ url_for('frontend.tickets', selected_tags=list(selected_tags), time_sorting=time_sorting if time_sorting) }}" method="post" class='moin-ticketsearch-form'>
-        <input type="hidden" name="q" value="{{ query if query }}" >
+    <form action="{{ url_for('frontend.tickets', selected_tags=list(), time_sorting=time_sorting if time_sorting) }}" method="post" class='moin-ticketsearch-form'>
+        <input type="hidden" name="q" value="" >
         &nbsp;<input type="hidden" name="status" value="{{ status_value }}">
         <input type="submit" value="{{ status_value.capitalize() }}" title="{{ _('Show %(status)s tickets', status=status_value) }}" class="{{ 'ticket-query-button active' if status == status_value  else 'ticket-query-button'}}">
     </form>
@@ -47,7 +47,8 @@
     </ul>
 </div>
 
-<a id="moin-ticket-create-link" href="{{ url_for('frontend.new', itemtype='ticket') }}" >
+{# This is just a workaround for creating tickets #}
+<a id="moin-ticket-create-link" href="{{ url_for('frontend.modify_item', itemtype='ticket', item_name='ticket_'+current_timestamp ) }}" >
     <button class="btn btn-primary btn-lg btn-block">{{ _("Create ticket") }}</button>
 </a>
 
--- a/MoinMoin/themes/modernized/static/css/stylus/theme.styl	Sun Aug 17 03:57:39 2014 +0530
+++ b/MoinMoin/themes/modernized/static/css/stylus/theme.styl	Mon Aug 18 13:59:14 2014 +0200
@@ -1661,6 +1661,7 @@
 
 .tickets-sort-button.dropdown
     display inline
+    padding-left 8px
 
 #ticket-list
     float right
@@ -1735,7 +1736,7 @@
     display inline
     position absolute
     right 70px
-    top 170px
+    top 190px
 
 #moin-ticket-create-link button
   width 150px
--- a/MoinMoin/themes/modernized/static/css/theme.css	Sun Aug 17 03:57:39 2014 +0530
+++ b/MoinMoin/themes/modernized/static/css/theme.css	Mon Aug 18 13:59:14 2014 +0200
@@ -550,7 +550,7 @@
 ul.moin-bcs-item li{position:relative}
 ul.moin-bcs-item li ul.moin-bcs-subitems{display:none;position:absolute}
 ul.moin-bcs-item li:hover ul.moin-bcs-subitems{display:block}
-.tickets-sort-button.dropdown{display:inline}
+.tickets-sort-button.dropdown{display:inline;padding-left:8px}
 #ticket-list{float:right;width:85%}
 .moin-ticketsearch-form{display:inline}
 #moin-ticketsearch-query{background-image:url("../../../../static/img/search.png");background-repeat:no-repeat;background-position:5px;padding-left:24px;width:150px;height:25px;right:40px;position:absolute}
@@ -568,6 +568,6 @@
 .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{display:inline;position:absolute;right:70px;top:190px}
 #moin-ticket-create-link button{width:150px;height:35px}
 .zebra .tablesorter-header{background-color:#708090}