Changeset 2020

Show
Ignore:
Timestamp:
06/04/09 10:11:02 (10 months ago)
Author:
JensDiemer
Message:

* add superfish menu into admin panel.
* move update section to /admin/update/

Location:
branches/0.9/pylucid_project
Files:
5 added
4 modified
1 moved

Legend:

Unmodified
Added
Removed
  • branches/0.9/pylucid_project/apps/pylucid/templates/admin/base_site.html

    r1997 r2020  
    88{# stylesheets for all PyLucid views #} 
    99<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> 
     10 
     11<link rel="stylesheet" type="text/css" media="screen" href="{{ PyLucid_media_url }}superfish/superfish.css" /> 
     12<link rel="stylesheet" type="text/css" media="screen" href="{{ PyLucid_media_url }}superfish/admin_design.css" /> 
     13<script type="text/javascript" src="{{ PyLucid_media_url }}superfish/superfish.js"></script>  
     14<style type="text/css"> 
     15<!-- 
     16/* setup superfish background urls */ 
     17.sf-sub-indicator { 
     18    background: url('{{ PyLucid_media_url }}superfish/arrows-ffffff.png') no-repeat -10px -100px; /* 8-bit indexed alpha png. IE6 gets solid image only */ 
     19} 
     20.sf-shadow ul { 
     21    background: url('{{ PyLucid_media_url }}superfish/shadow.png') no-repeat bottom right; 
     22} 
     23--> 
     24</style> 
     25 
     26 
    1027<script type="text/javascript"> 
    1128MAX_ROWS = 25; 
    1229$(document).ready(function(){ 
     30  // 
     31  // initialise Superfish menu 
     32  //  
     33  $('ul.sf-menu').superfish({  
     34      delay:       1000,                            // one second delay on mouseout  
     35      animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation  
     36      speed:       'fast',                          // faster animation speed 
     37  });  
     38 
    1339  // 
    1440  // Resize all textareas 
     
    2551 
    2652{% block branding %}<h1>PyLucid</h1> 
    27 <a href="/">&lt;&lt; back to root dev page</a> 
    28 | sites: 
    29 {% for site in sites %} 
    30     {% ifequal site current_site %} 
    31         <strong>  
    32         <a href="http://{{ site.domain }}{{ request.path }}" class="current_site" title="current used site">{{ site.name }}</a> 
    33         </strong> 
    34     {% else %} 
    35         <a href="http://{{ site.domain }}{{ request.path }}">{{ site.name }}</a> 
    36     {% endifequal %} 
    37     {% if not forloop.last %} | {% endif %} 
    38 {% endfor %} 
    3953<!-- page_messages --> 
     54{% endblock %} 
     55 
     56{% block pretitle %} 
     57<!-- app pretitle block start --> 
     58<ul class="sf-menu"> 
     59    <li class="current"> 
     60        <a href="/">&lt;&lt; back to root dev page</a> 
     61    </li> 
     62    <li> 
     63        <a>{% trans 'switch site' %}</a> 
     64        <ul> 
     65         
     66        {% for site in sites %} 
     67          <li> 
     68            {% ifequal site current_site %} 
     69                <strong>  
     70                <a href="http://{{ site.domain }}{{ request.path }}" class="current_site" title="current used site">{{ site.name }}</a> 
     71                </strong> 
     72            {% else %} 
     73                <a href="http://{{ site.domain }}{{ request.path }}">{{ site.name }}</a> 
     74            {% endifequal %} 
     75           </li> 
     76        {% endfor %} 
     77        </ul> 
     78    </li> 
     79    <li> 
     80        <a href="#TODO">{% trans 'admin menu' %}</a> 
     81    </li> 
     82    <li> 
     83        <a href="{% url PyLucidUpdate-menu %}">{% trans 'update section' %}</a> 
     84    </li> 
     85</ul> 
     86<!-- app pretitle block end --> 
    4087{% endblock %} 
    4188 
  • branches/0.9/pylucid_project/apps/pylucid_update/templates/pylucid_update/additional_styles.css

    r2016 r2020  
    99.admin_menu { 
    1010    float: none; 
    11     clear:both; 
     11    clear: both; 
    1212    height: 2.7em; 
    1313} 
  • branches/0.9/pylucid_project/apps/pylucid_update/templates/pylucid_update/base_site.html

    r1931 r2020  
    1 {% extends "admin/base.html" %} 
     1{% extends "admin/base_site.html" %} 
    22{% load i18n %} 
    33 
    4 {% block title %}PyLucid update - {{ title }}{% endblock %} 
    5  
    6 {% block app_extrahead %} 
    7 <!-- app_extrahead block start --> 
    8 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> 
    9 <style> 
    10 #input_fields, .errorlist { 
    11     list-style-type:none; 
    12     padding: 0px; 
    13     margin: 0px; 
    14 } 
    15 #input_fields label { 
    16     font-size: 0.8em; 
    17 } 
    18 #input_fields .field_help_text { 
    19     font-size:0.7em; 
    20     display: block; 
    21     padding-left: 11em; 
    22 } 
    23 #input_fields label { 
    24     float: left; 
    25     padding-right: 4px; 
    26     text-align: right; 
    27     width: 9em; 
    28 } 
    29 #input_fields input, #input_fields select { 
    30     width: 35%; 
    31 } 
    32 #input_fields .bigger { 
    33     /* make some text input fields bigger e.g. keywords,description */ 
    34     width: 75%; 
    35 } 
    36 #input_fields .error_field { 
    37     /* newforms errors */ 
    38     border: 1px solid #f00; 
    39     margin: 5px; 
    40 } 
    41 .errorlist li { 
    42     padding: 2px 10px 2px 10px; 
    43     margin: 5px; 
    44     color: #fff; 
    45     background-color: #f00; 
    46 } 
    47 /* -------------------------------------------------------------------------- */ 
    48 </style> 
    49  
    50 <!-- app_extrahead block end --> 
     4{% block branding %}<h1>PyLucid Update</h1> 
     5<!-- page_messages --> 
    516{% endblock %} 
    52  
    53 {% block branding %}<h1>PyLucid update</h1>{% endblock %} 
    547 
    558{% block breadcrumbs %}{% if not is_popup %} 
    569<div class="breadcrumbs"> 
    57      <a href="/">Home</a> › 
     10     <a href="{% url admin_index %}">Home</a> › 
    5811     <a href="{% url PyLucidUpdate-menu %}">Update</a> › 
    5912     {{ title }} 
    6013</div>{% endif %} 
    6114{% endblock %} 
    62  
    63 {% block footer %} 
    64 <!-- app footer block start --> 
    65 <hr/> 
    66 <a href="http://www.pylucid.org/_goto/107/install-PyLucid/">install guide</a> 
    67 | 
    68 <a href="http://www.pylucid.org/_goto/108/Update-PyLucid/">update instructions</a> 
    69 | 
    70 <span class="page_stats">{% trans 'page stats:' %} <!-- script_duration --></span> 
    71 <!-- app footer block end --> 
    72 {% endblock %} 
  • branches/0.9/pylucid_project/urls.py

    r2002 r2020  
    2727urlpatterns = patterns('', 
    2828    #_____________________________________ 
     29    # PYLUCID UPDATE SECTION 
     30    ('^%s/update/'% settings.ADMIN_URL_PREFIX, include('pylucid_update.urls')), 
     31     
     32    #_____________________________________ 
    2933    # DJANGO ADMIN PANEL 
    3034    (r'^%s/' % settings.ADMIN_URL_PREFIX, include(admin.site.urls)), 
    31  
    32     ('^update/', include('pylucid_update.urls')), 
    3335) 
    3436