##// END OF EJS Templates
changelog / compare: adjust titles...
Mads Kiilerich -
r3592:549c73bf beta
parent child Browse files
Show More
@@ -1,115 +1,115 b''
1 .. _general:
1 .. _general:
2
2
3 =======================
3 =======================
4 General RhodeCode usage
4 General RhodeCode usage
5 =======================
5 =======================
6
6
7
7
8 Repository deleting
8 Repository deleting
9 -------------------
9 -------------------
10
10
11 Currently when admin/owner deletes a repository, RhodeCode does not physically
11 Currently when admin/owner deletes a repository, RhodeCode does not physically
12 delete a repository from filesystem, it renames it in a special way so it's
12 delete a repository from filesystem, it renames it in a special way so it's
13 not possible to push,clone or access repository. It's worth a notice that,
13 not possible to push,clone or access repository. It's worth a notice that,
14 even if someone will be given administrative access to RhodeCode and will
14 even if someone will be given administrative access to RhodeCode and will
15 delete a repository You can easy restore such action by restoring `rm__<date>`
15 delete a repository You can easy restore such action by restoring `rm__<date>`
16 from the repository name, and internal repository storage (.hg/.git). There
16 from the repository name, and internal repository storage (.hg/.git). There
17 is also a special command for cleaning such archived repos::
17 is also a special command for cleaning such archived repos::
18
18
19 paster cleanup-repos --older-than=30d production.ini
19 paster cleanup-repos --older-than=30d production.ini
20
20
21 This command will scan for archived repositories that are older than 30d,
21 This command will scan for archived repositories that are older than 30d,
22 display them and ask if you want to delete them (there's a --dont-ask flag also)
22 display them and ask if you want to delete them (there's a --dont-ask flag also)
23 If you host big amount of repositories with forks that are constantly deleted
23 If you host big amount of repositories with forks that are constantly deleted
24 it's recommended that you run such command via crontab.
24 it's recommended that you run such command via crontab.
25
25
26 Follow current branch in file view
26 Follow current branch in file view
27 ----------------------------------
27 ----------------------------------
28
28
29 In file view when this checkbox is checked the << and >> arrows will jump
29 In file view when this checkbox is checked the << and >> arrows will jump
30 to changesets within the same branch currently viewing. So for example
30 to changesets within the same branch currently viewing. So for example
31 if someone is viewing files at 'beta' branch and marks `follow current branch`
31 if someone is viewing files at 'beta' branch and marks `follow current branch`
32 checkbox the << and >> buttons will only show him revisions for 'beta' branch
32 checkbox the << and >> buttons will only show him revisions for 'beta' branch
33
33
34
34
35 Compare view from changelog
35 Compare view from changelog
36 ---------------------------
36 ---------------------------
37
37
38 Checkboxes in compare view allow users to view combined compare view. You can
38 Checkboxes in compare view allow users to view combined compare view. You can
39 only show the range between the first and last checkbox (no cherry pick).
39 only show the range between the first and last checkbox (no cherry pick).
40 Clicking more than one checkbox will activate a link in top saying
40 Clicking more than one checkbox will activate a link in top saying
41 `Show selected changes <from-rev> -> <to-rev>` clicking this will bring
41 `Show selected changesets <from-rev> -> <to-rev>` clicking this will bring
42 compare view. In this view also it's possible to switch to combined compare.
42 compare view. In this view also it's possible to switch to combined compare.
43
43
44 Compare view is also available from the journal on pushes having more than
44 Compare view is also available from the journal on pushes having more than
45 one changeset
45 one changeset
46
46
47
47
48 Non changeable repository urls
48 Non changeable repository urls
49 ------------------------------
49 ------------------------------
50
50
51 Due to complicated nature of repository grouping, often urls of repositories
51 Due to complicated nature of repository grouping, often urls of repositories
52 can change.
52 can change.
53
53
54 example::
54 example::
55
55
56 #before
56 #before
57 http://server.com/repo_name
57 http://server.com/repo_name
58 # after insertion to test_group group the url will be
58 # after insertion to test_group group the url will be
59 http://server.com/test_group/repo_name
59 http://server.com/test_group/repo_name
60
60
61 This can be an issue for build systems and any other hardcoded scripts, moving
61 This can be an issue for build systems and any other hardcoded scripts, moving
62 repository to a group leads to a need for changing external systems. To
62 repository to a group leads to a need for changing external systems. To
63 overcome this RhodeCode introduces a non changable replacement url. It's
63 overcome this RhodeCode introduces a non changable replacement url. It's
64 simply an repository ID prefixed with `_` above urls are also accessible as::
64 simply an repository ID prefixed with `_` above urls are also accessible as::
65
65
66 http://server.com/_<ID>
66 http://server.com/_<ID>
67
67
68 Since ID are always the same moving the repository will not affect such url.
68 Since ID are always the same moving the repository will not affect such url.
69 the _<ID> syntax can be used anywhere in the system so urls with repo_name
69 the _<ID> syntax can be used anywhere in the system so urls with repo_name
70 for changelogs, files and other can be exchanged with _<ID> syntax.
70 for changelogs, files and other can be exchanged with _<ID> syntax.
71
71
72
72
73 Mailing
73 Mailing
74 -------
74 -------
75
75
76 When administrator will fill up the mailing settings in .ini files
76 When administrator will fill up the mailing settings in .ini files
77 RhodeCode will send mails on user registration, or when RhodeCode errors occur
77 RhodeCode will send mails on user registration, or when RhodeCode errors occur
78 on errors the mails will have a detailed traceback of error.
78 on errors the mails will have a detailed traceback of error.
79
79
80
80
81 Mails are also sent for code comments. If someone comments on a changeset
81 Mails are also sent for code comments. If someone comments on a changeset
82 mail is sent to all participants, the person who commited the changeset
82 mail is sent to all participants, the person who commited the changeset
83 (if present in RhodeCode), and to all people mentioned with @mention system.
83 (if present in RhodeCode), and to all people mentioned with @mention system.
84
84
85
85
86 Trending source files
86 Trending source files
87 ---------------------
87 ---------------------
88
88
89 Trending source files are calculated based on pre defined dict of known
89 Trending source files are calculated based on pre defined dict of known
90 types and extensions. If You miss some extension or Would like to scan some
90 types and extensions. If You miss some extension or Would like to scan some
91 custom files it's possible to add new types in `LANGUAGES_EXTENSIONS_MAP` dict
91 custom files it's possible to add new types in `LANGUAGES_EXTENSIONS_MAP` dict
92 located in `/rhodecode/lib/celerylib/tasks.py`
92 located in `/rhodecode/lib/celerylib/tasks.py`
93
93
94
94
95 Cloning remote repositories
95 Cloning remote repositories
96 ---------------------------
96 ---------------------------
97
97
98 RhodeCode has an ability to clone remote repos from given remote locations.
98 RhodeCode has an ability to clone remote repos from given remote locations.
99 Currently it support following options:
99 Currently it support following options:
100
100
101 - hg -> hg clone
101 - hg -> hg clone
102 - svn -> hg clone
102 - svn -> hg clone
103 - git -> git clone
103 - git -> git clone
104
104
105
105
106 .. note::
106 .. note::
107
107
108 - *`svn -> hg` cloning requires `hgsubversion` library to be installed.*
108 - *`svn -> hg` cloning requires `hgsubversion` library to be installed.*
109
109
110 If you need to clone repositories that are protected via basic auth, you
110 If you need to clone repositories that are protected via basic auth, you
111 might pass the url with stored credentials inside eg.
111 might pass the url with stored credentials inside eg.
112 `http://user:passw@remote.server/repo, RhodeCode will try to login and clone
112 `http://user:passw@remote.server/repo, RhodeCode will try to login and clone
113 using given credentials. Please take a note that they will be stored as
113 using given credentials. Please take a note that they will be stored as
114 plaintext inside the database. RhodeCode will remove auth info when showing the
114 plaintext inside the database. RhodeCode will remove auth info when showing the
115 clone url in summary page.
115 clone url in summary page.
@@ -1,115 +1,115 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <!DOCTYPE html>
2 <!DOCTYPE html>
3 <html xmlns="http://www.w3.org/1999/xhtml">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
4 <head>
5 <title>${self.title()}</title>
5 <title>${self.title()}</title>
6 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
6 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
7 <meta name="robots" content="index, nofollow"/>
7 <meta name="robots" content="index, nofollow"/>
8 <link rel="icon" href="${h.url('/images/icons/database_gear.png')}" type="image/png" />
8 <link rel="icon" href="${h.url('/images/icons/database_gear.png')}" type="image/png" />
9
9
10 ## CSS ###
10 ## CSS ###
11 <%def name="css()">
11 <%def name="css()">
12 <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css', ver=c.rhodecode_version)}" media="screen"/>
12 <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css', ver=c.rhodecode_version)}" media="screen"/>
13 <link rel="stylesheet" type="text/css" href="${h.url('/css/pygments.css', ver=c.rhodecode_version)}"/>
13 <link rel="stylesheet" type="text/css" href="${h.url('/css/pygments.css', ver=c.rhodecode_version)}"/>
14 <link rel="stylesheet" type="text/css" href="${h.url('/css/contextbar.css', ver=c.rhodecode_version)}"/>
14 <link rel="stylesheet" type="text/css" href="${h.url('/css/contextbar.css', ver=c.rhodecode_version)}"/>
15 ## EXTRA FOR CSS
15 ## EXTRA FOR CSS
16 ${self.css_extra()}
16 ${self.css_extra()}
17 </%def>
17 </%def>
18 <%def name="css_extra()">
18 <%def name="css_extra()">
19 </%def>
19 </%def>
20
20
21 ${self.css()}
21 ${self.css()}
22
22
23 %if c.ga_code:
23 %if c.ga_code:
24 <!-- Analytics -->
24 <!-- Analytics -->
25 <script type="text/javascript">
25 <script type="text/javascript">
26 var _gaq = _gaq || [];
26 var _gaq = _gaq || [];
27 _gaq.push(['_setAccount', '${c.ga_code}']);
27 _gaq.push(['_setAccount', '${c.ga_code}']);
28 _gaq.push(['_trackPageview']);
28 _gaq.push(['_trackPageview']);
29
29
30 (function() {
30 (function() {
31 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
31 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
32 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
32 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
33 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
33 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
34 })();
34 })();
35 </script>
35 </script>
36 %endif
36 %endif
37
37
38 ## JAVASCRIPT ##
38 ## JAVASCRIPT ##
39 <%def name="js()">
39 <%def name="js()">
40 <script type="text/javascript">
40 <script type="text/javascript">
41 //JS translations map
41 //JS translations map
42 var TRANSLATION_MAP = {
42 var TRANSLATION_MAP = {
43 'Add another comment':'${_("Add another comment")}',
43 'Add another comment':'${_("Add another comment")}',
44 'Stop following this repository':"${_('Stop following this repository')}",
44 'Stop following this repository':"${_('Stop following this repository')}",
45 'Start following this repository':"${_('Start following this repository')}",
45 'Start following this repository':"${_('Start following this repository')}",
46 'Group':"${_('Group')}",
46 'Group':"${_('Group')}",
47 'members':"${_('members')}",
47 'members':"${_('members')}",
48 'Loading ...':"${_('Loading ...')}",
48 'Loading ...':"${_('Loading ...')}",
49 'Search truncated': "${_('Search truncated')}",
49 'Search truncated': "${_('Search truncated')}",
50 'No matching files': "${_('No matching files')}",
50 'No matching files': "${_('No matching files')}",
51 'Open new pull request': "${_('Open new pull request')}",
51 'Open new pull request': "${_('Open new pull request')}",
52 'Open new pull request for selected changesets': "${_('Open new pull request for selected changesets')}",
52 'Open new pull request for selected changesets': "${_('Open new pull request for selected changesets')}",
53 'Show selected changes __S -> __E': "${_('Show selected changes __S -> __E')}",
53 'Show selected changesets __S -> __E': "${_('Show selected changesets __S -> __E')}",
54 'Show selected change __S': "${_('Show selected change __S')}",
54 'Show selected changeset __S': "${_('Show selected changeset __S')}",
55 'Selection link': "${_('Selection link')}",
55 'Selection link': "${_('Selection link')}",
56 'Collapse diff': "${_('Collapse diff')}",
56 'Collapse diff': "${_('Collapse diff')}",
57 'Expand diff': "${_('Expand diff')}"
57 'Expand diff': "${_('Expand diff')}"
58 };
58 };
59 var _TM = TRANSLATION_MAP;
59 var _TM = TRANSLATION_MAP;
60
60
61 var TOGGLE_FOLLOW_URL = "${h.url('toggle_following')}";
61 var TOGGLE_FOLLOW_URL = "${h.url('toggle_following')}";
62
62
63 </script>
63 </script>
64 <script type="text/javascript" src="${h.url('/js/yui.2.9.js', ver=c.rhodecode_version)}"></script>
64 <script type="text/javascript" src="${h.url('/js/yui.2.9.js', ver=c.rhodecode_version)}"></script>
65 <!--[if lt IE 9]>
65 <!--[if lt IE 9]>
66 <script language="javascript" type="text/javascript" src="${h.url('/js/excanvas.min.js')}"></script>
66 <script language="javascript" type="text/javascript" src="${h.url('/js/excanvas.min.js')}"></script>
67 <![endif]-->
67 <![endif]-->
68 <script type="text/javascript" src="${h.url('/js/yui.flot.js', ver=c.rhodecode_version)}"></script>
68 <script type="text/javascript" src="${h.url('/js/yui.flot.js', ver=c.rhodecode_version)}"></script>
69 <script type="text/javascript" src="${h.url('/js/native.history.js', ver=c.rhodecode_version)}"></script>
69 <script type="text/javascript" src="${h.url('/js/native.history.js', ver=c.rhodecode_version)}"></script>
70 <script type="text/javascript" src="${h.url('/js/pyroutes_map.js', ver=c.rhodecode_version)}"></script>
70 <script type="text/javascript" src="${h.url('/js/pyroutes_map.js', ver=c.rhodecode_version)}"></script>
71 <script type="text/javascript" src="${h.url('/js/rhodecode.js', ver=c.rhodecode_version)}"></script>
71 <script type="text/javascript" src="${h.url('/js/rhodecode.js', ver=c.rhodecode_version)}"></script>
72 ## EXTRA FOR JS
72 ## EXTRA FOR JS
73 ${self.js_extra()}
73 ${self.js_extra()}
74 <script type="text/javascript">
74 <script type="text/javascript">
75 (function(window,undefined){
75 (function(window,undefined){
76 // Prepare
76 // Prepare
77 var History = window.History; // Note: We are using a capital H instead of a lower h
77 var History = window.History; // Note: We are using a capital H instead of a lower h
78 if ( !History.enabled ) {
78 if ( !History.enabled ) {
79 // History.js is disabled for this browser.
79 // History.js is disabled for this browser.
80 // This is because we can optionally choose to support HTML4 browsers or not.
80 // This is because we can optionally choose to support HTML4 browsers or not.
81 return false;
81 return false;
82 }
82 }
83 })(window);
83 })(window);
84
84
85 YUE.onDOMReady(function(){
85 YUE.onDOMReady(function(){
86 tooltip_activate();
86 tooltip_activate();
87 show_more_event();
87 show_more_event();
88 show_changeset_tooltip();
88 show_changeset_tooltip();
89 // routes registration
89 // routes registration
90 pyroutes.register('toggle_following', "${h.url('toggle_following')}");
90 pyroutes.register('toggle_following', "${h.url('toggle_following')}");
91 pyroutes.register('changeset_info', "${h.url('changeset_info', repo_name='%(repo_name)s', revision='%(revision)s')}", ['repo_name', 'revision']);
91 pyroutes.register('changeset_info', "${h.url('changeset_info', repo_name='%(repo_name)s', revision='%(revision)s')}", ['repo_name', 'revision']);
92 pyroutes.register('repo_size', "${h.url('repo_size', repo_name='%(repo_name)s')}", ['repo_name']);
92 pyroutes.register('repo_size', "${h.url('repo_size', repo_name='%(repo_name)s')}", ['repo_name']);
93 })
93 })
94 </script>
94 </script>
95 </%def>
95 </%def>
96 <%def name="js_extra()"></%def>
96 <%def name="js_extra()"></%def>
97 ${self.js()}
97 ${self.js()}
98 <%def name="head_extra()"></%def>
98 <%def name="head_extra()"></%def>
99 ${self.head_extra()}
99 ${self.head_extra()}
100 </head>
100 </head>
101 <body id="body">
101 <body id="body">
102 ## IE hacks
102 ## IE hacks
103 <!--[if IE 7]>
103 <!--[if IE 7]>
104 <script>YUD.addClass(document.body,'ie7')</script>
104 <script>YUD.addClass(document.body,'ie7')</script>
105 <![endif]-->
105 <![endif]-->
106 <!--[if IE 8]>
106 <!--[if IE 8]>
107 <script>YUD.addClass(document.body,'ie8')</script>
107 <script>YUD.addClass(document.body,'ie8')</script>
108 <![endif]-->
108 <![endif]-->
109 <!--[if IE 9]>
109 <!--[if IE 9]>
110 <script>YUD.addClass(document.body,'ie9')</script>
110 <script>YUD.addClass(document.body,'ie9')</script>
111 <![endif]-->
111 <![endif]-->
112
112
113 ${next.body()}
113 ${next.body()}
114 </body>
114 </body>
115 </html>
115 </html>
@@ -1,262 +1,262 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2
2
3 <%inherit file="/base/base.html"/>
3 <%inherit file="/base/base.html"/>
4
4
5 <%def name="title()">
5 <%def name="title()">
6 ${_('%s Changelog') % c.repo_name} &middot; ${c.rhodecode_name}
6 ${_('%s Changelog') % c.repo_name} &middot; ${c.rhodecode_name}
7 </%def>
7 </%def>
8
8
9 <%def name="breadcrumbs_links()">
9 <%def name="breadcrumbs_links()">
10 <% size = c.size if c.size <= c.total_cs else c.total_cs %>
10 <% size = c.size if c.size <= c.total_cs else c.total_cs %>
11 ${_('Changelog')} - ${ungettext('showing %d out of %d revision', 'showing %d out of %d revisions', size) % (size, c.total_cs)}
11 ${_('Changelog')} - ${ungettext('showing %d out of %d revision', 'showing %d out of %d revisions', size) % (size, c.total_cs)}
12 </%def>
12 </%def>
13
13
14 <%def name="page_nav()">
14 <%def name="page_nav()">
15 ${self.menu('changelog')}
15 ${self.menu('changelog')}
16 </%def>
16 </%def>
17
17
18 <%def name="main()">
18 <%def name="main()">
19 ${self.context_bar('changelog')}
19 ${self.context_bar('changelog')}
20 <div class="box">
20 <div class="box">
21 <!-- box / title -->
21 <!-- box / title -->
22 <div class="title">
22 <div class="title">
23 ${self.breadcrumbs()}
23 ${self.breadcrumbs()}
24 </div>
24 </div>
25 <div class="table">
25 <div class="table">
26 % if c.pagination:
26 % if c.pagination:
27 <div id="graph">
27 <div id="graph">
28 <div class="info_box" style="clear: both;padding: 10px 6px;min-height: 12px;text-align: right;">
28 <div class="info_box" style="clear: both;padding: 10px 6px;min-height: 12px;text-align: right;">
29 <a href="#" class="ui-btn small" id="rev_range_container" style="display:none"></a>
29 <a href="#" class="ui-btn small" id="rev_range_container" style="display:none"></a>
30 <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a>
30 <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a>
31
31
32 %if c.rhodecode_db_repo.fork:
32 %if c.rhodecode_db_repo.fork:
33 <a id="compare_fork" title="${_('Compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" href="${h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,org_ref_type='branch',org_ref='default',other_repo=c.repo_name,other_ref_type='branch',other_ref=request.GET.get('branch') or 'default',merge=1)}" class="ui-btn small">${_('Compare fork with parent')}</a>
33 <a id="compare_fork" title="${_('Compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" href="${h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,org_ref_type='branch',org_ref='default',other_repo=c.repo_name,other_ref_type='branch',other_ref=request.GET.get('branch') or 'default',merge=1)}" class="ui-btn small">${_('Compare fork with parent')}</a>
34 %endif
34 %endif
35 %if h.is_hg(c.rhodecode_repo):
35 %if h.is_hg(c.rhodecode_repo):
36 <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('Open new pull request')}</a>
36 <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('Open new pull request')}</a>
37 %endif
37 %endif
38 </div>
38 </div>
39 <div class="container_header">
39 <div class="container_header">
40 ${h.form(h.url.current(),method='get')}
40 ${h.form(h.url.current(),method='get')}
41 <div style="float:left">
41 <div style="float:left">
42 ${h.submit('set',_('Show'),class_="ui-btn")}
42 ${h.submit('set',_('Show'),class_="ui-btn")}
43 ${h.text('size',size=1,value=c.size)}
43 ${h.text('size',size=1,value=c.size)}
44 ${_('revisions')}
44 ${_('revisions')}
45 </div>
45 </div>
46 ${h.end_form()}
46 ${h.end_form()}
47 <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div>
47 <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div>
48 </div>
48 </div>
49 <div id="graph_nodes">
49 <div id="graph_nodes">
50 <canvas id="graph_canvas"></canvas>
50 <canvas id="graph_canvas"></canvas>
51 </div>
51 </div>
52 <div id="graph_content">
52 <div id="graph_content">
53
53
54 <table id="changesets">
54 <table id="changesets">
55 <tbody>
55 <tbody>
56 %for cnt,cs in enumerate(c.pagination):
56 %for cnt,cs in enumerate(c.pagination):
57 <tr id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}">
57 <tr id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}">
58 <td class="checkbox">
58 <td class="checkbox">
59 ${h.checkbox(cs.raw_id,class_="changeset_range")}
59 ${h.checkbox(cs.raw_id,class_="changeset_range")}
60 </td>
60 </td>
61 <td class="author">
61 <td class="author">
62 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/>
62 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/>
63 <span title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</span>
63 <span title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</span>
64 </td>
64 </td>
65 <td class="hash" style="width:${len(h.show_id(cs))*6.5}px">
65 <td class="hash" style="width:${len(h.show_id(cs))*6.5}px">
66 <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}">
66 <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}">
67 <span class="changeset_hash">${h.show_id(cs)}</span>
67 <span class="changeset_hash">${h.show_id(cs)}</span>
68 </a>
68 </a>
69 </td>
69 </td>
70 <td class="date">
70 <td class="date">
71 <div class="date">${h.age(cs.date,True)}</div>
71 <div class="date">${h.age(cs.date,True)}</div>
72 </td>
72 </td>
73 <td class="mid">
73 <td class="mid">
74 <div class="log-container">
74 <div class="log-container">
75 <div class="message">${h.urlify_commit(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
75 <div class="message">${h.urlify_commit(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
76 <div class="expand"><span class="expandtext">&darr; ${_('Show more')} &darr;</span></div>
76 <div class="expand"><span class="expandtext">&darr; ${_('Show more')} &darr;</span></div>
77 <div class="extra-container">
77 <div class="extra-container">
78 %if c.comments.get(cs.raw_id,[]):
78 %if c.comments.get(cs.raw_id,[]):
79 <div class="comments-container">
79 <div class="comments-container">
80 <div class="comments-cnt" title="${('comments')}">
80 <div class="comments-cnt" title="${('comments')}">
81 <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}">
81 <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}">
82 ${len(c.comments[cs.raw_id])}
82 ${len(c.comments[cs.raw_id])}
83 </a>
83 </a>
84 </div>
84 </div>
85 </div>
85 </div>
86 %endif
86 %endif
87 %if h.is_hg(c.rhodecode_repo):
87 %if h.is_hg(c.rhodecode_repo):
88 %for book in cs.bookmarks:
88 %for book in cs.bookmarks:
89 <div class="bookbook" title="${'%s %s' % (_('bookmark'),book)}">
89 <div class="bookbook" title="${'%s %s' % (_('bookmark'),book)}">
90 ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
90 ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
91 </div>
91 </div>
92 %endfor
92 %endfor
93 %endif
93 %endif
94 %for tag in cs.tags:
94 %for tag in cs.tags:
95 <div class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
95 <div class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
96 ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
96 ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
97 </div>
97 </div>
98 %endfor
98 %endfor
99 %if (not c.branch_name) and cs.branch:
99 %if (not c.branch_name) and cs.branch:
100 <div class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}">
100 <div class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}">
101 ${h.link_to(h.shorter(cs.branch),h.url('changelog_home',repo_name=c.repo_name,branch=cs.branch))}
101 ${h.link_to(h.shorter(cs.branch),h.url('changelog_home',repo_name=c.repo_name,branch=cs.branch))}
102 </div>
102 </div>
103 %endif
103 %endif
104 </div>
104 </div>
105 </div>
105 </div>
106 </td>
106 </td>
107 </tr>
107 </tr>
108 %endfor
108 %endfor
109 </tbody>
109 </tbody>
110 </table>
110 </table>
111
111
112 <div class="pagination-wh pagination-left">
112 <div class="pagination-wh pagination-left">
113 ${c.pagination.pager('$link_previous ~2~ $link_next')}
113 ${c.pagination.pager('$link_previous ~2~ $link_next')}
114 </div>
114 </div>
115 </div>
115 </div>
116 </div>
116 </div>
117
117
118 <script type="text/javascript" src="${h.url('/js/graph.js')}"></script>
118 <script type="text/javascript" src="${h.url('/js/graph.js')}"></script>
119 <script type="text/javascript">
119 <script type="text/javascript">
120 YAHOO.util.Event.onDOMReady(function(){
120 YAHOO.util.Event.onDOMReady(function(){
121
121
122 //Monitor range checkboxes and build a link to changesets
122 //Monitor range checkboxes and build a link to changesets
123 //ranges
123 //ranges
124 var checkboxes = YUD.getElementsByClassName('changeset_range');
124 var checkboxes = YUD.getElementsByClassName('changeset_range');
125 var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}";
125 var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}";
126 var pr_tmpl = "${h.url('pullrequest_home',repo_name=c.repo_name)}";
126 var pr_tmpl = "${h.url('pullrequest_home',repo_name=c.repo_name)}";
127
127
128 var checkbox_checker = function(e){
128 var checkbox_checker = function(e){
129 var checked_checkboxes = [];
129 var checked_checkboxes = [];
130 for (pos in checkboxes){
130 for (pos in checkboxes){
131 if(checkboxes[pos].checked){
131 if(checkboxes[pos].checked){
132 checked_checkboxes.push(checkboxes[pos]);
132 checked_checkboxes.push(checkboxes[pos]);
133 }
133 }
134 }
134 }
135 if(YUD.get('open_new_pr')){
135 if(YUD.get('open_new_pr')){
136 if(checked_checkboxes.length>1){
136 if(checked_checkboxes.length>1){
137 YUD.setStyle('open_new_pr','display','none');
137 YUD.setStyle('open_new_pr','display','none');
138 } else {
138 } else {
139 YUD.setStyle('open_new_pr','display','');
139 YUD.setStyle('open_new_pr','display','');
140 if(checked_checkboxes.length>0){
140 if(checked_checkboxes.length>0){
141 YUD.get('open_new_pr').innerHTML = _TM['Open new pull request for selected changesets'];
141 YUD.get('open_new_pr').innerHTML = _TM['Open new pull request for selected changesets'];
142 }else{
142 }else{
143 YUD.get('open_new_pr').innerHTML = _TM['Open new pull request'];
143 YUD.get('open_new_pr').innerHTML = _TM['Open new pull request'];
144 }
144 }
145 }
145 }
146 }
146 }
147
147
148 if(checked_checkboxes.length>0){
148 if(checked_checkboxes.length>0){
149 var rev_end = checked_checkboxes[0].name;
149 var rev_end = checked_checkboxes[0].name;
150 var rev_start = checked_checkboxes[checked_checkboxes.length-1].name;
150 var rev_start = checked_checkboxes[checked_checkboxes.length-1].name;
151 var url = url_tmpl.replace('__REVRANGE__',
151 var url = url_tmpl.replace('__REVRANGE__',
152 rev_start+'...'+rev_end);
152 rev_start+'...'+rev_end);
153
153
154 var link = (rev_start == rev_end)
154 var link = (rev_start == rev_end)
155 ? _TM['Show selected change __S']
155 ? _TM['Show selected changeset __S']
156 : _TM['Show selected changes __S -> __E'];
156 : _TM['Show selected changesets __S -> __E'];
157
157
158 link = link.replace('__S',rev_start.substr(0,6));
158 link = link.replace('__S',rev_start.substr(0,6));
159 link = link.replace('__E',rev_end.substr(0,6));
159 link = link.replace('__E',rev_end.substr(0,6));
160 YUD.get('rev_range_container').href = url;
160 YUD.get('rev_range_container').href = url;
161 YUD.get('rev_range_container').innerHTML = link;
161 YUD.get('rev_range_container').innerHTML = link;
162 YUD.setStyle('rev_range_container','display','');
162 YUD.setStyle('rev_range_container','display','');
163 YUD.setStyle('rev_range_clear','display','');
163 YUD.setStyle('rev_range_clear','display','');
164
164
165 YUD.get('open_new_pr').href = pr_tmpl + '?rev_start={0}&rev_end={1}'.format(rev_start,rev_end);
165 YUD.get('open_new_pr').href = pr_tmpl + '?rev_start={0}&rev_end={1}'.format(rev_start,rev_end);
166 YUD.setStyle('compare_fork','display','none');
166 YUD.setStyle('compare_fork','display','none');
167 }else{
167 }else{
168 YUD.setStyle('rev_range_container','display','none');
168 YUD.setStyle('rev_range_container','display','none');
169 YUD.setStyle('rev_range_clear','display','none');
169 YUD.setStyle('rev_range_clear','display','none');
170 if (checkboxes){
170 if (checkboxes){
171 YUD.get('open_new_pr').href = pr_tmpl + '?rev_end={0}'.format(checkboxes[0].name);
171 YUD.get('open_new_pr').href = pr_tmpl + '?rev_end={0}'.format(checkboxes[0].name);
172 }
172 }
173 YUD.setStyle('compare_fork','display','');
173 YUD.setStyle('compare_fork','display','');
174 }
174 }
175 };
175 };
176 YUE.onDOMReady(checkbox_checker);
176 YUE.onDOMReady(checkbox_checker);
177 YUE.on(checkboxes,'click', checkbox_checker);
177 YUE.on(checkboxes,'click', checkbox_checker);
178
178
179 YUE.on('rev_range_clear','click',function(e){
179 YUE.on('rev_range_clear','click',function(e){
180 for (var i=0; i<checkboxes.length; i++){
180 for (var i=0; i<checkboxes.length; i++){
181 var cb = checkboxes[i];
181 var cb = checkboxes[i];
182 cb.checked = false;
182 cb.checked = false;
183 }
183 }
184 checkbox_checker();
184 checkbox_checker();
185 YUE.preventDefault(e);
185 YUE.preventDefault(e);
186 });
186 });
187
187
188 var msgs = YUQ('.message');
188 var msgs = YUQ('.message');
189 // get first element height
189 // get first element height
190 var el = YUQ('#graph_content .container')[0];
190 var el = YUQ('#graph_content .container')[0];
191 var row_h = el.clientHeight;
191 var row_h = el.clientHeight;
192 for(var i=0;i<msgs.length;i++){
192 for(var i=0;i<msgs.length;i++){
193 var m = msgs[i];
193 var m = msgs[i];
194
194
195 var h = m.clientHeight;
195 var h = m.clientHeight;
196 var pad = YUD.getStyle(m,'padding');
196 var pad = YUD.getStyle(m,'padding');
197 if(h > row_h){
197 if(h > row_h){
198 var offset = row_h - (h+12);
198 var offset = row_h - (h+12);
199 YUD.setStyle(m.nextElementSibling,'display','block');
199 YUD.setStyle(m.nextElementSibling,'display','block');
200 YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px');
200 YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px');
201 };
201 };
202 }
202 }
203 YUE.on(YUQ('.expand'),'click',function(e){
203 YUE.on(YUQ('.expand'),'click',function(e){
204 var elem = e.currentTarget.parentNode.parentNode;
204 var elem = e.currentTarget.parentNode.parentNode;
205 YUD.setStyle(e.currentTarget,'display','none');
205 YUD.setStyle(e.currentTarget,'display','none');
206 YUD.setStyle(elem,'height','auto');
206 YUD.setStyle(elem,'height','auto');
207
207
208 //redraw the graph, line_count and jsdata are global vars
208 //redraw the graph, line_count and jsdata are global vars
209 set_canvas(100);
209 set_canvas(100);
210
210
211 var r = new BranchRenderer();
211 var r = new BranchRenderer();
212 r.render(jsdata,100,line_count);
212 r.render(jsdata,100,line_count);
213
213
214 });
214 });
215
215
216 // change branch filter
216 // change branch filter
217 YUE.on(YUD.get('branch_filter'),'change',function(e){
217 YUE.on(YUD.get('branch_filter'),'change',function(e){
218 var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value;
218 var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value;
219 var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}";
219 var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}";
220 var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}";
220 var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}";
221 var url = url.replace('__BRANCH__',selected_branch);
221 var url = url.replace('__BRANCH__',selected_branch);
222 if(selected_branch != ''){
222 if(selected_branch != ''){
223 window.location = url;
223 window.location = url;
224 }else{
224 }else{
225 window.location = url_main;
225 window.location = url_main;
226 }
226 }
227
227
228 });
228 });
229
229
230 function set_canvas(width) {
230 function set_canvas(width) {
231 var c = document.getElementById('graph_nodes');
231 var c = document.getElementById('graph_nodes');
232 var t = document.getElementById('graph_content');
232 var t = document.getElementById('graph_content');
233 canvas = document.getElementById('graph_canvas');
233 canvas = document.getElementById('graph_canvas');
234 var div_h = t.clientHeight;
234 var div_h = t.clientHeight;
235 canvas.setAttribute('height',div_h);
235 canvas.setAttribute('height',div_h);
236 canvas.setAttribute('width',width);
236 canvas.setAttribute('width',width);
237 };
237 };
238 var heads = 1;
238 var heads = 1;
239 var line_count = 0;
239 var line_count = 0;
240 var jsdata = ${c.jsdata|n};
240 var jsdata = ${c.jsdata|n};
241
241
242 for (var i=0;i<jsdata.length;i++) {
242 for (var i=0;i<jsdata.length;i++) {
243 var in_l = jsdata[i][2];
243 var in_l = jsdata[i][2];
244 for (var j in in_l) {
244 for (var j in in_l) {
245 var m = in_l[j][1];
245 var m = in_l[j][1];
246 if (m > line_count)
246 if (m > line_count)
247 line_count = m;
247 line_count = m;
248 }
248 }
249 }
249 }
250 set_canvas(100);
250 set_canvas(100);
251
251
252 var r = new BranchRenderer();
252 var r = new BranchRenderer();
253 r.render(jsdata,100,line_count);
253 r.render(jsdata,100,line_count);
254
254
255 });
255 });
256 </script>
256 </script>
257 %else:
257 %else:
258 ${_('There are no changes yet')}
258 ${_('There are no changes yet')}
259 %endif
259 %endif
260 </div>
260 </div>
261 </div>
261 </div>
262 </%def>
262 </%def>
@@ -1,122 +1,124 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.html"/>
2 <%inherit file="/base/base.html"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${_('%s Changesets') % c.repo_name} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -&gt; r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} &middot; ${c.rhodecode_name}
5 ${_('%s Changesets') % c.repo_name} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -&gt; r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} &middot; ${c.rhodecode_name}
6 </%def>
6 </%def>
7
7
8 <%def name="breadcrumbs_links()">
8 <%def name="breadcrumbs_links()">
9 ${h.link_to(_(u'Home'),h.url('/'))}
9 ${h.link_to(_(u'Home'),h.url('/'))}
10 &raquo;
10 &raquo;
11 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
11 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
12 &raquo;
12 &raquo;
13 ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -&gt; r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)}
13 ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -&gt; r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)}
14 </%def>
14 </%def>
15
15
16 <%def name="page_nav()">
16 <%def name="page_nav()">
17 ${self.menu('changelog')}
17 ${self.menu('changelog')}
18 </%def>
18 </%def>
19
19
20 <%def name="main()">
20 <%def name="main()">
21 <div class="box">
21 <div class="box">
22 <!-- box / title -->
22 <!-- box / title -->
23 <div class="title">
23 <div class="title">
24 ${self.breadcrumbs()}
24 ${self.breadcrumbs()}
25 </div>
25 </div>
26 <div class="table">
26 <div class="table">
27 <div id="body" class="diffblock">
27 <div id="body" class="diffblock">
28 <div class="code-header cv">
28 <div class="code-header cv">
29 <h3 class="code-header-title">${_('Compare View')} / ${h.link_to(_('Show combined compare'),h.url('compare_url',repo_name=c.repo_name,org_ref_type='rev',org_ref=getattr(c.cs_ranges[0].parents[0] if c.cs_ranges[0].parents else h.EmptyChangeset(),'raw_id'),other_ref_type='rev',other_ref=c.cs_ranges[-1].raw_id))}</h3>
29 <h3 class="code-header-title">${_('Show changesets')}</h3>
30 <div>
30 <div>
31 ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -&gt; r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)}
31 ${h.link_to('r%s:%s -> r%s:%s' % (c.cs_ranges[0].revision, h.short_id(c.cs_ranges[0].raw_id), c.cs_ranges[-1].revision, h.short_id(c.cs_ranges[-1].raw_id)),
32 h.url('compare_url',repo_name=c.repo_name,org_ref_type='rev',org_ref=getattr(c.cs_ranges[0].parents[0] if c.cs_ranges[0].parents else h.EmptyChangeset(),'raw_id'),other_ref_type='rev',other_ref=c.cs_ranges[-1].raw_id)
33 )}
32 </div>
34 </div>
33 </div>
35 </div>
34 </div>
36 </div>
35 <div id="changeset_compare_view_content">
37 <div id="changeset_compare_view_content">
36 <div class="container">
38 <div class="container">
37 <table class="compare_view_commits noborder">
39 <table class="compare_view_commits noborder">
38 %for cnt,cs in enumerate(c.cs_ranges):
40 %for cnt,cs in enumerate(c.cs_ranges):
39 <tr>
41 <tr>
40 <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),14)}"/></div></td>
42 <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),14)}"/></div></td>
41 <td>${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</td>
43 <td>${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</td>
42 <td><div class="author">${h.person(cs.author)}</div></td>
44 <td><div class="author">${h.person(cs.author)}</div></td>
43 <td><span class="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td>
45 <td><span class="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td>
44 <td>
46 <td>
45 %if c.statuses:
47 %if c.statuses:
46 <div title="${h.tooltip(_('Changeset status'))}" class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[cnt])}" /></div>
48 <div title="${h.tooltip(_('Changeset status'))}" class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[cnt])}" /></div>
47 %endif
49 %endif
48 </td>
50 </td>
49 <td><div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td>
51 <td><div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td>
50 </tr>
52 </tr>
51 %endfor
53 %endfor
52 </table>
54 </table>
53 </div>
55 </div>
54 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div>
56 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div>
55 <div class="cs_files">
57 <div class="cs_files">
56 %for cs in c.cs_ranges:
58 %for cs in c.cs_ranges:
57 <div class="cur_cs">${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
59 <div class="cur_cs">${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
58 %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[cs.raw_id].iteritems():
60 %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[cs.raw_id].iteritems():
59 <div class="cs_${change}">${h.link_to(h.safe_unicode(path),h.url.current(anchor=FID))}</div>
61 <div class="cs_${change}">${h.link_to(h.safe_unicode(path),h.url.current(anchor=FID))}</div>
60 %endfor
62 %endfor
61 %endfor
63 %endfor
62 </div>
64 </div>
63 </div>
65 </div>
64
66
65 </div>
67 </div>
66 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
68 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
67 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
69 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
68 %for cs in c.cs_ranges:
70 %for cs in c.cs_ranges:
69 ##${comment.comment_inline_form(cs)}
71 ##${comment.comment_inline_form(cs)}
70 ## diff block
72 ## diff block
71 <div class="h3">
73 <div class="h3">
72 <a class="tooltip" title="${h.tooltip(cs.message)}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}">${'r%s:%s' % (cs.revision,h.short_id(cs.raw_id))}</a>
74 <a class="tooltip" title="${h.tooltip(cs.message)}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}">${'r%s:%s' % (cs.revision,h.short_id(cs.raw_id))}</a>
73 <div class="gravatar">
75 <div class="gravatar">
74 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),20)}"/>
76 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),20)}"/>
75 </div>
77 </div>
76 <div class="right">
78 <div class="right">
77 <span class="logtags">
79 <span class="logtags">
78 %if len(cs.parents)>1:
80 %if len(cs.parents)>1:
79 <span class="merge">${_('merge')}</span>
81 <span class="merge">${_('merge')}</span>
80 %endif
82 %endif
81 %if cs.branch:
83 %if cs.branch:
82 <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}">
84 <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}">
83 ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
85 ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
84 </span>
86 </span>
85 %endif
87 %endif
86 %if h.is_hg(c.rhodecode_repo):
88 %if h.is_hg(c.rhodecode_repo):
87 %for book in cs.bookmarks:
89 %for book in cs.bookmarks:
88 <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}">
90 <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}">
89 ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
91 ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
90 </span>
92 </span>
91 %endfor
93 %endfor
92 %endif
94 %endif
93 %for tag in cs.tags:
95 %for tag in cs.tags:
94 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
96 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
95 ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span>
97 ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span>
96 %endfor
98 %endfor
97 </span>
99 </span>
98 </div>
100 </div>
99 </div>
101 </div>
100 ${diff_block.diff_block(c.changes[cs.raw_id])}
102 ${diff_block.diff_block(c.changes[cs.raw_id])}
101 ##${comment.comments(cs)}
103 ##${comment.comments(cs)}
102
104
103 %endfor
105 %endfor
104 <script type="text/javascript">
106 <script type="text/javascript">
105
107
106 YUE.onDOMReady(function(){
108 YUE.onDOMReady(function(){
107
109
108 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
110 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
109 var act = e.currentTarget.nextElementSibling;
111 var act = e.currentTarget.nextElementSibling;
110
112
111 if(YUD.hasClass(act,'active')){
113 if(YUD.hasClass(act,'active')){
112 YUD.removeClass(act,'active');
114 YUD.removeClass(act,'active');
113 YUD.setStyle(act,'display','none');
115 YUD.setStyle(act,'display','none');
114 }else{
116 }else{
115 YUD.addClass(act,'active');
117 YUD.addClass(act,'active');
116 YUD.setStyle(act,'display','');
118 YUD.setStyle(act,'display','');
117 }
119 }
118 });
120 });
119 })
121 })
120 </script>
122 </script>
121 </div>
123 </div>
122 </%def>
124 </%def>
@@ -1,93 +1,93 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.html"/>
2 <%inherit file="/base/base.html"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${_('%s Compare') % c.repo_name} - ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -&gt; ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} &middot; ${c.rhodecode_name}
5 ${_('%s Compare') % c.repo_name} - ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -&gt; ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} &middot; ${c.rhodecode_name}
6 </%def>
6 </%def>
7
7
8 <%def name="breadcrumbs_links()">
8 <%def name="breadcrumbs_links()">
9 ${h.link_to(_(u'Home'),h.url('/'))}
9 ${h.link_to(_(u'Home'),h.url('/'))}
10 &raquo;
10 &raquo;
11 ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)}
11 ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)}
12 &raquo;
12 &raquo;
13 ${_('compare')}
13 ${_('compare')}
14 </%def>
14 </%def>
15
15
16 <%def name="page_nav()">
16 <%def name="page_nav()">
17 ${self.menu('changelog')}
17 ${self.menu('changelog')}
18 </%def>
18 </%def>
19
19
20 <%def name="main()">
20 <%def name="main()">
21 <div class="box">
21 <div class="box">
22 <!-- box / title -->
22 <!-- box / title -->
23 <div class="title">
23 <div class="title">
24 ${self.breadcrumbs()}
24 ${self.breadcrumbs()}
25 </div>
25 </div>
26 <div class="table">
26 <div class="table">
27 <div id="body" class="diffblock">
27 <div id="body" class="diffblock">
28 <div class="code-header cv">
28 <div class="code-header cv">
29 <h3 class="code-header-title">${_('Compare View')}</h3>
29 <h3 class="code-header-title">${_('Compare revisions')}</h3>
30 <div>
30 <div>
31 ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -&gt; ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} <a href="${c.swap_url}">[swap]</a>
31 ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -&gt; ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} <a href="${c.swap_url}">[swap]</a>
32 </div>
32 </div>
33 </div>
33 </div>
34 </div>
34 </div>
35 <div id="changeset_compare_view_content">
35 <div id="changeset_compare_view_content">
36 ##CS
36 ##CS
37 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${ungettext('Showing %s commit','Showing %s commits', len(c.cs_ranges)) % len(c.cs_ranges)}</div>
37 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${ungettext('Showing %s commit','Showing %s commits', len(c.cs_ranges)) % len(c.cs_ranges)}</div>
38 <%include file="compare_cs.html" />
38 <%include file="compare_cs.html" />
39
39
40 ## FILES
40 ## FILES
41 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
41 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
42
42
43 % if c.limited_diff:
43 % if c.limited_diff:
44 ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)}
44 ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)}
45 % else:
45 % else:
46 ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.files)) % (len(c.files),c.lines_added,c.lines_deleted)}:
46 ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.files)) % (len(c.files),c.lines_added,c.lines_deleted)}:
47 %endif
47 %endif
48
48
49 </div>
49 </div>
50 <div class="cs_files">
50 <div class="cs_files">
51 %if not c.files:
51 %if not c.files:
52 <span class="empty_data">${_('No files')}</span>
52 <span class="empty_data">${_('No files')}</span>
53 %endif
53 %endif
54 %for fid, change, f, stat in c.files:
54 %for fid, change, f, stat in c.files:
55 <div class="cs_${change}">
55 <div class="cs_${change}">
56 <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid, **request.GET.mixed()))}</div>
56 <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid, **request.GET.mixed()))}</div>
57 <div class="changes">${h.fancy_file_stats(stat)}</div>
57 <div class="changes">${h.fancy_file_stats(stat)}</div>
58 </div>
58 </div>
59 %endfor
59 %endfor
60 </div>
60 </div>
61 % if c.limited_diff:
61 % if c.limited_diff:
62 <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h5>
62 <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h5>
63 % endif
63 % endif
64 </div>
64 </div>
65 </div>
65 </div>
66
66
67 ## diff block
67 ## diff block
68 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
68 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
69 %for fid, change, f, stat in c.files:
69 %for fid, change, f, stat in c.files:
70 ${diff_block.diff_block_simple([c.changes[fid]])}
70 ${diff_block.diff_block_simple([c.changes[fid]])}
71 %endfor
71 %endfor
72 % if c.limited_diff:
72 % if c.limited_diff:
73 <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h4>
73 <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h4>
74 % endif
74 % endif
75 <script type="text/javascript">
75 <script type="text/javascript">
76
76
77 YUE.onDOMReady(function(){
77 YUE.onDOMReady(function(){
78
78
79 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
79 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
80 var act = e.currentTarget.nextElementSibling;
80 var act = e.currentTarget.nextElementSibling;
81
81
82 if(YUD.hasClass(act,'active')){
82 if(YUD.hasClass(act,'active')){
83 YUD.removeClass(act,'active');
83 YUD.removeClass(act,'active');
84 YUD.setStyle(act,'display','none');
84 YUD.setStyle(act,'display','none');
85 }else{
85 }else{
86 YUD.addClass(act,'active');
86 YUD.addClass(act,'active');
87 YUD.setStyle(act,'display','');
87 YUD.setStyle(act,'display','');
88 }
88 }
89 });
89 });
90 })
90 })
91 </script>
91 </script>
92 </div>
92 </div>
93 </%def>
93 </%def>
General Comments 0
You need to be logged in to leave comments. Login now