Changeset - 6d44d3862ec4
[Not reviewed]
default
0 3 0
Marcin Kuzminski - 15 years ago 2010-09-30 12:44:06
marcin@python-works.com
fixes #36, removed username, name, lastname, minimal length restrictions,
fixed branches/tags icons in changelog and made them active links
3 files changed with 20 insertions and 18 deletions:
0 comments (0 inline, 0 general)
pylons_app/model/forms.py
Show inline comments
 
""" this is forms validation classes
 
http://formencode.org/module-formencode.validators.html
 
for list off all availible validators
 

	
 
we can create our own validators
 

	
 
The table below outlines the options which can be used in a schema in addition to the validators themselves
 
pre_validators          []     These validators will be applied before the schema
 
chained_validators      []     These validators will be applied after the schema
 
allow_extra_fields      False     If True, then it is not an error when keys that aren't associated with a validator are present
 
filter_extra_fields     False     If True, then keys that aren't associated with a validator are removed
 
if_key_missing          NoDefault If this is given, then any keys that aren't available but are expected will be replaced with this value (and then validated). This does not override a present .if_missing attribute on validators. NoDefault is a special FormEncode class to mean that no default values has been specified and therefore missing keys shouldn't take a default value.
 
ignore_key_missing      False     If True, then missing keys will be missing in the result, if the validator doesn't have .if_missing on it already    
 
  
 
  
 
<name> = formencode.validators.<name of validator>
 
<name> must equal form name
 
list=[1,2,3,4,5]
 
for SELECT use formencode.All(OneOf(list), Int())
 
    
 
"""
 
from formencode import All
 
from formencode.validators import UnicodeString, OneOf, Int, Number, Regex, \
 
    Email, Bool, StringBoolean
 
from pylons import session
 
from pylons.i18n.translation import _
 
from pylons_app.lib.auth import check_password, get_crypt_password
 
from pylons_app.model import meta
 
from pylons_app.model.user_model import UserModel
 
from pylons_app.model.db import User, Repository
 
from sqlalchemy.exc import OperationalError
 
from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound
 
from webhelpers.pylonslib.secure_form import authentication_token
 
import formencode
 
import logging
 
import os
 
import pylons_app.lib.helpers as h
 
log = logging.getLogger(__name__)
 

	
 

	
 
#this is needed to translate the messages using _() in validators
 
class State_obj(object):
 
    _ = staticmethod(_)
 
    
 
#===============================================================================
 
# VALIDATORS
 
#===============================================================================
 
class ValidAuthToken(formencode.validators.FancyValidator):
 
    messages = {'invalid_token':_('Token mismatch')}
 

	
 
    def validate_python(self, value, state):
 

	
 
        if value != authentication_token():
 
            raise formencode.Invalid(self.message('invalid_token', state,
 
                                            search_number=value), value, state)
 
            
 
def ValidUsername(edit, old_data):             
 
    class _ValidUsername(formencode.validators.FancyValidator):
 
    
 
        def validate_python(self, value, state):
 
            if value in ['default', 'new_user']:
 
                raise formencode.Invalid(_('Invalid username'), value, state)
 
            #check if user is uniq
 
            sa = meta.Session
 
            old_un = None
 
            if edit:
 
                old_un = sa.query(User).get(old_data.get('user_id')).username
 
                
 
            if old_un != value or not edit:    
 
                if sa.query(User).filter(User.username == value).scalar():
 
                    raise formencode.Invalid(_('This username already exists') ,
 
                                             value, state)
 
            meta.Session.remove()
 
                            
 
    return _ValidUsername   
 
    
 
class ValidPassword(formencode.validators.FancyValidator):
 
    
 
    def to_python(self, value, state):
 
        if value:
 
            return get_crypt_password(value)
 
        
 
class ValidAuth(formencode.validators.FancyValidator):
 
    messages = {
 
            'invalid_password':_('invalid password'),
 
            'invalid_login':_('invalid user name'),
 
            'disabled_account':_('Your acccount is disabled')
 
            
 
            }
 
    #error mapping
 
    e_dict = {'username':messages['invalid_login'],
 
              'password':messages['invalid_password']}
 
    e_dict_disable = {'username':messages['disabled_account']}
 
    
 
    def validate_python(self, value, state):
 
        password = value['password']
 
        username = value['username']
 
        user = UserModel().get_user_by_name(username)
 
        if user is None:
 
            raise formencode.Invalid(self.message('invalid_password',
 
                                     state=State_obj), value, state,
 
                                     error_dict=self.e_dict)            
 
        if user:
 
            if user.active:
 
                if user.username == username and check_password(password,
 
                                                                user.password):
 
                    return value
 
                else:
 
                    log.warning('user %s not authenticated', username)
 
                    raise formencode.Invalid(self.message('invalid_password',
 
                                             state=State_obj), value, state,
 
                                             error_dict=self.e_dict)
 
            else:
 
                log.warning('user %s is disabled', username)
 
                raise formencode.Invalid(self.message('disabled_account',
 
                                         state=State_obj),
 
                                         value, state,
 
                                         error_dict=self.e_dict_disable)
 
                   
 
class ValidRepoUser(formencode.validators.FancyValidator):
 
            
 
    def to_python(self, value, state):
 
        try:
 
            self.user_db = meta.Session.query(User)\
 
                .filter(User.active == True)\
 
                .filter(User.username == value).one()
 
        except Exception:
 
            raise formencode.Invalid(_('This username is not valid'),
 
                                     value, state)
 
        finally:
 
            meta.Session.remove()
 
                        
 
        return self.user_db.user_id
 

	
 
def ValidRepoName(edit, old_data):    
 
    class _ValidRepoName(formencode.validators.FancyValidator):
 
            
 
        def to_python(self, value, state):
 
            slug = h.repo_name_slug(value)
 
            if slug in ['_admin']:
 
                raise formencode.Invalid(_('This repository name is disallowed'),
 
                                         value, state)
 
            if old_data.get('repo_name') != value or not edit:    
 
                sa = meta.Session
 
                if sa.query(Repository).filter(Repository.repo_name == slug).scalar():
 
                    raise formencode.Invalid(_('This repository already exists') ,
 
                                             value, state)
 
                meta.Session.remove()
 
            return slug 
 
        
 
        
 
    return _ValidRepoName
 

	
 
class ValidPerms(formencode.validators.FancyValidator):
 
    messages = {'perm_new_user_name':_('This username is not valid')}
 
    
 
    def to_python(self, value, state):
 
        perms_update = []
 
        perms_new = []
 
        #build a list of permission to update and new permission to create
 
        for k, v in value.items():
 
            if k.startswith('perm_'):
 
                if  k.startswith('perm_new_user'):
 
                    new_perm = value.get('perm_new_user', False)
 
                    new_user = value.get('perm_new_user_name', False)
 
                    if new_user and new_perm:
 
                        if (new_user, new_perm) not in perms_new:
 
                            perms_new.append((new_user, new_perm))
 
                else:
 
                    usr = k[5:]                    
 
                    if usr == 'default':
 
                        if value['private']:
 
                            #set none for default when updating to private repo
 
                            v = 'repository.none'
 
                    perms_update.append((usr, v))
 
        value['perms_updates'] = perms_update
 
        value['perms_new'] = perms_new
 
        sa = meta.Session
 
        for k, v in perms_new:
 
            try:
 
                self.user_db = sa.query(User)\
 
                    .filter(User.active == True)\
 
                    .filter(User.username == k).one()
 
            except Exception:
 
                msg = self.message('perm_new_user_name',
 
                                     state=State_obj)
 
                raise formencode.Invalid(msg, value, state, error_dict={'perm_new_user_name':msg})            
 
        return value
 
    
 
class ValidSettings(formencode.validators.FancyValidator):
 
    
 
    def to_python(self, value, state):
 
        #settings  form can't edit user
 
        if value.has_key('user'):
 
            del['value']['user']
 
        
 
        return value
 
    
 
class ValidPath(formencode.validators.FancyValidator):
 
    def to_python(self, value, state):
 
        isdir = os.path.isdir(value.replace('*', ''))
 
        if (value.endswith('/*') or value.endswith('/**')) and isdir:
 
            return value
 
        elif not isdir:
 
            msg = _('This is not a valid path') 
 
        else:
 
            msg = _('You need to specify * or ** at the end of path (ie. /tmp/*)')
 
        
 
        raise formencode.Invalid(msg, value, state,
 
                                     error_dict={'paths_root_path':msg})            
 

	
 
def UniqSystemEmail(old_data):
 
    class _UniqSystemEmail(formencode.validators.FancyValidator):
 
        def to_python(self, value, state):
 
            if old_data.get('email') != value:
 
                sa = meta.Session
 
                try:
 
                    user = sa.query(User).filter(User.email == value).scalar()
 
                    if user:
 
                        raise formencode.Invalid(_("That e-mail address is already taken") ,
 
                                                 value, state)
 
                finally:
 
                    meta.Session.remove()
 
                
 
            return value
 
        
 
    return _UniqSystemEmail
 
    
 
class ValidSystemEmail(formencode.validators.FancyValidator):
 
    def to_python(self, value, state):
 
        sa = meta.Session
 
        try:
 
            user = sa.query(User).filter(User.email == value).scalar()
 
            if  user is None:
 
                raise formencode.Invalid(_("That e-mail address doesn't exist.") ,
 
                                         value, state)
 
        finally:
 
            meta.Session.remove()
 
            
 
        return value     
 

	
 
#===============================================================================
 
# FORMS        
 
#===============================================================================
 
class LoginForm(formencode.Schema):
 
    allow_extra_fields = True
 
    filter_extra_fields = True
 
    username = UnicodeString(
 
                             strip=True,
 
                             min=3,
 
                             min=1,
 
                             not_empty=True,
 
                             messages={
 
                                       'empty':_('Please enter a login'),
 
                                       'tooShort':_('Enter a value %(min)i characters long or more')}
 
                            )
 

	
 
    password = UnicodeString(
 
                            strip=True,
 
                            min=3,
 
                            min=8,
 
                            not_empty=True,
 
                            messages={
 
                                      'empty':_('Please enter a password'),
 
                                      'tooShort':_('Enter a value %(min)i characters long or more')}
 
                                )
 

	
 

	
 
    #chained validators have access to all data
 
    chained_validators = [ValidAuth]
 
    
 
def UserForm(edit=False, old_data={}):
 
    class _UserForm(formencode.Schema):
 
        allow_extra_fields = True
 
        filter_extra_fields = True
 
        username = All(UnicodeString(strip=True, min=3, not_empty=True), ValidUsername(edit, old_data))
 
        username = All(UnicodeString(strip=True, min=1, not_empty=True), ValidUsername(edit, old_data))
 
        if edit:
 
            new_password = All(UnicodeString(strip=True, min=3, not_empty=False), ValidPassword)
 
            new_password = All(UnicodeString(strip=True, min=8, not_empty=False), ValidPassword)
 
            admin = StringBoolean(if_missing=False)
 
        else:
 
            password = All(UnicodeString(strip=True, min=8, not_empty=True), ValidPassword)
 
        active = StringBoolean(if_missing=False)
 
        name = UnicodeString(strip=True, min=3, not_empty=True)
 
        lastname = UnicodeString(strip=True, min=3, not_empty=True)
 
        name = UnicodeString(strip=True, min=1, not_empty=True)
 
        lastname = UnicodeString(strip=True, min=1, not_empty=True)
 
        email = All(Email(not_empty=True), UniqSystemEmail(old_data))
 
        
 
    return _UserForm
 

	
 
RegisterForm = UserForm
 

	
 
def PasswordResetForm():
 
    class _PasswordResetForm(formencode.Schema):
 
        allow_extra_fields = True
 
        filter_extra_fields = True
 
        email = All(ValidSystemEmail(), Email(not_empty=True))             
 
    return _PasswordResetForm
 

	
 
def RepoForm(edit=False, old_data={}):
 
    class _RepoForm(formencode.Schema):
 
        allow_extra_fields = True
 
        filter_extra_fields = False
 
        repo_name = All(UnicodeString(strip=True, min=1, not_empty=True), ValidRepoName(edit, old_data))
 
        description = UnicodeString(strip=True, min=3, not_empty=True)
 
        description = UnicodeString(strip=True, min=1, not_empty=True)
 
        private = StringBoolean(if_missing=False)
 
        
 
        if edit:
 
            user = All(Int(not_empty=True), ValidRepoUser)
 
        
 
        chained_validators = [ValidPerms]
 
    return _RepoForm
 

	
 
def RepoSettingsForm(edit=False, old_data={}):
 
    class _RepoForm(formencode.Schema):
 
        allow_extra_fields = True
 
        filter_extra_fields = False
 
        repo_name = All(UnicodeString(strip=True, min=1, not_empty=True), ValidRepoName(edit, old_data))
 
        description = UnicodeString(strip=True, min=3, not_empty=True)
 
        description = UnicodeString(strip=True, min=1, not_empty=True)
 
        private = StringBoolean(if_missing=False)
 
        
 
        chained_validators = [ValidPerms, ValidSettings]
 
    return _RepoForm
 

	
 

	
 
def ApplicationSettingsForm():
 
    class _ApplicationSettingsForm(formencode.Schema):
 
        allow_extra_fields = True
 
        filter_extra_fields = False
 
        hg_app_title = UnicodeString(strip=True, min=3, not_empty=True)
 
        hg_app_realm = UnicodeString(strip=True, min=3, not_empty=True)
 
        hg_app_title = UnicodeString(strip=True, min=1, not_empty=True)
 
        hg_app_realm = UnicodeString(strip=True, min=1, not_empty=True)
 
        
 
    return _ApplicationSettingsForm
 
 
 
def ApplicationUiSettingsForm():
 
    class _ApplicationUiSettingsForm(formencode.Schema):
 
        allow_extra_fields = True
 
        filter_extra_fields = False
 
        web_push_ssl = OneOf(['true', 'false'], if_missing='false')
 
        paths_root_path = All(ValidPath(), UnicodeString(strip=True, min=3, not_empty=True))
 
        paths_root_path = All(ValidPath(), UnicodeString(strip=True, min=1, not_empty=True))
 
        hooks_changegroup_update = OneOf(['True', 'False'], if_missing=False)
 
        hooks_changegroup_repo_size = OneOf(['True', 'False'], if_missing=False)
 
        
 
    return _ApplicationUiSettingsForm
 

	
 
def DefaultPermissionsForm(perms_choices, register_choices, create_choices):
 
    class _DefaultPermissionsForm(formencode.Schema):
 
        allow_extra_fields = True
 
        filter_extra_fields = True
 
        overwrite_default = OneOf(['true', 'false'], if_missing='false')
 
        default_perm = OneOf(perms_choices)
 
        default_register = OneOf(register_choices)
 
        default_create = OneOf(create_choices)
 
        
 
    return _DefaultPermissionsForm
pylons_app/public/css/style.css
Show inline comments
 
@@ -2387,1336 +2387,1336 @@ div.form div.fields div.buttons input
 
	float: left;
 
	border: none;
 
}
 
 
#content div.box div.traffic div.legend ul
 
{
 
	margin: 0;
 
	padding: 0;
 
	float: right;	
 
}
 
 
#content div.box div.traffic div.legend li
 
{
 
	margin: 0;
 
	padding: 0 8px 0 4px;
 
	list-style: none;
 
	float: left;
 
	font-size: 11px;
 
}
 
 
#content div.box div.traffic div.legend li.visits
 
{
 
	border-left: 12px solid #edc240;
 
}
 
 
#content div.box div.traffic div.legend li.pageviews
 
{
 
	border-left: 12px solid #afd8f8;
 
}
 
 
#content div.box div.traffic table
 
{
 
	width: auto;
 
}
 
 
#content div.box div.traffic table td
 
{
 
	padding: 2px 3px 3px 3px;
 
	background: transparent;
 
	border: none;
 
}
 
 
#content div.box div.traffic table td.legendLabel
 
{
 
	padding: 0 3px 2px 3px;
 
}
 
 
/* -----------------------------------------------------------
 
	footer
 
----------------------------------------------------------- */
 
 
#footer
 
{
 
    margin: 0;
 
    padding: 5px 0 5px 0;
 
    clear: both;
 
    overflow: hidden;
 
    background: #2a2a2a;
 
    text-align: right;
 
}
 
 
#footer p
 
{
 
    margin: 0 80px 0 80px;
 
    padding: 10px 0 10px 0;
 
    color: #ffffff;
 
}
 
 
/* -----------------------------------------------------------
 
	login
 
----------------------------------------------------------- */
 
 
#login
 
{
 
    margin: 10% auto 0 auto;
 
    padding: 0;
 
	width: 420px;
 
}
 
 
/* -----------------------------------------------------------
 
	login -> colors
 
----------------------------------------------------------- */ 
 
 
#login div.color
 
{
 
    margin: 10px auto 0 auto;
 
    padding: 3px 3px 3px 0;
 
	clear: both;
 
	overflow: hidden;
 
    background: #FFFFFF;
 
}
 
 
#login div.color a
 
{
 
    margin: 0 0 0 3px;
 
    padding: 0;
 
    width: 20px;
 
    height: 20px;
 
    display: block;
 
    float: left;
 
}
 
 
/* -----------------------------------------------------------
 
	login -> title
 
----------------------------------------------------------- */ 
 
 
#login div.title
 
{
 
	margin: 0 auto;
 
	padding: 0;
 
	width: 420px;
 
	clear: both;
 
	overflow: hidden;
 
	position: relative;
 
	background: #003367 url("../images/colors/blue/header_inner.png") repeat-x;
 
}
 
 
#login div.title h5
 
{
 
	margin: 10px;
 
	padding: 0;
 
	color: #ffffff;	
 
}
 
 
/* -----------------------------------------------------------
 
	login -> title / corners
 
----------------------------------------------------------- */ 
 
 
#login div.title div.corner
 
{
 
	height: 6px;
 
	width: 6px;
 
	position: absolute;
 
	background: url("../images/colors/blue/login_corners.png") no-repeat;
 
}
 
 
#login div.title div.tl
 
{
 
	top: 0;
 
	left: 0;
 
    background-position: 0 0;
 
}
 
 
#login div.title div.tr
 
{
 
	top: 0;
 
	right: 0;
 
    background-position: -6px 0;
 
}
 
 
#login div.inner
 
{
 
    margin: 0 auto;
 
    padding: 20px;
 
    width: 380px;
 
	background: #FFFFFF url("../images/login.png") no-repeat top left;
 
    border-top: none;
 
    border-bottom: none;
 
}
 
 
/* -----------------------------------------------------------
 
	login -> form
 
----------------------------------------------------------- */
 
 
#login div.form
 
{
 
    margin: 0;
 
    padding: 0;
 
    clear: both;
 
    overflow: hidden;
 
}
 
 
#login div.form div.fields
 
{
 
	margin: 0;
 
	padding: 0;
 
    clear: both;
 
    overflow: hidden;
 
}
 
 
#login div.form div.fields div.field
 
{
 
	margin: 0;
 
	padding: 0 0 10px 0; 
 
	clear: both;
 
	overflow: hidden;
 
}
 
 
#login div.form div.fields div.field span.error-message
 
{
 
	margin: 8px 0 0 0;
 
	padding: 0;
 
	height: 1%;
 
	display: block;
 
	color: #FF0000;
 
}
 
 
#login div.form div.fields div.field div.label
 
{
 
	margin: 2px 10px 0 0;
 
	padding: 5px 0 0 5px;
 
	width: 173px;
 
	float: left;
 
    text-align: right;
 
}
 
 
#login div.form div.fields div.field div.label label
 
{
 
    color: #000000;
 
    font-weight: bold;
 
}
 
 
#login  div.form div.fields div.field div.label span
 
{
 
	margin: 0;
 
	padding: 2px 0 0 0;
 
	height: 1%;
 
	display: block;
 
	color: #363636;
 
}
 
 
#login div.form div.fields div.field div.input
 
{
 
	margin: 0;
 
	padding: 0;
 
	float: left;
 
}
 
 
#login div.form div.fields div.field div.input input
 
{
 
    margin: 0;
 
    padding: 7px 7px 6px 7px;
 
    width: 176px;
 
    background: #FFFFFF;
 
    border-top: 1px solid #b3b3b3;
 
    border-left: 1px solid #b3b3b3;
 
    border-right: 1px solid #eaeaea;
 
    border-bottom: 1px solid #eaeaea;
 
    color: #000000;
 
	font-family: Lucida Grande, Verdana, Lucida Sans Regular, Lucida Sans Unicode, Arial, sans-serif;
 
	font-size: 11px;
 
}
 
 
#login div.form div.fields div.field div.input  input.error
 
{
 
	background: #FBE3E4;
 
	border-top: 1px solid #e1b2b3;
 
	border-left: 1px solid #e1b2b3;
 
	border-right: 1px solid #FBC2C4;
 
	border-bottom: 1px solid #FBC2C4;
 
}
 
 
#login div.form div.fields div.field div.input  input.success
 
{
 
	background: #E6EFC2;
 
	border-top: 1px solid #cebb98;
 
	border-left: 1px solid #cebb98;
 
	border-right: 1px solid #c6d880;
 
	border-bottom: 1px solid #c6d880;
 
}
 
 
#login div.form div.fields div.field div.input div.link
 
{
 
	margin: 6px 0 0 0;
 
	padding: 0;
 
	text-align: right;
 
}
 
 
#login div.form div.fields div.field div.checkbox
 
{
 
	margin: 0 0 0 184px;
 
	padding: 0;
 
}
 
 
#login div.form div.fields div.field div.checkbox label
 
{
 
    color: #565656;
 
    font-weight: bold;
 
}
 
 
#login div.form div.fields div.buttons
 
{
 
	margin: 0;
 
	padding: 10px 0 0 0;
 
	clear: both;
 
	overflow: hidden;
 
	border-top: 1px solid #DDDDDD;
 
	text-align: right;
 
}
 
 
#login div.form div.fields div.buttons input
 
{
 
	margin: 0;
 
    color: #000000;
 
	font-size: 1.0em; 
 
    font-weight: bold;
 
	font-family: Verdana, Helvetica, Sans-Serif; 
 
}
 
 
#login div.form div.fields div.buttons input.ui-state-default
 
{
 
    margin: 0;
 
    padding: 6px 12px 6px 12px;
 
    background: #e5e3e3 url("../images/button.png") repeat-x;
 
    border-top: 1px solid #DDDDDD;
 
    border-left: 1px solid #c6c6c6;
 
    border-right: 1px solid #DDDDDD;
 
    border-bottom: 1px solid #c6c6c6;
 
    color: #515151;
 
}
 
 
#login div.form div.fields div.buttons input.ui-state-hover
 
{
 
    margin: 0;
 
    padding: 6px 12px 6px 12px;
 
    background: #b4b4b4 url("../images/button_selected.png") repeat-x;
 
    border-top: 1px solid #cccccc;
 
    border-left: 1px solid #bebebe;
 
    border-right: 1px solid #b1b1b1;
 
    border-bottom: 1px solid #afafaf;
 
    color: #515151;
 
}
 
 
/* -----------------------------------------------------------
 
	login -> links
 
----------------------------------------------------------- */
 
 
#login div.form div.links
 
{
 
	margin: 10px 0 0 0;
 
	padding: 0 0 2px 0;
 
    clear: both;
 
    overflow: hidden;
 
}
 
 
/* -----------------------------------------------------------
 
	register
 
----------------------------------------------------------- */
 
 
#register
 
{
 
    margin: 10% auto 0 auto;
 
    padding: 0;
 
	width: 420px;
 
}
 
 
/* -----------------------------------------------------------
 
	register -> colors
 
----------------------------------------------------------- */ 
 
 
#register div.color
 
{
 
    margin: 10px auto 0 auto;
 
    padding: 3px 3px 3px 0;
 
	clear: both;
 
	overflow: hidden;
 
    background: #FFFFFF;
 
}
 
 
#register div.color a
 
{
 
    margin: 0 0 0 3px;
 
    padding: 0;
 
    width: 20px;
 
    height: 20px;
 
    display: block;
 
    float: left;
 
}
 
 
/* -----------------------------------------------------------
 
	register -> title
 
----------------------------------------------------------- */ 
 
 
#register div.title
 
{
 
	margin: 0 auto;
 
	padding: 0;
 
	width: 420px;
 
	clear: both;
 
	overflow: hidden;
 
	position: relative;
 
	background: #003367 url("../images/colors/blue/header_inner.png") repeat-x;
 
}
 
 
#register div.title h5
 
{
 
	margin: 10px;
 
	padding: 0;
 
	color: #ffffff;	
 
}
 
 
/* -----------------------------------------------------------
 
	register -> inner
 
----------------------------------------------------------- */
 
#register div.title div.corner
 
{
 
	height: 6px;
 
	width: 6px;
 
	position: absolute;
 
	background: url("../images/colors/blue/login_corners.png") no-repeat;
 
}
 
 
#register div.title div.tl
 
{
 
	top: 0;
 
	left: 0;
 
    background-position: 0 0;
 
}
 
 
#register div.title div.tr
 
{
 
	top: 0;
 
	right: 0;
 
    background-position: -6px 0;
 
    
 
}
 
#register div.inner
 
{
 
    margin: 0 auto;
 
    padding: 20px;
 
    width: 380px;
 
	background: #FFFFFF;
 
    border-top: none;
 
    border-bottom: none;
 
}
 
 
/* -----------------------------------------------------------
 
	register -> form
 
----------------------------------------------------------- */
 
 
#register div.form
 
{
 
    margin: 0;
 
    padding: 0;
 
    clear: both;
 
    overflow: hidden;
 
}
 
 
#register div.form div.fields
 
{
 
	margin: 0;
 
	padding: 0;
 
    clear: both;
 
    overflow: hidden;
 
}
 
 
#register div.form div.fields div.field
 
{
 
	margin: 0;
 
	padding: 0 0 10px 0; 
 
	clear: both;
 
	overflow: hidden;
 
}
 
 
#register div.form div.fields div.field span.error-message
 
{
 
	margin: 8px 0 0 0;
 
	padding: 0;
 
	height: 1%;
 
	display: block;
 
	color: #FF0000;
 
}
 
 
#register div.form div.fields div.field div.label
 
{
 
	margin: 2px 10px 0 0;
 
	padding: 5px 0 0 5px;
 
	width: 100px;
 
	float: left;
 
    text-align: right;
 
}
 
 
#register div.form div.fields div.field div.label label
 
{
 
    color: #000000;
 
    font-weight: bold;
 
}
 
 
#register  div.form div.fields div.field div.label span
 
{
 
	margin: 0;
 
	padding: 2px 0 0 0;
 
	height: 1%;
 
	display: block;
 
	color: #363636;
 
}
 
 
#register div.form div.fields div.field div.input
 
{
 
	margin: 0;
 
	padding: 0;
 
	float: left;
 
}
 
 
#register div.form div.fields div.field div.input input
 
{
 
    margin: 0;
 
    padding: 7px 7px 6px 7px;
 
    width: 245px;
 
    background: #FFFFFF;
 
    border-top: 1px solid #b3b3b3;
 
    border-left: 1px solid #b3b3b3;
 
    border-right: 1px solid #eaeaea;
 
    border-bottom: 1px solid #eaeaea;
 
    color: #000000;
 
	font-family: Lucida Grande, Verdana, Lucida Sans Regular, Lucida Sans Unicode, Arial, sans-serif;
 
	font-size: 11px;
 
}
 
 
#register div.form div.fields div.field div.input  input.error
 
{
 
	background: #FBE3E4;
 
	border-top: 1px solid #e1b2b3;
 
	border-left: 1px solid #e1b2b3;
 
	border-right: 1px solid #FBC2C4;
 
	border-bottom: 1px solid #FBC2C4;
 
}
 
 
#register div.form div.fields div.field div.input  input.success
 
{
 
	background: #E6EFC2;
 
	border-top: 1px solid #cebb98;
 
	border-left: 1px solid #cebb98;
 
	border-right: 1px solid #c6d880;
 
	border-bottom: 1px solid #c6d880;
 
}
 
 
#register div.form div.fields div.field div.input div.link
 
{
 
	margin: 6px 0 0 0;
 
	padding: 0;
 
	text-align: right;
 
}
 
 
#register div.form div.fields div.field div.checkbox
 
{
 
	margin: 0 0 0 184px;
 
	padding: 0;
 
}
 
 
#register div.form div.fields div.field div.checkbox label
 
{
 
    color: #565656;
 
    font-weight: bold;
 
}
 
 
#register div.form div.fields div.buttons
 
{
 
	margin: 0;
 
	padding: 10px 0 0 114px;
 
	clear: both;
 
	overflow: hidden;
 
	border-top: 1px solid #DDDDDD;
 
	text-align: left;
 
}
 
 
#register div.form div.fields div.buttons input
 
{
 
	margin: 0;
 
    color: #000000;
 
	font-size: 1.0em; 
 
    font-weight: bold;
 
	font-family: Verdana, Helvetica, Sans-Serif; 
 
}
 
 
#register div.form div.fields div.buttons input.ui-state-default
 
{
 
    margin: 0;
 
    padding: 6px 12px 6px 12px;
 
    background: #e5e3e3 url("../images/button.png") repeat-x;
 
    border-top: 1px solid #DDDDDD;
 
    border-left: 1px solid #c6c6c6;
 
    border-right: 1px solid #DDDDDD;
 
    border-bottom: 1px solid #c6c6c6;
 
    color: #515151;
 
}
 
#register div.form div.fields div.buttons div.highlight input.ui-state-default
 
{
 
	background:url("../images/colors/blue/button_highlight.png") repeat-x scroll 0 0 #4E85BB;
 
	border-color:#5C91A4 #2B7089 #1A6480 #2A6F89;
 
	border-style:solid;
 
	border-width:1px;
 
	color:#FFFFFF;
 
}
 
 
 
 
#register div.form div.fields div.buttons input.ui-state-hover
 
{
 
    margin: 0;
 
    padding: 6px 12px 6px 12px;
 
    background: #b4b4b4 url("../images/button_selected.png") repeat-x;
 
    border-top: 1px solid #cccccc;
 
    border-left: 1px solid #bebebe;
 
    border-right: 1px solid #b1b1b1;
 
    border-bottom: 1px solid #afafaf;
 
    color: #515151;
 
}
 
 
#register div.form div.activation_msg {
 
	padding-top:4px;
 
	padding-bottom:4px;
 
	
 
}
 
 
/* -----------------------------------------------------------
 
	SUMMARY
 
----------------------------------------------------------- */
 
.trending_language_tbl, .trending_language_tbl td {
 
	margin:  0px !important;
 
	padding: 0px !important;
 
	border: 0 !important;
 
 
}
 
.trending_language{
 
	-moz-border-radius-bottomright:4px;
 
	-moz-border-radius-topright:4px;
 
	border-bottom-right-radius: 4px 4px;
 
	border-top-right-radius: 4px 4px;
 
	background-color:#336699;
 
	color:#FFFFFF;
 
	display:block;
 
	min-width:20px;
 
	max-width:400px;
 
	padding:3px;
 
	text-decoration:none;
 
	height: 10px;
 
	margin-bottom: 4px;
 
	margin-left: 5px;
 
}
 
 
#clone_url{
 
	border: none;
 
}
 
/* -----------------------------------------------------------
 
    FILES
 
----------------------------------------------------------- */
 
 
h3.files_location{
 
    font-size: 1.8em;
 
    font-weight: bold;
 
    margin: 10px 0 !important;
 
    border-bottom: none !important;
 
}
 
 
#files_data.dl{
 
 
 
}
 
#files_data dl dt{
 
    float:left;
 
    margin:0 !important;
 
    padding:5px;
 
    width:115px;
 
}
 
#files_data dl dd{
 
    margin:0 !important;
 
    padding: 5px !important;
 
}
 
 
 
/* -----------------------------------------------------------
 
	CHANGESETS
 
----------------------------------------------------------- */
 
#changeset_content {
 
	border:1px solid #CCCCCC;
 
	padding:5px;
 
}
 
 
#changeset_content .container .wrapper {
 
	width: 600px;
 
}
 
 
#changeset_content .container {
 
	height: 120px;
 
}
 
 
#changeset_content .container .left {
 
	float: left;
 
	width: 70%;
 
	padding-left: 5px;
 
}
 
 
#changeset_content .container .right {
 
	float: right;
 
	width: 25%;
 
	text-align: right;
 
}
 
 
#changeset_content .container .left .date {
 
	font-weight: bold;
 
}
 
 
#changeset_content .container .left .author {
 
	
 
}
 
 
#changeset_content .container .left .message {
 
	font-style: italic;
 
	color: #556CB5;
 
}
 
 
.cs_files {
 
 
}
 
 
.cs_files .cs_added {
 
	background: url("/images/icons/page_white_add.png") no-repeat scroll 3px;
 
	/*background-color:#BBFFBB;*/
 
	height: 16px;
 
	padding-left: 20px;
 
	margin-top: 7px;
 
	text-align: left;
 
}
 
 
.cs_files .cs_changed {
 
	background: url("/images/icons/page_white_edit.png") no-repeat scroll
 
		3px;
 
	/*background-color: #FFDD88;*/
 
	height: 16px;
 
	padding-left: 20px;
 
	margin-top: 7px;
 
	text-align: left;
 
}
 
 
.cs_files .cs_removed {
 
	background: url("/images/icons/page_white_delete.png") no-repeat scroll
 
		3px;
 
	/*background-color: #FF8888;*/
 
	height: 16px;
 
	padding-left: 20px;
 
	margin-top: 7px;
 
	text-align: left;
 
}
 
 
/* -----------------------------------------------------------
 
	CHANGESETS - CANVAS
 
----------------------------------------------------------- */
 
 
#graph {
 
	overflow: hidden;
 
}
 
 
#graph_nodes {
 
	width: 160px;
 
	float: left;
 
	margin-left:-50px;
 
	margin-top: 5px;
 
}
 
 
#graph_content {
 
	width: 800px;
 
	float: left;
 
}
 
 
#graph_content .container_header {
 
	border: 1px solid #CCCCCC;
 
	padding:10px;
 
}
 
 
#graph_content .container .wrapper {
 
	width: 600px;
 
}
 
 
#graph_content .container {
 
	border-bottom: 1px solid #CCCCCC;
 
	border-left: 1px solid #CCCCCC;
 
	border-right: 1px solid #CCCCCC;
 
	min-height: 90px;
 
	min-height: 80px;
 
	overflow: hidden;
 
	font-size:1.2em;	
 
}
 
 
#graph_content .container .left {
 
	float: left;
 
	width: 70%;
 
	padding-left: 5px;
 
}
 
 
#graph_content .container .right {
 
	float: right;
 
	width: 25%;
 
	text-align: right;
 
}
 
 
#graph_content .container .left .date {
 
	font-weight: bold;
 
}
 
 
#graph_content .container .left .author {
 
	
 
}
 
 
#graph_content .container .left .message {
 
	font-size: 100%;
 
	padding-top: 3px;
 
}
 
 
.right div {
 
	clear: both;
 
}
 
 
.right .changes .added,.changed,.removed {
 
	border: 1px solid #DDDDDD;
 
	display: block;
 
	float: right;
 
	font-size: 0.75em;
 
	text-align: center;
 
	min-width: 15px;
 
}
 
 
.right .changes .added {
 
	background: #BBFFBB;
 
}
 
 
.right .changes .changed {
 
	background: #FFDD88;
 
}
 
 
.right .changes .removed {
 
	background: #FF8888;
 
}
 
 
.right .merge {
 
	vertical-align: top;
 
	font-size: 60%;
 
	font-weight: bold;
 
}
 
 
.right .merge img {
 
	vertical-align: bottom;
 
}
 
 
.right .parent {
 
	font-size: 90%;
 
	font-family: monospace;
 
}
 
 
.right .logtags .branchtag{
 
	background: #FFFFFF url("../images/icons/arrow_branch.png") no-repeat 130px 9px;
 
	background: #FFFFFF url("../images/icons/arrow_branch.png") no-repeat right 9px;
 
    display:block;
 
    padding:12px 2px 2px 24px;
 
    padding:12px 16px 0px 0px
 
}
 
.right .logtags .tagtag{
 
    background: #FFFFFF url("../images/icons/tag_blue.png") no-repeat 130px 9px;
 
    background: #FFFFFF url("../images/icons/tag_blue.png") no-repeat right 9px;
 
    display:block;
 
    padding:12px 2px 2px 24px;
 
    padding:12px 18px 0px 0px
 
}
 
 
/* -----------------------------------------------------------
 
	FILE BROWSER
 
----------------------------------------------------------- */
 
div.browserblock {
 
	overflow: hidden;
 
	padding: 0px;
 
	border: 1px solid #ccc;
 
	background: #f8f8f8;
 
	font-size: 100%;
 
	line-height: 100%;
 
	/* new */
 
	line-height: 125%;
 
}
 
 
div.browserblock .browser-header {
 
	border-bottom: 1px solid #CCCCCC;
 
	background: #FFFFFF;
 
	color: blue;
 
	padding: 10px 0 10px 0;
 
}
 
 
div.browserblock .browser-header span {
 
	margin-left: 25px;
 
	font-weight: bold;
 
}
 
 
div.browserblock .browser-body {
 
	background: #EEEEEE;
 
}
 
 
table.code-browser {
 
	border-collapse: collapse;
 
	width: 100%;
 
}
 
 
table.code-browser tr {
 
	margin: 3px;
 
}
 
 
table.code-browser thead th {
 
	background-color: #EEEEEE;
 
	height: 20px;
 
	font-size: 1.1em;
 
	font-weight: bold;
 
	text-align: center;
 
	text-align: left;
 
	padding-left: 10px;
 
}
 
 
table.code-browser tbody tr {
 
	
 
}
 
 
table.code-browser tbody td {
 
	padding-left: 10px;
 
	height: 20px;
 
}
 
table.code-browser .browser-file {
 
	background: url("/images/icons/document_16.png") no-repeat scroll 3px;
 
	height: 16px;
 
	padding-left: 20px;
 
	text-align: left;
 
}
 
 
table.code-browser .browser-dir {
 
	background: url("/images/icons/folder_16.png") no-repeat scroll 3px;
 
	height: 16px;
 
	padding-left: 20px;
 
	text-align: left;
 
}
 
 
/* -----------------------------------------------------------
 
	ADMIN - SETTINGS
 
----------------------------------------------------------- */
 
#path_unlock{
 
	color: red;
 
	font-size: 1.2em;
 
	padding-left: 4px;
 
}
 
 
/* -----------------------------------------------------------
 
    INFOBOX
 
----------------------------------------------------------- */
 
.info_box *{
 
	background:url("../../images/pager.png") repeat-x scroll 0 0 #EBEBEB;
 
	border-color:#DEDEDE #C4C4C4 #C4C4C4 #CFCFCF;
 
	border-style:solid;
 
	border-width:1px;
 
	color:#4A4A4A;
 
	display:block;
 
	font-weight:bold;
 
	height:1%;
 
	padding:4px 6px;
 
	display: inline;
 
}
 
.info_box span{
 
    margin-left:3px;
 
    margin-right:3px;
 
}
 
.info_box input#at_rev {
 
	padding:1px 3px 3px 2px;
 
	text-align:center;
 
}
 
.info_box input#view {
 
	padding:0px 3px 2px 2px;
 
	text-align:center;
 
}
 
/* -----------------------------------------------------------
 
    YUI TOOLTIP
 
----------------------------------------------------------- */
 
.yui-overlay,.yui-panel-container {
 
    visibility: hidden;
 
    position: absolute;
 
    z-index: 2;
 
}
 
 
.yui-tt {
 
    visibility: hidden;
 
    position: absolute;
 
    color: #666666;
 
    background-color: #FFFFFF;
 
    font-family: arial, helvetica, verdana, sans-serif;
 
    padding: 8px;
 
    border: 2px solid #556CB5;
 
    font: 100% sans-serif;
 
    width: auto;
 
    opacity: 1.0;
 
}
 
 
.yui-tt-shadow {
 
    display: none;
 
}
 
 
/* -----------------------------------------------------------
 
    YUI AUTOCOMPLETE 
 
----------------------------------------------------------- */
 
 
.ac{
 
    vertical-align: top;
 
 
}
 
.ac .match {
 
    font-weight:bold;
 
}
 
 
.ac .yui-ac {
 
    position: relative;
 
    font-family: arial;
 
    font-size: 100%;
 
}
 
 
.ac .perm_ac{
 
    width:15em;
 
}
 
/* styles for input field */
 
.ac .yui-ac-input {
 
    width: 100%;
 
}
 
 
/* styles for results container */
 
.ac .yui-ac-container {
 
    position: absolute;
 
    top: 1.6em;
 
    width: 100%;
 
}
 
 
/* styles for header/body/footer wrapper within container */
 
.ac .yui-ac-content {
 
    position: absolute;
 
    width: 100%;
 
    border: 1px solid #808080;
 
    background: #fff;
 
    overflow: hidden;
 
    z-index: 9050;
 
}
 
 
/* styles for container shadow */
 
.ac .yui-ac-shadow {
 
    position: absolute;
 
    margin: .3em;
 
    width: 100%;
 
    background: #000;
 
    -moz-opacity: 0.10;
 
    opacity: .10;
 
    filter: alpha(opacity = 10);
 
    z-index: 9049;
 
}
 
 
/* styles for results list */
 
.ac .yui-ac-content ul {
 
    margin: 0;
 
    padding: 0;
 
    width: 100%;
 
}
 
 
/* styles for result item */
 
.ac .yui-ac-content li {
 
    margin: 0;
 
    padding: 2px 5px;
 
    cursor: default;
 
    white-space: nowrap;
 
}
 
 
/* styles for prehighlighted result item */
 
.ac .yui-ac-content li.yui-ac-prehighlight {
 
    background: #B3D4FF;
 
}
 
 
/* styles for highlighted result item */
 
.ac .yui-ac-content li.yui-ac-highlight {
 
    background: #556CB5;
 
    color: #FFF;
 
}
 
 
 
/* -----------------------------------------------------------
 
    ACTION ICONS
 
----------------------------------------------------------- */
 
.add_icon {
 
    background: url("/images/icons/add.png") no-repeat scroll 3px ;
 
    height: 16px;
 
    padding-left: 20px;
 
    padding-top: 1px;
 
    text-align: left;
 
}
 
 
.edit_icon {
 
    background: url("/images/icons/folder_edit.png") no-repeat scroll 3px;
 
    height: 16px;
 
    padding-left: 20px;
 
    padding-top: 1px;
 
    text-align: left;
 
}
 
 
.delete_icon {
 
    background: url("/images/icons/delete.png") no-repeat scroll 3px;
 
    height: 16px;
 
    padding-left: 20px;
 
    padding-top: 1px;
 
    text-align: left;
 
}
 
 
.rss_icon {
 
    background: url("/images/icons/rss_16.png") no-repeat scroll 3px;
 
    height: 16px;
 
    padding-left: 20px;
 
    padding-top: 1px;
 
    text-align: left;
 
}
 
 
.atom_icon {
 
    background: url("/images/icons/atom.png") no-repeat scroll 3px;
 
    height: 16px;
 
    padding-left: 20px;
 
    padding-top: 1px;
 
    text-align: left;
 
}
 
 
.archive_icon {
 
    background: url("/images/icons/compress.png") no-repeat scroll 3px;
 
    height: 16px;
 
    padding-left: 20px;
 
    text-align: left;
 
    padding-top: 1px;
 
}
 
 
.action_button {
 
    border: 0px;
 
    display: block;
 
    color:#0066CC;
 
}
 
 
.action_button:hover {
 
    border: 0px;
 
    text-decoration:underline;
 
    cursor: pointer;
 
    color:#0066CC;
 
}
 
 
/* -----------------------------------------------------------
 
    REPO SWITCHER
 
----------------------------------------------------------- */
 
 
#switch_repos{
 
	position: absolute;
 
	height: 25px;
 
	z-index: 1;
 
}
 
#switch_repos select{
 
    min-width:150px;
 
    max-height: 250px;
 
    z-index: 1;
 
}
 
/* -----------------------------------------------------------
 
    BREADCRUMBS
 
----------------------------------------------------------- */
 
 
.breadcrumbs{
 
	border:medium none;
 
	color:#FFFFFF;
 
	float:left;
 
	margin:0;
 
	padding:11px 0 11px 10px;
 
	text-transform:uppercase;
 
    font-weight: bold;
 
    font-size: 14px;
 
}
 
.breadcrumbs a{
 
 color: #FFFFFF;
 
}
 
 
 
/* -----------------------------------------------------------
 
    FLASH MSG
 
----------------------------------------------------------- */
 
.flash_msg ul {
 
    margin: 0;
 
    padding: 0px 0px 10px 0px;
 
}
 
 
.error_msg {
 
    background-color: #FFCFCF;
 
    background-image: url("/images/icons/error_msg.png");
 
    border: 1px solid #FF9595;
 
    color: #CC3300;
 
}
 
 
.warning_msg {
 
    background-color: #FFFBCC;
 
    background-image: url("/images/icons/warning_msg.png");
 
    border: 1px solid #FFF35E;
 
    color: #C69E00;
 
}
 
 
.success_msg {
 
    background-color: #D5FFCF;
 
    background-image: url("/images/icons/success_msg.png");
 
    border: 1px solid #97FF88;
 
    color: #009900;
 
}
 
 
.notice_msg {
 
    background-color: #DCE3FF;
 
    background-image: url("/images/icons/notice_msg.png");
 
    border: 1px solid #93A8FF;
 
    color: #556CB5;
 
}
 
 
.success_msg,.error_msg,.notice_msg,.warning_msg {
 
    background-position: 10px center;
 
    background-repeat: no-repeat;
 
    font-size: 12px;
 
    font-weight: bold;
 
    min-height: 14px;
 
    line-height: 14px;
 
    margin-bottom: 0px;
 
    margin-top: 0px;
 
    padding: 6px 10px 6px 40px;
 
    display: block;
 
    overflow: auto;
 
}
 
 
#msg_close {
 
    background: transparent url("icons/cross_grey_small.png") no-repeat
 
        scroll 0 0;
 
    cursor: pointer;
 
    height: 16px;
 
    position: absolute;
 
    right: 5px;
 
    top: 5px;
 
    width: 16px;
 
}
 
/* -----------------------------------------------------------
 
	YUI FLOT
 
----------------------------------------------------------- */
 
 
div#commit_history{
 
	float: left;
 
}
 
div#legend_data{
 
	float:left;
 
	
 
}
 
div#legend_container {
 
	float: left;
 
}
 
 
div#legend_container table,div#legend_choices table{
 
	width:auto !important;
 
}
 
 
div#legend_container table td{
 
	border: none !important;
 
	padding: 0px !important;
 
	height: 20px  !important;
 
}
 
 
div#legend_choices table td{
 
	border: none !important;
 
	padding: 0px !important;
 
	height: 20px  !important;
 
}
 
 
div#legend_choices{
 
	float:left;
 
}
 
 
/* -----------------------------------------------------------
 
    PERMISSIONS TABLE
 
----------------------------------------------------------- */
 
table#permissions_manage{
 
    width: 0 !important;
 
 
}
 
table#permissions_manage span.private_repo_msg{
 
    font-size: 0.8em;
 
    opacity:0.6;
 
    
 
}
 
table#permissions_manage td.private_repo_msg{
 
    font-size: 0.8em;
 
    
 
}
 
table#permissions_manage tr#add_perm_input td{
 
    vertical-align:middle;
 
 
}
 
 
/* -----------------------------------------------------------
 
    GRAVATARS
 
----------------------------------------------------------- */
 
div.gravatar{
 
	background-color:white;
 
	border:1px solid #D0D0D0;
 
	float:left;
 
	margin-right:0.7em;
 
	padding: 2px 2px 0px;
 
}
 
 
/* -----------------------------------------------------------
 
    STYLING OF LAYOUT
 
----------------------------------------------------------- */
 
 
 
/* -----------------------------------------------------------
 
    GLOBAL WIDTH
 
----------------------------------------------------------- */
 
#header,#content,#footer{
 
    min-width: 1224px;
 
}
 
 
/* -----------------------------------------------------------
 
    content
 
----------------------------------------------------------- */ 
 
 
#content 
 
{
 
    margin: 10px 30px 0 30px;
 
    padding: 0;
 
    min-height: 100%;
 
    clear: both;
 
    overflow: hidden;
 
    background: transparent;
 
}
 
 
/* -----------------------------------------------------------
 
    content -> right -> forms -> labels
 
----------------------------------------------------------- */
 
 
#content div.box div.form div.fields div.field div.label
 
{
 
    left: 80px;
 
    margin: 0;
 
    padding: 8px 0 0 5px;
 
    width: auto;
 
    position: absolute;
 
}
 
 
#content div.box-left div.form div.fields div.field div.label,
 
#content div.box-right div.form div.fields div.field div.label
 
{
 
    left: 0;
 
    margin: 0;
 
    padding: 0 0 8px 0;
 
    width: auto;
 
    position: relative;
 
}
 
\ No newline at end of file
pylons_app/templates/changelog/changelog.html
Show inline comments
 
## -*- coding: utf-8 -*-
 

	
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('Changelog - %s') % c.repo_name}
 
</%def>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${h.link_to(u'Home',h.url('/'))}
 
    &raquo;
 
    ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
 
    &raquo;
 
    ${_('Changelog')} - ${_('showing ')} ${c.size if c.size <= c.total_cs else c.total_cs} ${_('out of')} ${c.total_cs} ${_('revisions')}  
 
</%def>
 

	
 
<%def name="page_nav()">
 
	${self.menu('changelog')}     
 
</%def>
 

	
 
<%def name="main()">
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <div class="table">
 
		% if c.pagination:
 
			<div id="graph">
 
				<div id="graph_nodes">
 
					<canvas id="graph_canvas"></canvas>
 
				</div>
 
				<div id="graph_content">
 
					<div class="container_header">
 
						
 
        ${h.form(h.url.current(),method='get')}
 
        <div class="info_box">
 
          <span>${_('Show')}:</span>
 
          ${h.text('size',size=1,value=c.size)}
 
          <span>${_('revisions')}</span>
 
          ${h.submit('set',_('set'))}
 
        </div>
 
        ${h.end_form()}
 
						
 
					</div>
 
				%for cnt,cs in enumerate(c.pagination):
 
					<div id="chg_${cnt+1}" class="container">
 
						<div class="left">
 
							<div class="date">${_('commit')} ${cs.revision}: ${cs.short_id}@${cs.date}</div>
 
							<div class="author">
 
								<div class="gravatar">
 
									<img alt="gravatar" src="${h.gravatar_url(h.email(cs.author),20)}"/>
 
								</div>
 
								<span>${h.person(cs.author)}</span><br/>
 
								<span><a href="mailto:${h.email_or_none(cs.author)}">${h.email_or_none(cs.author)}</a></span><br/>
 
							</div>
 
							<div class="message">
 
								${h.link_to(h.wrap_paragraphs(cs.message),
 
								h.url('changeset_home',repo_name=c.repo_name,revision=cs.short_id))}
 
							</div>
 
						</div>	
 
						<div class="right">
 
									<div class="changes">
 
										<span class="removed" title="${_('removed')}">${len(cs.removed)}</span>
 
										<span class="changed" title="${_('changed')}">${len(cs.changed)}</span>
 
										<span class="added" title="${_('added')}">${len(cs.added)}</span>
 
									</div>					
 
										%if len(cs.parents)>1:
 
										<div class="merge">
 
											${_('merge')}<img alt="merge" src="/images/icons/arrow_join.png"/>
 
										</div>
 
										%endif						
 
									%for p_cs in reversed(cs.parents):
 
										<div class="parent">${_('Parent')} ${p_cs.revision}: ${h.link_to(p_cs.short_id,
 
											h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.short_id),title=p_cs.message)}
 
										</div>
 
									%endfor
 
								<span class="logtags">
 
									<span class="branchtag">${cs.branch}</span>
 
									<span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}">
 
									${h.link_to(cs.branch,h.url('files_home',repo_name=c.repo_name,revision=cs.short_id))}</span>
 
									%for tag in cs.tags:
 
										<span class="tagtag">${tag}</span>
 
										<span class="tagtag"  title="${'%s %s' % (_('tag'),tag)}">
 
										${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=cs.short_id))}</span>
 
									%endfor
 
								</span>																	
 
						</div>				
 
					</div>
 
					
 
				%endfor
 
				<div class="pagination-wh pagination-left">
 
					${c.pagination.pager('$link_previous ~2~ $link_next')}
 
				</div>			
 
				</div>
 
			</div>
 
			
 
			<script type="text/javascript" src="/js/graph.js"></script>
 
			<script type="text/javascript">
 
				YAHOO.util.Event.onDOMReady(function(){
 
					function set_canvas() {
 
						var c = document.getElementById('graph_nodes');
 
						var t = document.getElementById('graph_content');
 
						canvas = document.getElementById('graph_canvas');
 
						var div_h = t.clientHeight;
 
						c.style.height=div_h+'px';
 
						canvas.setAttribute('height',div_h);
 
						canvas.setAttribute('width',160);
 
					};
 
					set_canvas();
 
					var jsdata = ${c.jsdata|n};
 
					var r = new BranchRenderer();
 
					r.render(jsdata); 
 
				});
 
			</script>
 
		%else:
 
			${_('There are no changes yet')}
 
		%endif  
 
    </div>
 
</div>    
 
</%def>
 
\ No newline at end of file
0 comments (0 inline, 0 general)