Changeset 2553
- Timestamp:
- 03/01/10 16:16:23 (5 months ago)
- Location:
- branches/0.9/pylucid_project
- Files:
-
- 10 modified
-
apps/pylucid/templates/admin/base_site.html (modified) (1 diff)
-
apps/pylucid_admin/templates/pylucid_admin/base_site.html (modified) (1 diff)
-
apps/pylucid_update/templates/pylucid_update/base_site.html (modified) (1 diff)
-
media/PyLucid/pylucid_admin.css (modified) (1 diff)
-
middlewares/headline_anchor.py (modified) (2 diffs)
-
pylucid_plugins/package_info/templates/package_info/admin_package_info.html (modified) (1 diff)
-
pylucid_plugins/package_info/templates/package_info/packages_table.html (modified) (1 diff)
-
pylucid_plugins/package_info/views.py (modified) (6 diffs)
-
pylucid_plugins/TOC/views.py (modified) (1 diff)
-
__init__.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.9/pylucid_project/apps/pylucid/templates/admin/base_site.html
r2516 r2553 28 28 29 29 30 {% block branding %}< h1>PyLucid</h1>30 {% block branding %}<a name="top" \><h1 class="admin_headline">PyLucid</h1> 31 31 <!-- page_messages --> 32 32 {% endblock %} -
branches/0.9/pylucid_project/apps/pylucid_admin/templates/pylucid_admin/base_site.html
r2162 r2553 2 2 {% load i18n %} 3 3 4 {% block branding %}< h1>PyLucid admin</h1>4 {% block branding %}<a name="top" \><h1 class="admin_headline">PyLucid admin</h1> 5 5 <!-- page_messages --> 6 6 {% endblock %} -
branches/0.9/pylucid_project/apps/pylucid_update/templates/pylucid_update/base_site.html
r2356 r2553 2 2 {% load i18n %} 3 3 4 {% block branding %}< h1>PyLucid Update4 {% block branding %}<a name="top" \><h1 class="admin_headline">PyLucid Update 5 5 {% if not sites|length_is:"1" %} 6 (site: <strong title="Update on site '{{ site.domain }}'">{{ site.name }}</strong>)6 <small>(site: <strong title="Update on site '{{ site.domain }}'">{{ site.name }}</strong>)</small> 7 7 {% endif %} 8 8 </h1> -
branches/0.9/pylucid_project/media/PyLucid/pylucid_admin.css
r2476 r2553 91 91 font-weight:bold 92 92 } 93 /* ---------------------------------------------------------------------------- 94 Headline Anchor 95 ------------------------------------------------------------------------------- */ 96 .top_link { 97 color: #000000; 98 } 99 .uarr { 100 color: #eeeeee; 101 } 102 .top_link:hover .uarr { 103 color: #000000; 104 } 105 .section_anchor { 106 text-shadow: 0px 0px #ffffff; 107 text-decoration:none; 108 color: #eeeeee!important; 109 padding-right: 1em; 110 } 111 .headline_anchor:hover .section_anchor { 112 color: #999999; 113 } 114 .section_anchor:hover { 115 color:#000000!important; 116 text-decoration:underline; 117 text-shadow: 2px 2px 2px #999999; 118 } 119 /* ---------------------------------------------------------------------------- 120 TOC Plugin 121 ------------------------------------------------------------------------------- */ 122 .PyLucidPlugins.TOC { 123 border: 1px solid #eeeeee; 124 background-color: #fefefe; 125 margin: 3em; 126 padding: 1em 0em 1em 0em; 127 } 128 .PyLucidPlugins.TOC h3 { 129 margin: 0em; 130 color: #333333; 131 } 132 .PyLucidPlugins.TOC * { 133 margin: 0em; 134 color: #dddddd; 135 } 136 .PyLucidPlugins.TOC a { 137 color: #777777; 138 } 139 .PyLucidPlugins.TOC a:hover { 140 color: #286ea0; 141 } -
branches/0.9/pylucid_project/middlewares/headline_anchor.py
r2551 r2553 105 105 106 106 try: 107 pagemeta = request.PYLUCID.pagemeta 108 context = request.PYLUCID.context 109 except AttributeError: 107 # Get the permalink to the current page 108 permalink = request.PYLUCID.context["page_permalink"] 109 except AttributeError, KeyError: 110 # We are not on a cms page -> e.g.: in the admin pandel 110 111 # No cms page request -> do nothing 111 112 #print "*** No request.PYLUCID.pagemeta!", response._headers["content-type"] 112 return response113 permalink = request.path 113 114 114 115 # response is a HttpResponse object. Get the content via response.content will 115 116 # encode it to byte string, but we need unicode. 116 117 content = force_unicode(response.content, encoding=response._charset) 117 118 # Get the permalink to the current page119 permalink = request.PYLUCID.context["page_permalink"]120 # permalink = pagemeta.get_permalink()121 118 122 119 # insert the Headline links … … 126 123 if settings.PYLUCID.TOC_PLACEHOLDER in content: 127 124 # lucidTag TOC is in the content -> insert a table of contents 128 toc_min_count = request.PYLUCID. context["toc_min_count"]125 toc_min_count = request.PYLUCID._toc_min_count # Added in lucidTag TOC 129 126 toc_html = headline_anchor.build_toc(toc_min_count) 130 127 content = content.replace(settings.PYLUCID.TOC_PLACEHOLDER, toc_html) -
branches/0.9/pylucid_project/pylucid_plugins/package_info/templates/package_info/admin_package_info.html
r2540 r2553 2 2 3 3 {% block content %} 4 {% comment %} 5 {% lucidTag TOC %} <- FIXME: TOC doesn't work in admin panel 6 {% endcomment %} 4 {% lucidTag TOC %} 7 5 {% lucidTag package_info all_packages=True display_version=True display_location=True %} 8 6 {% endblock %} -
branches/0.9/pylucid_project/pylucid_plugins/package_info/templates/package_info/packages_table.html
r2542 r2553 16 16 <dl> 17 17 {% if display_version %} 18 <dt> version:</dt><dd>{{ entry.version }}</dd>18 <dt>{% trans "version" %}:</dt><dd>{{ entry.version }}</dd> 19 19 {% endif %} 20 20 21 21 {% if display_location or user.is_superuser %} 22 <dt> filesystem location:</dt>22 <dt>{% trans "filesystem location" %}:</dt> 23 23 <dd>{{ entry.location }}</dd> 24 24 {% endif %} 25 25 26 26 {% if entry.author %} 27 <dt> author:</dt><dd>{{ entry.author }}</dd>27 <dt>{% trans "author" %}:</dt><dd>{{ entry.author }}</dd> 28 28 {% endif %} 29 29 30 30 {% if entry.home_page %} 31 <dt> homepage:</dt>31 <dt>{% trans "homepage" %}:</dt> 32 32 <dd><a href="{{ entry.home_page }}">{{ entry.home_page }}</a></dd> 33 33 {% endif %} 34 34 35 35 {% if entry.license and entry.license != "UNKNOWN" %} 36 <dt> license:</dt>36 <dt>{% trans "license" %}:</dt> 37 37 <dd> 38 38 {% if entry.license_url %}<a href="{{ entry.license_url }}">{% endif %} -
branches/0.9/pylucid_project/pylucid_plugins/package_info/views.py
r2545 r2553 20 20 __version__ = "$Rev:$" 21 21 22 import os 23 22 24 if __name__ == "__main__": 23 import os24 25 os.environ['DJANGO_SETTINGS_MODULE'] = "pylucid_project.settings" 25 26 virtualenv_file = "../../../../../bin/activate_this.py" … … 31 32 from django.conf import settings 32 33 from django.template import mark_safe 34 from django.utils.version import get_svn_revision 33 35 34 36 from pylucid_project import PYLUCID_VERSION_STRING … … 36 38 37 39 # print (!) some debug info. Values can be: False, 1, 2 38 DEBUG = 140 DEBUG = False 39 41 40 42 # Collect only information about these packages: … … 105 107 106 108 109 107 110 class PackageInfo(dict): 108 111 " Holds all package information for *one* package " … … 113 116 self._fill_with_dist_attr() 114 117 self._fill_with_pkg_info() 118 self._add_svn_reversion() 115 119 116 120 def _fill_with_dist_attr(self): … … 174 178 175 179 dict.__setitem__(self, dict_key, pkg_info_value) 180 181 def _add_svn_reversion(self): 182 """ Add Subverion reversion number to version string, if exist """ 183 location = dict.get(self, "location") 184 svn_revision = get_svn_revision(location) 185 if svn_revision == "SVN-unknown": 186 return 187 188 if svn_revision not in self["version"]: 189 self["version"] += " %s" % svn_revision 176 190 177 191 -
branches/0.9/pylucid_project/pylucid_plugins/TOC/views.py
r2549 r2553 48 48 # The real work would be done in: 49 49 # pylucid_project.middlewares.headline_anchor.HeadlineAnchorMiddleware 50 request.PYLUCID. context["toc_min_count"]= min50 request.PYLUCID._toc_min_count = min 51 51 return settings.PYLUCID.TOC_PLACEHOLDER 52 52 -
branches/0.9/pylucid_project/__init__.py
r2411 r2553 14 14 $Author$ 15 15 16 :copyleft: 2009 by the PyLucid team, see AUTHORS for more details.16 :copyleft: 2009-2010 by the PyLucid team, see AUTHORS for more details. 17 17 :license: GNU GPL v3 or above, see LICENSE for more details. 18 18 """ 19 20 import os 19 21 20 22 try: … … 23 25 svn_revision = "" 24 26 else: 25 svn_revision = get_svn_revision(".") 26 if svn_revision == u'SVN-unknown': 27 svn_revision = "" 28 else: 29 # Add a space between the normal version number 30 # and the SVN revision number. 31 svn_revision = " (%s)" % svn_revision 27 path = os.path.split(os.path.abspath(__file__))[0] 28 svn_revision = get_svn_revision(path) 32 29 33 30 __version__ = (0, 9, 0, 'beta', svn_revision) … … 38 35 # - No spaces: "0.8.0 RC2" -> "0.8.0RC2" 39 36 # http://peak.telecommunity.com/DevCenter/setuptools#specifying-your-project-s-version 40 PYLUCID_VERSION_STRING = "%s.%s.%s%s %s" % __version__37 PYLUCID_VERSION_STRING = "%s.%s.%s%s.%s" % __version__ 41 38 42 39 40 if __name__ == "__main__": 41 print PYLUCID_VERSION_STRING