Changeset 1808

Show
Ignore:
Timestamp:
11/24/08 17:27:17 (16 months ago)
Author:
JensDiemer
Message:

* bugfix for ticket:234 page and "showlinks" only worked on "endpages"...
* remove some obsolete main_menu internal pages.

Location:
trunk/pylucid_project
Files:
1 removed
5 modified
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/pylucid_project/media/PyLucid/internal_page/main_menu/main_menu_li.html

    r1792 r1808  
    1 <li> 
     1{% spaceless %} 
     2 
     3{% if showlinks %}<li> 
    24<a href="{{ href }}" title="{{ title }}"{% if is_current or active %} class="{% if active %}active{% endif %}{% if is_current %} current{% endif %}"{% endif %}>{{ name }}</a> 
     5{% endif %} 
     6 
    37  {% if submenu %} 
    48  <ul> 
     
    610  </ul> 
    711  {% endif %} 
    8 </li>  
     12   
     13{% if showlinks %}</li>{% endif %} 
     14 
     15{% endspaceless %} 
  • trunk/pylucid_project/media/PyLucid/internal_page/main_menu/main_menu_ul.css

    r1792 r1808  
    88  font-weight: bold; 
    99} 
    10 .main_menu ul ul{ 
    11   margin-left:1em; 
    12 } 
  • trunk/pylucid_project/PyLucid/admin.py

    r1777 r1808  
    3838    list_display_links = ("shortcut",) 
    3939    list_filter = ( 
    40         "createby","lastupdateby","permitViewPublic", 
     40        "createby", "lastupdateby", "permitViewPublic", "showlinks", 
    4141        "template", "style", "markup", 
    4242    ) 
  • trunk/pylucid_project/PyLucid/db/page.py

    r1722 r1808  
    4141    """ 
    4242    page_data = Page.objects.values( 
    43         "id", "parent", "name", "title", "shortcut" 
     43        "id", "parent", "name", "title", "shortcut", "showlinks", 
    4444    ).order_by("position", "name", "id") 
    4545    tree = TreeGenerator(page_data) 
     
    6565    """ 
    6666    page_data = Page.objects.values( 
    67         "id", "parent", "name", "title", "shortcut" 
    68     ).filter(showlinks = True).order_by("position", "name", "id") 
     67        "id", "parent", "name", "title", "shortcut", "showlinks", 
     68    ).order_by("position", "name", "id") 
    6969 
    7070    if request.user.is_anonymous(): 
  • trunk/pylucid_project/PyLucid/plugins_internal/main_menu/main_menu.py

    r1806 r1808  
    3333from django.utils.safestring import mark_safe 
    3434 
    35  
     35TEMPLATE_DEBUG = False 
     36#TEMPLATE_DEBUG = True 
    3637 
    3738class main_menu(PyLucidBasePlugin): 
     
    5758            "max": max 
    5859        } 
    59         self._render_template("main_menu_ul", context) 
     60        self._render_template("main_menu_ul", context, debug=TEMPLATE_DEBUG) 
    6061 
    6162 
     
    9293 
    9394                # Render one menu entry 
    94                 html = self._get_rendered_template("main_menu_li", entry) 
     95                html = self._get_rendered_template( 
     96                    "main_menu_li", entry, debug=TEMPLATE_DEBUG 
     97                ) 
    9598                result.append(html) 
    9699            elif int(entry["level"]) < self.min: 
  • trunk/pylucid_project/PyLucid/plugins_internal/SiteMap/SiteMap.py

    r1634 r1808  
    8989 
    9090            href.append(entry["shortcut"]) 
     91             
     92            href = "/".join(href) 
    9193 
    92             href = "/".join(href) 
    93             entry["href"] = self.URLs["absoluteIndex"] + href + "/" 
    94  
    95             result.append(HTML_TEMPLATE % entry) 
     94            if entry["showlinks"] == True: 
     95                entry["href"] = self.URLs["absoluteIndex"] + href + "/" 
     96                result.append(HTML_TEMPLATE % entry) 
    9697 
    9798            if "subitems" in entry: