##// END OF EJS Templates
Removed shortlog aka lightweight changelog....
marcink -
r3764:c7970889 beta
parent child Browse files
Show More
@@ -0,0 +1,103 b''
1 ## -*- coding: utf-8 -*-
2 %if c.repo_changesets:
3 <table class="table_disp">
4 <tr>
5 <th class="left">${_('Revision')}</th>
6 <th class="left">${_('Commit message')}</th>
7 <th class="left">${_('Age')}</th>
8 <th class="left">${_('Author')}</th>
9 <th class="left">${_('Refs')}</th>
10 </tr>
11 %for cnt,cs in enumerate(c.repo_changesets):
12 <tr class="parity${cnt%2}">
13 <td>
14 <div>
15 <div class="changeset-status-container">
16 %if c.statuses.get(cs.raw_id):
17 <div class="changeset-status-ico">
18 %if c.statuses.get(cs.raw_id)[2]:
19 <a class="tooltip" title="${_('Click to open associated pull request #%s' % c.statuses.get(cs.raw_id)[2])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}">
20 <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" />
21 </a>
22 %else:
23 <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses.get(cs.raw_id)[0])}" />
24 %endif
25 </div>
26 %endif
27 </div>
28 <pre><a href="${h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id)}">${h.show_id(cs)}</a></pre>
29 </div>
30 </td>
31 <td>
32 ${h.urlify_commit(h.truncate(cs.message,50),c.repo_name, h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
33 </td>
34 <td><span class="tooltip" title="${h.tooltip(h.fmt_date(cs.date))}">
35 ${h.age(cs.date)}</span>
36 </td>
37 <td title="${cs.author}">${h.person(cs.author)}</td>
38 <td>
39 %if h.is_hg(c.rhodecode_repo):
40 %for book in cs.bookmarks:
41 <div class="booktag" title="${_('Bookmark %s') % book}">
42 ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
43 </div>
44 %endfor
45 %endif
46 %for tag in cs.tags:
47 <div class="tagtag" title="${_('Tag %s') % tag}">
48 ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
49 </div>
50 %endfor
51 %if cs.branch:
52 <div class="branchtag" title="${_('Branch %s' % cs.branch)}">
53 ${h.link_to(h.shorter(cs.branch),h.url('changelog_home',repo_name=c.repo_name,branch=cs.branch))}
54 </div>
55 %endif
56 </td>
57 </tr>
58 %endfor
59
60 </table>
61
62 <script type="text/javascript">
63 YUE.onDOMReady(function(){
64 YUE.delegate("shortlog_data","click",function(e, matchedEl, container){
65 ypjax(e.target.href,"shortlog_data",function(){tooltip_activate();});
66 YUE.preventDefault(e);
67 },'.pager_link');
68 });
69 </script>
70
71 <div class="pagination-wh pagination-left">
72 ${c.repo_changesets.pager('$link_previous ~2~ $link_next')}
73 </div>
74 %else:
75
76 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
77 <h4>${_('Add or upload files directly via RhodeCode')}</h4>
78 <div style="margin: 20px 30px;">
79 <div id="add_node_id" class="add_node">
80 <a class="ui-btn" href="${h.url('files_add_home',repo_name=c.repo_name,revision=0,f_path='')}">${_('Add new file')}</a>
81 </div>
82 </div>
83 %endif
84
85
86 <h4>${_('Push new repo')}</h4>
87 <pre>
88 ${c.rhodecode_repo.alias} clone ${c.clone_repo_url}
89 ${c.rhodecode_repo.alias} add README # add first file
90 ${c.rhodecode_repo.alias} commit -m "Initial" # commit with message
91 ${c.rhodecode_repo.alias} push ${'origin master' if h.is_git(c.rhodecode_repo) else ''} # push changes back
92 </pre>
93
94 <h4>${_('Existing repository?')}</h4>
95 <pre>
96 %if h.is_git(c.rhodecode_repo):
97 git remote add origin ${c.clone_repo_url}
98 git push -u origin master
99 %else:
100 hg push ${c.clone_repo_url}
101 %endif
102 </pre>
103 %endif
@@ -586,9 +586,6 b' def make_map(config):'
586 rmap.connect('summary_home_summary', '/{repo_name:.*?}/summary',
586 rmap.connect('summary_home_summary', '/{repo_name:.*?}/summary',
587 controller='summary', conditions=dict(function=check_repo))
587 controller='summary', conditions=dict(function=check_repo))
588
588
589 rmap.connect('shortlog_home', '/{repo_name:.*?}/shortlog',
590 controller='shortlog', conditions=dict(function=check_repo))
591
592 rmap.connect('branches_home', '/{repo_name:.*?}/branches',
589 rmap.connect('branches_home', '/{repo_name:.*?}/branches',
593 controller='branches', conditions=dict(function=check_repo))
590 controller='branches', conditions=dict(function=check_repo))
594
591
@@ -601,6 +598,10 b' def make_map(config):'
601 rmap.connect('changelog_home', '/{repo_name:.*?}/changelog',
598 rmap.connect('changelog_home', '/{repo_name:.*?}/changelog',
602 controller='changelog', conditions=dict(function=check_repo))
599 controller='changelog', conditions=dict(function=check_repo))
603
600
601 rmap.connect('changelog_summary_home', '/{repo_name:.*?}/changelog_summary',
602 controller='changelog', action='changelog_summary',
603 conditions=dict(function=check_repo))
604
604 rmap.connect('changelog_file_home', '/{repo_name:.*?}/changelog/{revision}/{f_path:.*}',
605 rmap.connect('changelog_file_home', '/{repo_name:.*?}/changelog/{revision}/{f_path:.*}',
605 controller='changelog', f_path=None,
606 controller='changelog', f_path=None,
606 conditions=dict(function=check_repo))
607 conditions=dict(function=check_repo))
@@ -39,10 +39,29 b' from rhodecode.lib.graphmod import _colo'
39 from rhodecode.lib.vcs.exceptions import RepositoryError, ChangesetDoesNotExistError,\
39 from rhodecode.lib.vcs.exceptions import RepositoryError, ChangesetDoesNotExistError,\
40 ChangesetError, NodeDoesNotExistError
40 ChangesetError, NodeDoesNotExistError
41 from rhodecode.lib.utils2 import safe_int
41 from rhodecode.lib.utils2 import safe_int
42 from webob.exc import HTTPNotFound
42
43
43 log = logging.getLogger(__name__)
44 log = logging.getLogger(__name__)
44
45
45
46
47 def _load_changelog_summary():
48 p = safe_int(request.GET.get('page'), 1)
49 size = safe_int(request.GET.get('size'), 10)
50
51 def url_generator(**kw):
52 return url('changelog_summary_home',
53 repo_name=c.rhodecode_db_repo.repo_name, size=size, **kw)
54
55 collection = c.rhodecode_repo
56
57 c.repo_changesets = RepoPage(collection, page=p,
58 items_per_page=size,
59 url=url_generator)
60 page_revisions = [x.raw_id for x in list(c.repo_changesets)]
61 c.comments = c.rhodecode_db_repo.get_comments(page_revisions)
62 c.statuses = c.rhodecode_db_repo.statuses(page_revisions)
63
64
46 class ChangelogController(BaseRepoController):
65 class ChangelogController(BaseRepoController):
47
66
48 def __before__(self):
67 def __before__(self):
@@ -140,3 +159,14 b' class ChangelogController(BaseRepoContro'
140 if request.environ.get('HTTP_X_PARTIAL_XHR'):
159 if request.environ.get('HTTP_X_PARTIAL_XHR'):
141 c.cs = c.rhodecode_repo.get_changeset(cs)
160 c.cs = c.rhodecode_repo.get_changeset(cs)
142 return render('changelog/changelog_details.html')
161 return render('changelog/changelog_details.html')
162 raise HTTPNotFound()
163
164 @LoginRequired()
165 @HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
166 'repository.admin')
167 def changelog_summary(self, repo_name):
168 if request.environ.get('HTTP_X_PARTIAL_XHR'):
169 _load_changelog_summary()
170
171 return render('changelog/changelog_summary_data.html')
172 raise HTTPNotFound()
@@ -55,6 +55,7 b' from rhodecode.lib.celerylib.tasks impor'
55 from rhodecode.lib.helpers import RepoPage
55 from rhodecode.lib.helpers import RepoPage
56 from rhodecode.lib.compat import json, OrderedDict
56 from rhodecode.lib.compat import json, OrderedDict
57 from rhodecode.lib.vcs.nodes import FileNode
57 from rhodecode.lib.vcs.nodes import FileNode
58 from rhodecode.controllers.changelog import _load_changelog_summary
58
59
59 log = logging.getLogger(__name__)
60 log = logging.getLogger(__name__)
60
61
@@ -136,15 +137,7 b' class SummaryController(BaseRepoControll'
136 'repository.admin')
137 'repository.admin')
137 def index(self, repo_name):
138 def index(self, repo_name):
138 c.dbrepo = dbrepo = c.rhodecode_db_repo
139 c.dbrepo = dbrepo = c.rhodecode_db_repo
139
140 _load_changelog_summary()
140 def url_generator(**kw):
141 return url('shortlog_home', repo_name=repo_name, size=10, **kw)
142
143 c.repo_changesets = RepoPage(c.rhodecode_repo, page=1,
144 items_per_page=10, url=url_generator)
145 page_revisions = [x.raw_id for x in list(c.repo_changesets)]
146 c.statuses = c.rhodecode_db_repo.statuses(page_revisions)
147
148 if self.rhodecode_user.username == 'default':
141 if self.rhodecode_user.username == 'default':
149 # for default(anonymous) user we don't need to pass credentials
142 # for default(anonymous) user we don't need to pass credentials
150 username = ''
143 username = ''
@@ -21,7 +21,6 b''
21 #context-bar a.tags { background-image: url("../images/icons/tag_blue.png"); }
21 #context-bar a.tags { background-image: url("../images/icons/tag_blue.png"); }
22 #context-bar a.bookmarks { background-image: url("../images/icons/tag_green.png"); }
22 #context-bar a.bookmarks { background-image: url("../images/icons/tag_green.png"); }
23 #context-bar a.settings { background-image: url("../images/icons/cog.png"); }
23 #context-bar a.settings { background-image: url("../images/icons/cog.png"); }
24 #context-bar a.shortlog { background-image: url("../images/icons/time.png"); }
25 #context-bar a.search { background-image: url("../images/icons/search_16.png"); }
24 #context-bar a.search { background-image: url("../images/icons/search_16.png"); }
26 #context-bar a.admin { background-image: url("../images/icons/cog_edit.png"); }
25 #context-bar a.admin { background-image: url("../images/icons/cog_edit.png"); }
27
26
@@ -544,10 +544,6 b' div:hover > a.permalink {'
544 background-image: url("../images/icons/search_16.png");
544 background-image: url("../images/icons/search_16.png");
545 }
545 }
546
546
547 #header #header-inner #quick li ul li a.shortlog, #header #header-inner #quick li ul li a.shortlog:hover {
548 background-image: url("../images/icons/clock_16.png");
549 }
550
551 #header #header-inner #quick li ul li a.delete, #header #header-inner #quick li ul li a.delete:hover {
547 #header #header-inner #quick li ul li a.delete, #header #header-inner #quick li ul li a.delete:hover {
552 background-image: url("../images/icons/delete.png");
548 background-image: url("../images/icons/delete.png");
553 }
549 }
@@ -2761,12 +2757,6 b' h3.files_location {'
2761 margin: 0px 2px;
2757 margin: 0px 2px;
2762 }
2758 }
2763
2759
2764 #shortlog_data .branchtag,
2765 #shortlog_data .booktag,
2766 #shortlog_data .tagtag {
2767 margin: 0px 2px;
2768 }
2769
2770 .branchtag,
2760 .branchtag,
2771 .tagtag,
2761 .tagtag,
2772 .booktag,
2762 .booktag,
@@ -128,7 +128,6 b''
128 %if c.rhodecode_db_repo.fork:
128 %if c.rhodecode_db_repo.fork:
129 <li>${h.link_to(_('Compare fork'),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_='compare_request')}</li>
129 <li>${h.link_to(_('Compare fork'),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_='compare_request')}</li>
130 %endif
130 %endif
131 <li>${h.link_to(_('Lightweight changelog'),h.url('shortlog_home',repo_name=c.repo_name),class_='shortlog')}</li>
132 <li>${h.link_to(_('Search'),h.url('search_repo',repo_name=c.repo_name),class_='search')}</li>
131 <li>${h.link_to(_('Search'),h.url('search_repo',repo_name=c.repo_name),class_='search')}</li>
133
132
134 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking:
133 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking:
@@ -261,7 +261,7 b' window.onhashchange = function() {'
261 </div>
261 </div>
262 <div class="table">
262 <div class="table">
263 <div id="shortlog_data">
263 <div id="shortlog_data">
264 <%include file='../shortlog/shortlog_data.html'/>
264 <%include file='../changelog/changelog_summary_data.html'/>
265 </div>
265 </div>
266 </div>
266 </div>
267 </div>
267 </div>
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now