Commits

Thomas Waldmann committed 19a3aee Merge

merged

  • Participants
  • Parent commits 46ed410, b9133a7

Comments (0)

Files changed (5)

File MoinMoin/apps/frontend/views.py

     if fqname.value == NAMESPACE_ALL:
         fqname = CompositeName(NAMESPACE_ALL, NAME_EXACT, u'')
     item_names = item_name.split(u'/')
+    if not item_name:
+        title_name = _(u'Global Index')
+    else:
+        title_name = _(u'Subitem Index')
     return render_template(item.index_template,
                            item_names=item_names,
                            item_name=item_name,
                            initials=initials,
                            startswith=startswith,
                            form=form,
-                           title_name=_(u'Global Index'),
+                           title_name=title_name,
     )
 
 

File MoinMoin/config/default.py

             # so we no longer check, if item_exists for the modify item_view.
             ('frontend.modify_item', L_('Modify'), L_('Edit or Upload'), False, ),
             ('special.supplementation', None, None, False, ),
-            ('frontend.index', L_('Index'), L_('List sub-items'), False, ),
+            ('frontend.index', L_('Subitems'), L_('Subitems Index'), False, ),
             ('special.comments', L_('Comments'), L_('Hide comments'), True, ),
             ('special.transclusions', L_('Transclusions'), L_('Show transclusions'), True, ),
             ('frontend.highlight_item', L_('Highlight'), L_('Show with Syntax-Highlighting'), True, ),

File MoinMoin/static/js/index_action.js

     $(".filter-toggle").click(function () {
         // reverse checked/unchecked for each content type
         $(".moin-contenttypes-wrapper form").find("input[type='checkbox']").each(function () {
-            if ($(this).attr("checked")) {
-                $(this).removeAttr("checked");
-            } else {
-                $(this).attr("checked", "checked");
-            }
+            $(this).prop('checked', !$(this).is(':checked'));
         });
         return false;
     });
         if (helper_texts.length) {
             helper_texts.fadeOut();
         } else {
-            $(".moin-contenttypes-wrapper form").find(".helper-text").css("display", "block");
+            helper_texts = $(".moin-contenttypes-wrapper form").find(".helper-text");
+            helper_texts.fadeIn();
         }
 
         return false;

File MoinMoin/themes/basic/templates/index.html

 
 {% block body_scripts %}
 {{ super() }}
-    <script src="{{ url_for('frontend.template', filename='index_action.js') }}"></script>
+    <script src="{{ url_for('static', filename='js/index_action.js') }}"></script>
     <script src="{{ url_for('static', filename='js/jfu.js') }}"></script>
     {{ forms.file_uploader_scripts() }}
 {% endblock %}

File MoinMoin/themes/basic/templates/layout.html

                             <li>
                                 <h4 class="moin-location-breadcrumb">
                                 {% for segment_name, segment_path, exists in theme_supp.location_breadcrumbs(item_name) -%}
-                                {% set url = url_for('frontend.show_item', item_name=segment_path) %}
-                                    {% if not loop.first %}
-                                    <small>/</small>
-                                    {% endif %}
-                                    {% if url != current_url_showview %}
-                                        <small>
-                                    {% endif %}
-                                    {% if title_name %}
-                                        {{ title_name }}
-                                    {% else %}
-                                        <a href="{{ url }}" {% if not exists %}class="moin-nonexistent"{% endif %}>
-                                            {{ segment_name|shorten_item_name }}
+                                    {% if loop.first %}
+                                        <small>~ /</small>
+                                    {% elif not loop.last %}
+                                        <a href="{{ url_for('frontend.show_item', item_name=segment_path) }}" {% if not exists %}class="moin-nonexistent"{% endif %}>
+                                            {{ segment_name|shorten_fqname }}
                                         </a>
-                                    {% endif %}
-                                    {% if url != current_url_showview %}
-                                       </small>
-                                    {% endif %}
+                                        <small>/</small>
+                                    {%- endif %}
+                                    {% if loop.last %}
+                                        {% if title_name %}
+                                            {{ title_name }}
+                                        {% else %}
+                                            <a href="{{ url_for('frontend.show_item', item_name=segment_path) }}" {% if not exists %}class="moin-nonexistent"{% endif %}>
+                                                {{ segment_name|shorten_fqname }}
+                                            </a>              
+                                        {%- endif %}
+                                    {%- endif %}
                                 {% endfor %}
                                 </h4>
                             </li>
-
                         </ul><!-- complete list of breadcrumbs -->
                     </div>
                 </div>