Changeset - b4d9680cd164
[Not reviewed]
celery
0 3 0
Marcin Kuzminski - 15 years ago 2010-09-22 04:31:21
marcin@python-works.com
some code fixes templates+helpers new rfc date without tz, added timerproxy formatting
3 files changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
pylons_app/lib/helpers.py
Show inline comments
 
@@ -316,24 +316,25 @@ from mercurial.templatefilters import ag
 

	
 
age = lambda  x:_age(x)
 
capitalize = lambda x: x.capitalize()
 
date = lambda x: util.datestr(x)
 
email = util.email
 
email_or_none = lambda x: util.email(x) if util.email(x) != x else None
 
person = lambda x: _person(x)
 
hgdate = lambda  x: "%d %d" % x
 
isodate = lambda  x: util.datestr(x, '%Y-%m-%d %H:%M %1%2')
 
isodatesec = lambda  x: util.datestr(x, '%Y-%m-%d %H:%M:%S %1%2')
 
localdate = lambda  x: (x[0], util.makedate()[1])
 
rfc822date = lambda  x: util.datestr(x, "%a, %d %b %Y %H:%M:%S %1%2")
 
rfc822date_notz = lambda  x: util.datestr(x, "%a, %d %b %Y %H:%M:%S")
 
rfc3339date = lambda  x: util.datestr(x, "%Y-%m-%dT%H:%M:%S%1:%2")
 
time_ago = lambda x: util.datestr(_age(x), "%a, %d %b %Y %H:%M:%S %1%2")
 

	
 

	
 
#===============================================================================
 
# PERMS
 
#===============================================================================
 
from pylons_app.lib.auth import HasPermissionAny, HasPermissionAll, \
 
HasRepoPermissionAny, HasRepoPermissionAll
 

	
 
#===============================================================================
 
# GRAVATAR URL
pylons_app/lib/timerproxy.py
Show inline comments
 
@@ -12,24 +12,25 @@ def color_sql(sql):
 
def one_space_trim(s):
 
    if s.find("  ") == -1:
 
        return s
 
    else:
 
        s = s.replace('  ', ' ')
 
        return one_space_trim(s)
 
    
 
def format_sql(sql):
 
    sql = color_sql(sql)
 
    sql = sql.replace('\n', '')
 
    sql = one_space_trim(sql)
 
    sql = sql\
 
        .replace(',', ',\n\t')\
 
        .replace('SELECT', '\n\tSELECT \n\t')\
 
        .replace('UPDATE', '\n\tUPDATE \n\t')\
 
        .replace('DELETE', '\n\tDELETE \n\t')\
 
        .replace('FROM', '\n\tFROM')\
 
        .replace('ORDER BY', '\n\tORDER BY')\
 
        .replace('LIMIT', '\n\tLIMIT')\
 
        .replace('WHERE', '\n\tWHERE')\
 
        .replace('AND', '\n\tAND')\
 
        .replace('LEFT', '\n\tLEFT')\
 
        .replace('INNER', '\n\tINNER')\
 
        .replace('INSERT', '\n\tINSERT')\
 
        .replace('DELETE', '\n\tDELETE')
pylons_app/templates/shortlog/shortlog_data.html
Show inline comments
 
@@ -4,25 +4,25 @@
 
	<tr>
 
		<th class="left">${_('date')}</th>
 
		<th class="left">${_('author')}</th>
 
		<th class="left">${_('revision')}</th>
 
		<th class="left">${_('commit message')}</th>
 
		<th class="left">${_('branch')}</th>
 
		<th class="left">${_('tags')}</th>
 
		<th class="left">${_('links')}</th>
 
		
 
	</tr>
 
%for cnt,cs in enumerate(c.repo_changesets):
 
	<tr class="parity${cnt%2}">
 
		<td>${h.age(cs._ctx.date())}</td>
 
		<td>${h.age(cs._ctx.date())} - ${h.rfc822date_notz(cs._ctx.date())} </td>
 
		<td title="${cs.author}">${h.person(cs.author)}</td>
 
		<td>r${cs.revision}:${cs.raw_id}</td>
 
		<td>
 
			${h.link_to(h.truncate(cs.message,60),
 
			h.url('changeset_home',repo_name=c.repo_name,revision=cs._short),
 
			title=cs.message)}
 
		</td>
 
		<td>
 
			<span class="logtags">
 
				<span class="branchtag">${cs.branch}</span>
 
			</span>
 
		</td>
0 comments (0 inline, 0 general)