Changeset - 0f7f93df5802
[Not reviewed]
default
0 4 0
Marcin Kuzminski - 16 years ago 2010-05-19 00:18:48
marcin@python-works.com
implemented rawdiff and diff download into diff view.
Few css changes
4 files changed with 108 insertions and 56 deletions:
0 comments (0 inline, 0 general)
pylons_app/controllers/files.py
Show inline comments
 
import logging
 

	
 
from pylons import request, response, session, tmpl_context as c, url, config, app_globals as g
 
from pylons.controllers.util import abort, redirect
 

	
 
from pylons_app.lib.base import BaseController, render
 
from pylons_app.lib.utils import get_repo_slug
 
from pylons_app.model.hg_model import HgModel
 
from vcs.utils import diffs as differ
 
from vcs.exceptions import RepositoryError, ChangesetError
 
        
 
log = logging.getLogger(__name__)
 

	
 
class FilesController(BaseController):
 
    def __before__(self):
 
        c.repos_prefix = config['repos_name']
 
        c.repo_name = get_repo_slug(request)
 

	
 
    def index(self, repo_name, revision, f_path):
 
        hg_model = HgModel()
 
        c.repo = repo = hg_model.get_repo(c.repo_name)
 
        revision = request.POST.get('at_rev', None) or revision
 
        
 
        def get_next_rev(cur):
 
            max_rev = len(c.repo.revisions) - 1
 
            r = cur + 1
 
            if r > max_rev:
 
                r = max_rev
 
            return r
 
            
 
        def get_prev_rev(cur):
 
            r = cur - 1
 
            return r
 

	
 
        c.f_path = f_path
 
     
 
        
 
        try:
 
            cur_rev = repo.get_changeset(revision).revision
 
            prev_rev = repo.get_changeset(get_prev_rev(cur_rev)).raw_id
 
            next_rev = repo.get_changeset(get_next_rev(cur_rev)).raw_id
 
                    
 
            c.url_prev = url('files_home', repo_name=c.repo_name,
 
                             revision=prev_rev, f_path=f_path) 
 
            c.url_next = url('files_home', repo_name=c.repo_name,
 
                             revision=next_rev, f_path=f_path)   
 
                    
 
            c.changeset = repo.get_changeset(revision)
 
            try:
 
                c.file_msg = c.changeset.get_file_message(f_path)
 
            except:
 
                c.file_msg = None
 
                        
 
            c.cur_rev = c.changeset.raw_id
 
            c.rev_nr = c.changeset.revision
 
            c.files_list = c.changeset.get_node(f_path)
 
            c.file_history = self._get_history(repo, c.files_list, f_path)
 
            
 
        except (RepositoryError, ChangesetError):
 
            c.files_list = None
 
        
 
        return render('files/files.html')
 

	
 
    def rawfile(self, repo_name, revision, f_path):
 
        hg_model = HgModel()
 
        c.repo = hg_model.get_repo(c.repo_name)
 
        file_node = c.repo.get_changeset(revision).get_node(f_path)
 
        response.headers['Content-type'] = file_node.mimetype
 
        response.headers['Content-disposition'] = 'attachment; filename=%s' \
 
        response.content_type = file_node.mimetype
 
        response.content_disposition = 'attachment; filename=%s' \
 
                                                    % f_path.split('/')[-1] 
 
        return file_node.content
 
    
 
    def archivefile(self, repo_name, revision, fileformat):
 
        return '%s %s %s' % (repo_name, revision, fileformat)
 
    
 
    def diff(self, repo_name, f_path):
 
        hg_model = HgModel()
 
        diff1 = request.GET.get('diff1')
 
        diff2 = request.GET.get('diff2')
 
        c.action = action = request.GET.get('diff')
 
        c.no_changes = diff1 == diff2
 
        c.f_path = f_path
 
        c.repo = hg_model.get_repo(c.repo_name)
 
        c.changeset_1 = c.repo.get_changeset(diff1)
 
        c.changeset_2 = c.repo.get_changeset(diff2)
 

	
 
        c.diff1 = 'r%s:%s' % (c.changeset_1.revision, c.changeset_1._short)
 
        c.diff2 = 'r%s:%s' % (c.changeset_2.revision, c.changeset_2._short)
 
        
 
        
 
        f_udiff = differ.get_udiff(c.changeset_1.get_node(f_path),
 
                            c.changeset_2.get_node(f_path))
 
        c.differ = differ.DiffProcessor(f_udiff)
 
        
 
        diff = differ.DiffProcessor(f_udiff)
 
                                
 
        if action == 'download':
 
            diff_name = '%s_vs_%s.diff' % (diff1, diff2)
 
            response.content_type = 'text/plain'
 
            response.content_disposition = 'attachment; filename=%s' \
 
                                                    % diff_name             
 
            return diff.raw_diff()
 
        
 
        elif action == 'raw':
 
            c.cur_diff = '<pre class="raw">%s</pre>' % diff.raw_diff()
 
        elif action == 'diff':
 
            c.cur_diff = diff.as_html()
 

	
 
        return render('files/file_diff.html')
 
    
 
    def _get_history(self, repo, node, f_path):
 
        from vcs.nodes import NodeKind
 
        if not node.kind is NodeKind.FILE:
 
            return []
 
        changesets = node.history
 
        hist_l = []
 
        for chs in changesets:
 
            n_desc = 'r%s:%s' % (chs.revision, chs._short)
 
            hist_l.append((chs._short, n_desc,))
 
        return hist_l
pylons_app/public/css/diff.css
Show inline comments
 
div.diffblock {
 
    overflow: auto;
 
    padding: 0px;
 
    border: 1px solid #ccc;
 
    background: #f8f8f8;
 
    font-size: 100%;
 
    line-height: 100%;
 
    /* new */
 
    line-height: 125%;
 
}
 
div.diffblock .code-header{
 
	border-bottom: 1px solid #CCCCCC;
 
	background: #EEEEEE;
 
	color:blue;
 
	padding:10px 0 10px 0;
 
}
 
div.diffblock .code-header span{
 
div.diffblock .code-header div{
 
	margin-left:25px;
 
	font-weight: bold;
 
}
 
div.diffblock .code-body{
 
	background: #EEEEEE;
 
}
 
div.diffblock pre.raw{
 
	background: #FFFFFF;
 
	color:#000000;
 
}
 

	
 
.code-difftable{
 
	border-collapse: collapse;
 
	width: 99%;
 
}
 
.code-difftable td:target *{
 
	background:  repeat scroll 0 0 #FFFFBE !important;
 
	text-decoration: underline;
 
}
 
.code-difftable .context{
 
	background:none repeat scroll 0 0 #DDE7EF;
 
}
 
.code-difftable .add{
 
	background:none repeat scroll 0 0 #DDFFDD;
 
}
 
.code-difftable .add ins{
 
	background:none repeat scroll 0 0 #AAFFAA;
 
	text-decoration:none;
 
}
 

	
 
.code-difftable .del{
 
	background:none repeat scroll 0 0 #FFDDDD;
 
}
 
.code-difftable .del del{
 
	background:none repeat scroll 0 0 #FFAAAA;
 
	text-decoration:none;
 
}
 

	
 
.code-difftable .lineno{
 
	background:none repeat scroll 0 0 #EEEEEE !important;
 
	border-right:1px solid #DDDDDD;
 
	padding-left:2px;
 
	padding-right:2px;
 
	text-align:right;
 
	width:20px;
 
	-moz-user-select:none;
 
	-webkit-user-select: none;
 
}
 
.code-difftable .lineno pre{
 
	color:#747474 !important;
 
	font:11px "Bitstream Vera Sans Mono",Monaco,"Courier New",Courier,monospace !important;
 
	letter-spacing:-1px;
 
	text-align:right;
 
	width:20px;
 
}
 
.code-difftable .lineno a{
 
	color:#0000CC !important;
 
}
 
.code-difftable .code td{
 
	margin:0;
 
	padding: 0;
 
}
 
.code-difftable .code pre{
 
	margin:0;
 
	padding:0;
 
}
 

	
 

	
 
.code { 
 
	display: block;
 
	width: 100%;
 
}
 
.code-diff {
 
    padding: 0px;
 
    margin-top: 5px;
 
    margin-bottom: 5px;
 
    border-left: 2px solid #ccc;
 
}
 
.code-diff pre, .line pre { 
 
	padding: 3px;
 
    margin: 0;
 
}
 
.lineno a { 
 
	text-decoration: none; 
 
}
 

	
 
.line{
 
	padding:0;
 
	margin:0;
 
}
 
\ No newline at end of file
pylons_app/public/css/monoblue_custom.css
Show inline comments
 
/*** Initial Settings ***/
 
#mainhtml{
 
	margin: 15px 50px;
 
	background: #DBD4C6;
 
	font-family: sans-serif;
 
}
 

	
 
a {
 
	color: #0000cc;
 
	text-decoration: none;
 
}
 
a:HOVER{
 
	text-decoration: underline;
 
}
 
/*** end of Initial Settings ***/ /** common settings **/
 
/*** end of Initial Settings ***/ 
 

	
 
/** common settings **/
 
div#main {
 
	padding: 5px;
 
}
 

	
 
div#container {
 
	background: #FFFFFF;
 
	position: relative;
 
	color: #666;
 
}
 

	
 
div.page-header {
 
	padding: 50px 20px 0;
 
	background: #556cb5 top left repeat-x;
 
	position: relative;
 
}
 

	
 
div.page-header h1 {
 
	margin: 10px 0 30px;
 
	font-size: 1.8em;
 
	font-weight: bold;
 
	font-family: sans-serif;
 
	letter-spacing: 1px;
 
	color: #DDD;
 
}
 

	
 
div.page-header h1 a {
 
	font-weight: bold;
 
	color: #FFF;
 
}
 

	
 
div.page-header a {
 
	text-decoration: none;
 
}
 

	
 
div.page-header form {
 
	position: absolute;
 
	margin-bottom: 2px;
 
	bottom: 0;
 
	right: 20px;
 
}
 

	
 
div.page-header form label {
 
	color: #DDD;
 
}
 

	
 
div.page-header form input {
 
	padding: 2px;
 
	border: solid 1px #DDD;
 
}
 

	
 
div.page-header form dl {
 
	overflow: hidden;
 
}
 

	
 
div.page-header form dl dt {
 
	font-size: 1.2em;
 
}
 

	
 
div.page-header form dl dt,div.page-header form dl dd {
 
	margin: 0 0 0 5px;
 
	float: left;
 
	height: 24px;
 
	line-height: 20px;
 
}
 

	
 
ul.page-nav {
 
	margin: 10px 0 0 0;
 
	list-style-type: none;
 
	overflow: hidden;
 
	width: 800px;
 
	padding: 0;
 
}
 

	
 
ul.page-nav li {
 
	margin: 0 2px 0 0;
 
	float: left;
 
	height: 24px;
 
	font-size: 1.1em;
 
	line-height: 24px;
 
	text-align: center;
 
	background: #DDD;
 
}
 

	
 
ul.page-nav li.current {
 
	background: #FFF;
 
	padding-right: 5px;
 
	padding-left: 5px;
 
}
 

	
 
ul.page-nav li a {
 
	height: 24px;
 
	color: #666;
 
	padding-right: 5px;
 
	padding-left: 5px;
 
	display: block;
 
	text-decoration: none;
 
}
 

	
 
ul.page-nav li a:hover {
 
	color: #333;
 
	background: #FFF;
 
}
 

	
 
ul.submenu {
 
	margin: 10px 0 -10px 20px;
 
	list-style-type: none;
 
}
 

	
 
ul.submenu li {
 
	margin: 0 10px 0 0;
 
	font-size: 1.2em;
 
	display: inline;
 
}
 

	
 
h2 {
 
	margin: 20px 0 10px;
 
	height: 30px;
 
	line-height: 30px;
 
	text-indent: 20px;
 
	background: #FFF;
 
	font-size: 1.2em;
 
	border-top: dotted 1px #D5E1E6;
 
	font-weight: bold;
 
}
 

	
 
h2.no-link {
 
	color: #006699;
 
}
 

	
 
h2.no-border {
 
	color: #FFF;
 
	background: #556CB5;
 
	border: 0;
 
}
 

	
 
h2 a {
 
	font-weight: bold;
 
	color: #006699;
 
}
 

	
 
div.page-path {
 
	text-align: right;
 
	padding: 20px 30px 10px 0;
 
	border: solid #d9d8d1;
 
	border-width: 0px 0px 1px;
 
	font-size: 1.2em;
 
}
 

	
 
div.page-footer {
 
	margin: 50px 0 0;
 
	position: relative;
 
}
 

	
 
div.page-footer p {
 
	position: relative;
 
	left: 20px;
 
	bottom: 5px;
 
	font-size: 1.2em;
 
}
 

	
 
ul.rss-logo {
 
	position: absolute;
 
	top: -10px;
 
	right: 20px;
 
	height: 20px;
 
	list-style-type: none;
 
}
 

	
 
ul.rss-logo li {
 
	display: inline;
 
}
 

	
 
ul.rss-logo li a {
 
	padding: 3px 6px;
 
	line-height: 10px;
 
	border: 1px solid;
 
	border-color: #fcc7a5 #7d3302 #3e1a01 #ff954e;
 
	color: #ffffff;
 
	background-color: #ff6600;
 
	font-weight: bold;
 
	font-family: sans-serif;
 
	font-size: 10px;
 
	text-align: center;
 
	text-decoration: none;
 
}
 

	
 
div.rss-logo li a:hover {
 
	background-color: #ee5500;
 
}
 

	
 
p.normal {
 
	margin: 20px 0 20px 30px;
 
	font-size: 1.2em;
 
}
 

	
 
table tr.parity0:hover,table tr.parity1:hover {
 
	background: #D5E1E6;
 
}
 

	
 
table tr.parity0 {
 
	background: #EAEAE9;
 
}
 

	
 
table tr.parity1 {
 
	background: #FFFFFF;
 
}
 

	
 
span.logtags span {
 
	background-repeat: no-repeat;
 
	height: 16px;
 
	padding-left: 20px;
 
	padding-top: 0px;
 
	text-align: left;
 
	font-weight: bold;
 
}
 

	
 
span.logtags span.tagtag {
 
	background-image: url("/images/label_16.png");
 
}
 

	
 
span.logtags span.branchtag {
 
	background-image: url("/images/left_16.png");
 
	color: #628F53;
 
}
 

	
 
span.logtags span.inbranchtag {
 
	background-image: url("/images/left_16.png");
 
}
 

	
 
div.diff pre {
 
	margin: 10px 0 0 0;
 
}
 

	
 
div.diff pre span {
 
	font-family: monospace;
 
	white-space: pre;
 
	font-size: 1.2em;
 
	padding: 3px 0;
 
}
 

	
 
td.source {
 
	white-space: pre;
 
	font-family: monospace;
 
	margin: 10px 30px 0;
 
	font-size: 1.2em;
 
	font-family: monospace;
 
}
 

	
 
div.source div.parity0,div.source div.parity1 {
 
	padding: 1px;
 
	font-size: 1.2em;
 
}
 

	
 
div.source div.parity0 {
 
	background: #F1F6F7;
 
}
 

	
 
div.source div.parity1 {
 
	background: #FFFFFF;
 
}
 

	
 
div.parity0:hover,div.parity1:hover {
 
	background: #D5E1E6;
 
}
 

	
 
.linenr {
 
	color: #999;
 
	text-align: right;
 
}
 

	
 
.lineno {
 
	text-align: right;
 
}
 

	
 
.lineno a {
 
	color: #999;
 
}
 

	
 
td.linenr {
 
	width: 60px;
 
}
 

	
 
div#powered-by {
 
	position: absolute;
 
	width: 75px;
 
	top: 15px;
 
	right: 20px;
 
	font-size: 1.2em;
 
}
 

	
 
div#powered-by a {
 
	color: #EEE;
 
	text-decoration: none;
 
}
 

	
 
div#powered-by a:hover {
 
	text-decoration: underline;
 
}
 

	
 
dl.overview {
 
	margin: 0 0 0 30px;
 
	font-size: 1.1em;
 
	overflow: hidden;
 
}
 

	
 
dl.overview dt,dl.overview dd {
 
	margin: 5px 0;
 
	float: left;
 
}
 

	
 
dl.overview dt {
 
	clear: left;
 
	font-weight: bold;
 
	width: 150px;
 
}
 

	
 
/** end of summary **/ 
 

	
 
/** chagelog **/
 
h3.changelog {
 
	margin: 20px 0 5px 30px;
 
	padding: 0 0 2px;
 
	font-size: 1.4em;
 
	border-bottom: dotted 1px #D5E1E6;
 
}
 

	
 
ul.changelog-entry {
 
	margin: 0 0 10px 30px;
 
	list-style-type: none;
 
	position: relative;
 
}
 

	
 
ul.changelog-entry li span.revdate {
 
	font-size: 1.1em;
 
}
 

	
 
ul.changelog-entry li.age {
 
	position: absolute;
 
	top: -25px;
 
	right: 10px;
 
	font-size: 1.4em;
 
	color: #CCC;
 
	font-weight: bold;
 
	font-style: italic;
 
}
 

	
 
ul.changelog-entry li span.name {
 
	font-size: 1.2em;
 
	font-weight: bold;
 
}
 

	
 
ul.changelog-entry li.description {
 
	margin: 10px 0 0;
 
	font-size: 1.1em;
 
}
 

	
 
/** end of changelog **/ 
 

	
 
/** file **/
 
p.files {
 
	margin: 0 0 0 20px;
 
	font-size: 2.0em;
 
	font-weight: bold;
 
}
 

	
 
/** end of file **/ 
 

	
 
/** changeset **/
 
h3.changeset {
 
	margin: 20px 0 5px 20px;
 
	padding: 0 0 2px;
 
	font-size: 1.6em;
 
	border-bottom: dotted 1px #D5E1E6;
 
}
 

	
 
p.changeset-age {
 
	position: relative;
 
.cs_files{
 
	border: 2px solid #CCCCCC;
 
	width: 60%;
 
	
 
}
 

	
 
p.changeset-age span {
 
	position: absolute;
 
	top: -25px;
 
	right: 10px;
 
	font-size: 1.4em;
 
	color: #CCC;
 
	font-weight: bold;
 
	font-style: italic;
 
.cs_files .cs_added{
 
	background:#BBFFBB;
 
}
 

	
 
p.description {
 
	margin: 10px 30px 0 30px;
 
	padding: 10px;
 
	border: solid 1px #CCC;
 
	font-size: 1.2em;
 
.cs_files .cs_changed{
 
	background: #FFDD88;
 
}
 
.cs_files .cs_removed{
 
	background: #FF8888;
 
}
 

	
 
/** end of changeset **/ 
 

	
 
/** canvas **/
 
div#wrapper {
 
	position: relative;
 
	font-size: 1.2em;
 
}
 

	
 
canvas {
 
	position: absolute;
 
	z-index: 5;
 
	top: -0.7em;
 
}
 
#graph{
 
	overflow: hidden;
 

	
 
ul#nodebgs li.parity0 {
 
	background: #F1F6F7;
 
}
 
#graph_nodes{
 
	width:160px;
 
	float:left;
 
}
 

	
 
ul#nodebgs li.parity1 {
 
	background: #FFFFFF;
 
#graph_content{
 
	width:800px;
 
	float:left;
 
}
 
#graph_content .container_header{
 
	border:1px solid #CCCCCC;
 
	height:30px;
 
	background: #EEEEEE;
 
}
 

	
 

	
 
#graph_content .container .wrapper{
 
	width: 600px;
 
}
 
#graph_content .container{
 
	border-bottom: 1px solid #CCCCCC;
 
	border-left: 1px solid #CCCCCC;
 
	border-right: 1px solid #CCCCCC;
 
	height:120px;
 
}
 

	
 
ul#graphnodes {
 
	position: absolute;
 
	z-index: 10;
 
	top: 7px;
 
	list-style: none inside none;
 
#graph_content .container .left{
 
	float:left;
 
	width: 70%;
 
	padding-left: 5px;
 
}
 

	
 
ul#nodebgs {
 
	list-style: none inside none;
 
#graph_content .container .right{
 
	float:right;
 
	width: 25%;
 
}
 
#graph_content .container .left .date{
 
	font-weight:bold;
 
}
 
#graph_content .container .left .author{
 
	
 
}
 
#graph_content .container .left .message{
 
	font-size: 80%;
 
}
 

	
 
ul#graphnodes li,ul#nodebgs li {
 
	height: 39px;
 
.right .added,.changed,.removed{
 
	border:1px solid #DDDDDD;
 
	display:block;
 
	float:right;
 
	font-size:0.75em;
 
	text-align:center;
 
	min-width:15px;
 
}
 

	
 
ul#graphnodes li .info {
 
	display: block;
 
	position: relative;
 
.right .added{
 
	background:#BBFFBB; 
 
}
 

	
 
.right .changed{
 
	background: #FFDD88;
 
}
 
.right .removed{
 
	background: #FF8888;
 
}
 
/** end of canvas **/
 

	
 
/* 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: #EEEEEE;
 
	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;	
 
	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;
 
}
 

	
 
.info-table {
 
	background: none repeat scroll 0 0 #FAFAFA;
 
	border-bottom: 1px solid #DDDDDD;
 
	width: 100%;
 
}
 

	
 
.rss_logo {
 
	background-image: url("/images/feed.png");
 
	background-repeat: no-repeat;
 
	display: block;
 
	height: 16px;
 
	padding-left: 20px;
 
	padding-top: 0px;
 
	text-align: left;
 
}
 

	
 
.atom_logo {
 
	background-image: url("/images/atom.png");
 
	background-repeat: no-repeat;
 
	display: block;
 
	height: 16px;
 
	padding-left: 20px;
 
	padding-top: 0px;
 
	text-align: left;
 
}
 

	
 
.browser-file {
 
	background-image: url("/images/document_16.png");
 
	background-repeat: no-repeat;
 
	display: block;
 
	height: 16px;
 
	padding-left: 20px;
 
	padding-top: 0px;
 
	text-align: left;
 
}
 

	
 
.browser-dir {
 
	background-image: url("/images/folder_16.png");
 
	background-repeat: no-repeat;
 
	display: block;
 
	height: 16px;
 
	padding-left: 20px;
 
	padding-top: 0px;
 
	text-align: left;
 
}
 

	
 
.current_submenu {
 
	border-bottom: 2px solid;
 
}
 

	
 
#repos_list {
 
	border: 1px solid #556CB5;
 
	background: #FFFFFF;
 
}
 
\ No newline at end of file
pylons_app/templates/files/file_diff.html
Show inline comments
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('Repository managment')}
 
</%def>
 
<%def name="breadcrumbs()">
 
    ${h.link_to(u'Home',h.url('/'))}
 
    / 
 
    ${h.link_to(c.repo_name,h.url('files_home',repo_name=c.repo_name))}
 
    /
 
    ${_('files')}
 
</%def>
 
<%def name="page_nav()">
 
        <form action="log">
 
            <dl class="search">
 
                <dt><label>Search: </label></dt>
 
                <dd><input type="text" name="rev" /></dd>
 
            </dl>
 
        </form>
 

	
 
		${self.menu('files')}     
 
</%def>
 
<%def name="css()">
 
<link rel="stylesheet" href="/css/monoblue_custom.css" type="text/css" />
 
<link rel="stylesheet" href="/css/diff.css" type="text/css" />
 
</%def>
 
<%def name="main()">
 
    <h2 class="no-link no-border">${'%s:  %s %s %s' % (_('File diff'),c.diff2,'&rarr;',c.diff1)|n}</h2>
 
<div id="body" class="diffblock">
 
	<div class="code-header">
 
		<span>${h.link_to(c.f_path,h.url('files_home',repo_name=c.repo_name,revision=c.diff2.split(':')[1],f_path=c.f_path))}</span>
 
		<div>
 
		<span>${h.link_to(c.f_path,h.url('files_home',repo_name=c.repo_name,
 
		revision=c.diff2.split(':')[1],f_path=c.f_path))}</span>
 
		 &raquo; <span style="font-size:77%">${h.link_to(_('diff'),
 
		h.url.current(diff2=c.diff2.split(':')[-1],diff1=c.diff1.split(':')[-1],diff='diff'))}</span>
 
		 &raquo; <span style="font-size:77%">${h.link_to(_('raw diff'),
 
		h.url.current(diff2=c.diff2.split(':')[-1],diff1=c.diff1.split(':')[-1],diff='raw'))}</span>
 
		 &raquo; <span style="font-size:77%">${h.link_to(_('download diff'),
 
		h.url.current(diff2=c.diff2.split(':')[-1],diff1=c.diff1.split(':')[-1],diff='download'))}</span>
 
		</div>
 
	</div>
 
	<div class="code-body">
 
 			%if c.no_changes:
 
            	${_('No changes')}
 
            %else:        
 
				${c.differ.as_HTML()|n}
 
				${c.cur_diff|n}
 
            %endif
 
	</div>
 
</div>
 
</%def>    
 
\ No newline at end of file
0 comments (0 inline, 0 general)