Changeset - cbfb853a0a4c
[Not reviewed]
default
0 3 0
Marcin Kuzminski - 15 years ago 2010-08-23 21:39:17
marcin@python-works.com
fixed bug when author had " in name, thus breaking the javascript data format
small fix to css for commit messages, and fixed a bug when message had some special chars that caused unicodeDecode error
3 files changed with 7 insertions and 4 deletions:
0 comments (0 inline, 0 general)
pylons_app/controllers/summary.py
Show inline comments
 
@@ -75,24 +75,25 @@ class SummaryController(BaseController):
 
        #graph range
 
        td = datetime.today() + timedelta(days=1) 
 
        y = td.year
 
        m = td.month
 
        d = td.day
 
        c.ts_min = mktime((y, (td - timedelta(days=calendar.mdays[m] - 1)).month,
 
                            d, 0, 0, 0, 0, 0, 0,))
 
        c.ts_max = mktime((y, m, d, 0, 0, 0, 0, 0, 0,))
 

	
 
        
 
        def author_key_cleaner(k):
 
            k = person(k)
 
            k = k.replace('"', "'") #for js data compatibilty
 
            return k
 
                
 
        for cs in repo:
 
            k = '%s-%s-%s' % (cs.date.timetuple()[0], cs.date.timetuple()[1],
 
                              cs.date.timetuple()[2])
 
            timetupple = [int(x) for x in k.split('-')]
 
            timetupple.extend([0 for _ in xrange(6)])
 
            k = mktime(timetupple)
 
            if aggregate.has_key(author_key_cleaner(cs.author)):
 
                if aggregate[author_key_cleaner(cs.author)].has_key(k):
 
                    aggregate[author_key_cleaner(cs.author)][k]["commits"] += 1
 
                    aggregate[author_key_cleaner(cs.author)][k]["added"] += len(cs.added)
pylons_app/public/css/style.css
Show inline comments
 
@@ -1030,26 +1030,26 @@ div.options a:hover
 
----------------------------------------------------------- */ 
 
 
#content div.box div.messages
 
{
 
	margin: 0 20px 0 20px;
 
    padding: 0;
 
	clear: both;
 
	overflow: hidden;
 
}
 
 
#content div.box div.message
 
{
 
	margin: 0 0 10px 0;
 
    padding: 0;
 
	margin: 0 0 0px 0;
 
    padding: 0 0 10px 0;
 
	clear: both;
 
	overflow: hidden;
 
}
 
 
#content div.box div.message div.image
 
{
 
	margin: 9px 0 0 5px;
 
	padding: 6px;
 
	float: left;
 
}
 
 
#content div.box div.message div.image img
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')}  
 
@@ -50,42 +52,42 @@
 
									%for tag in cs.tags:
 
										<span class="tagtag">${tag}</span>
 
									%endfor
 
								</span>					
 
							<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.link_to(h.wrap_paragraphs(cs.message.decode('utf-8','replace')),
 
								h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_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.raw_id,
 
											h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}
 
											h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message.decode('utf-8','replace'))}
 
										</div>
 
									%endfor								
 
						</div>				
 
					</div>
 
					
 
				%endfor
 
				<div class="pagination-wh pagination-left">
 
					${c.pagination.pager('$link_previous ~2~ $link_next')}
 
				</div>			
 
				</div>
 
			</div>
 
			
0 comments (0 inline, 0 general)