Rod Morison avatar Rod Morison committed 69e6f8c Draft

mezzanine.pages templates

Comments (0)

Files changed (12)

templates/base.html.orig

+<!DOCTYPE html>
+{% load pages_tags mezzanine_tags i18n future %}
+<html>
+<head>
+
+<meta http-equiv="Content-type" content="text/html; charset=utf-8">
+<meta name="viewport" content="width=device-width">
+<meta name="keywords" content="{% block meta_keywords %}{% endblock %}">
+<meta name="description" content="{% block meta_description %}{% endblock %}">
+<title>{% block meta_title %}{% endblock %}{% if settings.SITE_TITLE %} | {{ settings.SITE_TITLE }}{% endif %}</title>
+<link rel="shortcut icon" href="{{ STATIC_URL }}img/favicon.ico">
+
+{% ifinstalled mezzanine.blog %}
+<link rel="alternate" type="application/rss+xml" title="RSS" href="{% url "blog_post_feed" "rss" %}">
+<link rel="alternate" type="application/atom+xml" title="Atom" href="{% url "blog_post_feed" "atom" %}">
+{% endifinstalled %}
+
+{% compress css %}
+<link rel="stylesheet" href="{{ STATIC_URL }}css/bootstrap.css">
+<link rel="stylesheet" href="{{ STATIC_URL }}css/bootstrap.responsive.css">
+<link rel="stylesheet" href="{{ STATIC_URL }}css/mezzanine.css">
+{% ifinstalled cartridge.shop %}
+<link rel="stylesheet" href="{{ STATIC_URL }}css/cartridge.css">
+{% endifinstalled %}
+{% block extra_css %}{% endblock %}
+{% endcompress %}
+
+{% compress js %}
+<script src="{{ STATIC_URL }}mezzanine/js/{{ settings.JQUERY_FILENAME }}"></script>
+<script src="{{ STATIC_URL }}js/bootstrap.min.js"></script>
+<script>
+$(function() {
+    $('.middleinput:text, textarea').addClass('xlarge');
+    $('.control-group label').addClass('control-label');
+});
+</script>
+{% block extra_js %}{% endblock %}
+{% endcompress %}
+<!--[if lt IE 9]>
+<script src="{{ STATIC_URL }}js/html5shiv.js"></script>
+<![endif]-->
+
+{% block extra_head %}{% endblock %}
+
+</head>
+<body id="{% block body_id %}body{% endblock %}">
+
+<div class="navbar navbar-inverse">
+<div class="navbar-inner">
+<div class="container">
+    <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+        <span class="icon-bar"></span>
+        <span class="icon-bar"></span>
+        <span class="icon-bar"></span>
+    </a>
+    {% if settings.SITE_TITLE %}<a class="brand" href="/">{{ settings.SITE_TITLE }}</a>{% endif %}
+    {% if settings.SITE_TAGLINE %}<p class="tagline">{{ settings.SITE_TAGLINE }}</p>{% endif %}
+    <div class="nav-collapse">
+        {% search_form "all" %}
+        {% page_menu "pages/menus/dropdown.html" %}
+    </div>
+</div>
+</div>
+</div>
+
+<div class="container">
+
+{% nevercache %}
+{% for message in messages %}
+<div class="alert alert-{{ message.tags }}" data-alert="alert">
+<a class="close" href="#" onclick="$(this).parent().fadeOut('fast'); return false;">×</a>{{ message }}
+</div>
+{% endfor %}
+{% endnevercache %}
+
+
+<h1>{% block title %}{% endblock %}</h1>
+
+<ul class="breadcrumb">
+{% spaceless %}
+{% block breadcrumb_menu %}{% page_menu "pages/menus/breadcrumb.html" %}{% endblock %}
+{% endspaceless %}
+</ul>
+
+</div>
+
+<div class="container">
+<div class="row">
+
+<div class="span2 left">
+    {% block left_panel %}
+    <div class="panel tree">{% page_menu "pages/menus/tree.html" %}</div>
+    {% endblock %}
+</div>
+
+<div class="span7 middle">
+    {% block main %}{% endblock %}
+</div>
+
+<div class="span3 right">
+    {% nevercache %}
+    {% include "includes/user_panel.html" %}
+    {% endnevercache %}
+    <div class="panel">
+    {% block right_panel %}
+    {% ifinstalled mezzanine.twitter %}
+    {% include "twitter/tweets.html" %}
+    {% endifinstalled %}
+    {% endblock %}
+    </div>
+</div>
+
+</div>
+</div>
+
+<footer>
+<div class="container">
+{% page_menu "pages/menus/footer.html" %}
+<br style="clear:both">
+<p>
+    {% trans "Powered by" %}
+    <a href="http://mezzanine.jupo.org">Mezzanine</a>{% ifinstalled cartridge.shop %},
+    <a href="http://cartridge.jupo.org">Cartridge</a>{% endifinstalled %}
+    {% trans "and" %}
+    <a href="http://www.djangoproject.com">Django</a>
+    <span class="separator">|</span>
+    {% trans "Theme by" %} <a href="http://twitter.github.com/bootstrap/">Bootstrap</a>
+    {% ifinstalled mezzanine.mobile %}
+    <span class="separator">|</span>
+    <a href="{% url "set_device" "mobile" %}?next={{ request.path }}">{% trans "View Mobile Site" %}</a>
+    {% endifinstalled %}
+</p>
+</div>
+</footer>
+
+{% include "includes/footer_scripts.html" %}
+
+</body>
+</html>

templates/pages/index.html

+{% extends "pages/richtextpage.html" %}
+
+{% block main %}
+<!--
+This template is provided as a custom template for the homepage, for
+when it is configured as an editable page in the navigation tree. Feel
+free to modify it.
+-->
+{{ block.super }}
+{% endblock %}

templates/pages/menus/admin.html

+{% load pages_tags i18n future adminmedia %}
+
+<ol>
+    {% for page in page_branch %}
+    <li id="ordering_{{ page.id }}">
+        <div class="{% cycle 'row1' 'row2' %}">
+            <a href="#" class="tree-toggle" id="page-{{ page.id }}"
+                {% if not page.has_children %}style="visibility:hidden;"{% endif %}>
+                <span class="icon open">+</span>
+                <span class="icon close">-</span>
+            </a>
+            {% set_page_permissions page %}
+            {% if page.perms.delete %}
+            <a href="{% url "admin:pages_page_delete" page.id %}?fromtree" class="delete"></a>
+            {% else %}
+            <span class="delete" style="background:none;"></span>
+            {% endif %}
+            {% if page.perms.change %}
+            <a href="{% url "admin:pages_page_change" page.id %}{% if not page.is_primary %}?parent={{ page.parent_id }}{% endif %}"
+                class="changelink">{{ page.title }}</a>
+            {% else %}
+            <span class="uneditable">{{ page.title }}</span>
+            {% endif %}
+            <span class="ordering"{% if not page.perms.change %}
+                style="visibility:hidden;"{% endif %}>
+                <img src="{% admin_media_prefix %}img/admin/arrow-up.gif" />
+                <img src="{% admin_media_prefix %}img/admin/arrow-down.gif" />
+            </span>
+            {% if page.perms.add %}
+            <select class="addlist" id="addlink-{{ page.id }}">
+                <option value="">{% trans "Add" %} ...</option>
+                {% for model in page_models %}
+                    {% set_model_permissions model %}
+                    {% if model.perms.add %}
+                    <option value="{{ model.add_url }}?parent={{ page.id }}"
+                        >{{ model.name }}</option>
+                    {% endif %}
+                {% endfor %}
+            </select>
+            {% endif %}
+
+        </div>
+        <br style="clear:both;">
+        {% if page.has_children %}{% page_menu page %}{% endif %}
+    </li>
+    {% endfor %}
+</ol>

templates/pages/menus/breadcrumb.html

+{% load i18n future pages_tags %}
+
+{% if on_home %}
+<li>{% trans "Home" %}</li>
+{% else %}
+{% for page in page_branch %}
+
+    {% if page.is_primary and forloop.first %}
+    <li>
+        <a href="{% url "home" %}">{% trans "Home" %}</a>
+        <span class="divider">/</span>
+    </li>
+    {% endif %}
+
+    {% if page.is_current_or_ascendant %}
+    {% if page.is_current %}
+    <li class="active">{{ page.title }}</li>
+    {% else %}
+    <li>
+        <a href="{{ page.get_absolute_url }}">{{ page.title }}</a>
+        <span class="divider">/</span>
+    </li>
+    {% endif %}
+    {% if page.has_children %}{% page_menu page %}{% endif %}
+    {% endif %}
+
+{% endfor %}
+{% endif %}

templates/pages/menus/dropdown.html

+{% load i18n future pages_tags %}
+{% spaceless %}
+{% if page_branch_in_menu %}
+
+{% if branch_level == 0 %}
+<ul class="nav pull-right">
+    {% for page in page_branch %}
+    {% if page.is_primary and forloop.first %}
+    <li class="{% if on_home %} active{% endif %}" id="dropdown-menu-{{ page.html_id }}">
+        <a href="{% url "home" %}">{% trans "Home" %}</a>
+    </li>
+    <li class="divider-vertical"></li>
+    {% endif %}
+    {% if page.in_menu %}
+    <li class="dropdown{% if page.is_current_or_ascendant %} active{% endif %}"
+        id="dropdown-menu-{{ page.html_id }}">
+        <a href="{{ page.get_absolute_url }}">
+            {{ page.title }}
+            {% if page.has_children_in_menu %}<span class="caret"></span>{% endif %}
+        </a>
+        {% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
+    </li>
+    <li class="divider-vertical"></li>
+    {% endif %}
+    {% endfor %}
+</ul>
+{% endif %}
+
+{% if branch_level == 1 %}
+<ul class="dropdown-menu">
+    {% for page in page_branch %}
+    {% if page.in_menu %}
+    <li{% if page.is_current_or_ascendant %} class="active"{% endif %}
+        id="dropdown-menu-{{ page.html_id }}">
+        <a href="{{ page.get_absolute_url }}">{{ page.title }}</a>
+    </li>
+    {% endif %}
+    {% endfor %}
+</ul>
+{% endif %}
+
+{% endif %}
+{% endspaceless %}

templates/pages/menus/footer.html

+{% load i18n future pages_tags %}
+
+{% spaceless %}
+{% if page_branch_in_menu %}
+
+{% for page in page_branch %}
+    {% if page.is_primary %}
+        {% if forloop.first %}
+            <ul>
+        {% endif %}
+        {% if page.in_menu %}
+            <li><ul>
+        {% endif %}
+    {% endif %}
+
+    {% if page.in_menu %}
+        {% if forloop.first and not page.parent.in_menu and not page.is_primary %}
+            <li><ul>
+        {% endif %}
+        <li {% if page.is_current_or_ascendant %}class="active"{% endif %}>
+            <a href="{{ page.get_absolute_url }}">{{ page.title }}</a></li>
+    {% endif %}
+
+    {% if page.in_menu and page.has_children_in_menu %}{% page_menu page %}{% endif %}
+
+    {% if page.in_menu %}
+        {% if forloop.first and not page.parent.in_menu and not page.is_primary %}
+            </li></ul>
+        {% endif %}
+    {% endif %}
+
+    {% if page.is_primary %}
+        {% if page.in_menu %}
+            </ul></li>
+        {% endif %}
+        {% if forloop.last %}
+            </ul>
+        {% endif %}
+    {% endif %}
+
+{% endfor %}
+
+{% endif %}
+{% endspaceless %}

templates/pages/menus/footer_tree.html

+{% load i18n future pages_tags %}
+
+{% spaceless %}
+{% if page_branch_in_menu %}
+<ul class="footer-tree-menu-level-{{ branch_level }}">
+	{% for page in page_branch %}
+
+    {% if page.is_primary and forloop.first %}
+	<li class="first{% if on_home %} active{% endif %}">
+	    <a href="{% url "home" %}">{% trans "Home" %}</a>
+	</li>
+	{% endif %}
+
+	{% if page.in_menu %}
+	<li class="{% if page.is_current_or_ascendant %}active{% endif %}
+        {% if not top_level and forloop.first %} first{% endif %}
+        {% if forloop.last %} last{% endif %}"
+        id="footer-tree-menu-{{ page.html_id }}">
+		<a href="{{ page.get_absolute_url }}">{{ page.title }}</a>
+		{# remove this if tag to always show all nav items #}
+		{% if settings.PAGES_MENU_SHOW_ALL or page.is_current_or_ascendant %}
+		{% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
+		{% endif %}
+	</li>
+    {% endif %}
+
+	{% endfor %}
+</ul>
+{% endif %}
+{% endspaceless %}

templates/pages/menus/mobile.html

+{% load i18n future pages_tags %}
+
+{% spaceless %}
+{% if page_branch %}
+{% for page in page_branch %}
+
+	{% if page.is_primary and forloop.first %}
+	<ul class="mobile-menu">
+		<li><a class="home" href="{% url "home" %}">{% trans "Home" %}</a></li>
+    {% endif %}
+
+		{% if page.is_current_or_ascendant and not page.is_current_child %}
+        {% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
+		{% endif %}
+
+		{% if page.is_current_child %}
+		<li class="
+			{% if forloop.first %} first{% endif %}
+			{% if forloop.last %} last{% endif %}"
+			id="mobile-menu-{{ page.html_id }}">
+			<a href="{{ page.get_absolute_url }}">{{ page.title }}</a>
+		</li>
+		{% endif %}
+
+	{% if page.is_primary and forloop.last %}
+	</ul>
+	{% endif %}
+
+{% endfor %}
+{% endif %}
+{% endspaceless %}

templates/pages/menus/primary.html

+{% load pages_tags i18n future %}
+
+{% spaceless %}
+<ul id="primary-menu" class="nav pull-right">
+    {% for page in page_branch %}
+    {% if forloop.first %}
+    <li class="divider-vertical"></li>
+    <li id="primary-menu-home" class="first{% if on_home %} active{% endif %}">
+        <a href="{% url "home" %}">{% trans "Home" %}</a>
+    </li>
+    <li class="divider-vertical"></li>
+    {% endif %}
+    {% if page.in_menu %}
+    <li id="primary-menu-{{ page.html_id }}"
+        class="{% if page.is_current_or_ascendant %}active{% endif %}{% if forloop.last %} last{% endif %}">
+        <a href="{{ page.get_absolute_url }}">{{ page.title }}</a>
+    </li>
+    <li class="divider-vertical"></li>
+    {% endif %}
+    {% endfor %}
+</ul>
+{% endspaceless %}

templates/pages/menus/tree.html

+{% load i18n future pages_tags %}
+
+{% spaceless %}
+{% if page_branch_in_menu %}
+<ul class="nav nav-list navlist-menu-level-{{ branch_level }}">
+  {% for page in page_branch %}
+  {% if page.is_primary and forloop.first %}
+  <li class="first{% if on_home %} active{% endif %}">
+    <a href="{% url "home" %}">{% trans "Home" %}</a>
+  </li>
+  {% endif %}
+  {% if page.in_menu %}
+  <li class="
+             {% if page.is_current %} active{% endif %}
+             {% if not page.is_primary and forloop.first %} first{% endif %}
+             {% if forloop.last %} last{% endif %}"
+      id="tree-menu-{{ page.html_id }}">
+    <a href="{{ page.get_absolute_url }}">{{ page.title }}</a>
+    {# remove this if tag to always show all nav items #}
+    {% if settings.PAGES_MENU_SHOW_ALL or page.is_current_or_ascendant %}
+    {% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
+    {% endif %}
+  </li>
+  {% endif %}
+  {% endfor %}
+</ul>
+{% endif %}
+{% endspaceless %}

templates/pages/page.html

+{% extends "base.html" %}
+{% load mezzanine_tags keyword_tags %}
+
+{% block meta_title %}{{ page.meta_title }}{% endblock %}
+
+{% block meta_keywords %}{% metablock %}
+{% keywords_for page as keywords %}
+{% for keyword in keywords %}
+    {% if not forloop.first %}, {% endif %}
+    {{ keyword }}
+{% endfor %}
+{% endmetablock %}{% endblock %}
+
+{% block meta_description %}{% metablock %}
+{{ page.description }}
+{% endmetablock %}{% endblock %}
+
+{% block title %}
+{% editable page.title %}{{ page.title }}{% endeditable %}
+{% endblock %}
+
+{% block main %}
+{% endblock %}

templates/pages/richtextpage.html

+{% extends "pages/page.html" %}
+
+{% load mezzanine_tags %}
+
+{% block main %}{{ block.super }}
+
+{% editable page.richtextpage.content %}
+{{ page.richtextpage.content|richtext_filter|safe }}
+{% endeditable %}
+
+{% endblock %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.