annotate rhodecode/templates/summary/summary.html @ 3655:c78de39f30fc beta

summary: redirect from repo URLs with #branchname to changelog with this branch This implements partial support for the Mercurial syntax for specifying revisions so https://secure.rhodecode.org/rhodecode/#beta works both for pulling with Mercurial and browsing. This uses javascript, and has a bit of extra support for onhashchange in HTML5 browsers.
author Mads Kiilerich <madski@unity3d.com>
date Wed, 03 Apr 2013 17:20:32 +0200
parents ec6354949623
children 79abd21d51c4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
127
20dc7a5eb748 Html changes and cleanups, made folders for html templates, implemented tags and branches pages
Marcin Kuzminski <marcin@python-works.com>
parents: 126
diff changeset
1 <%inherit file="/base/base.html"/>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
2
74
cdf4fda66dd9 Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
3 <%def name="title()">
3582
1f334a68d057 improved title consistency
Marcin Kuzminski <marcin@python-works.com>
parents: 3560
diff changeset
4 ${_('%s Summary') % c.repo_name} &middot; ${c.rhodecode_name}
74
cdf4fda66dd9 Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
5 </%def>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
6
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
7 <%def name="breadcrumbs_links()">
3532
9e677f6d34cb Fixing missing icons.
Leonardo <leo@unity3d.com>
parents: 3529
diff changeset
8 ${_('Summary')}
74
cdf4fda66dd9 Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
9 </%def>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
10
74
cdf4fda66dd9 Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
11 <%def name="page_nav()">
3603
eacd33e0c5b3 use valid options for the top menu: repositories, journal, search and admin
Mads Kiilerich <madski@unity3d.com>
parents: 3587
diff changeset
12 ${self.menu('repositories')}
74
cdf4fda66dd9 Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
13 </%def>
219
64e1125fc479 html + css changes, added icons and etc.
Marcin Kuzminski <marcin@python-works.com>
parents: 210
diff changeset
14
2413
6bef2a9f73e2 added discoverable rss/atom links in pages
Marcin Kuzminski <marcin@python-works.com>
parents: 2366
diff changeset
15 <%def name="head_extra()">
3654
ec6354949623 Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents: 3635
diff changeset
16 <link href="${h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('%s ATOM feed') % c.repo_name}" type="application/atom+xml" />
ec6354949623 Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents: 3635
diff changeset
17 <link href="${h.url('rss_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('%s RSS feed') % c.repo_name}" type="application/rss+xml" />
3655
c78de39f30fc summary: redirect from repo URLs with #branchname to changelog with this branch
Mads Kiilerich <madski@unity3d.com>
parents: 3654
diff changeset
18
c78de39f30fc summary: redirect from repo URLs with #branchname to changelog with this branch
Mads Kiilerich <madski@unity3d.com>
parents: 3654
diff changeset
19 <script>
c78de39f30fc summary: redirect from repo URLs with #branchname to changelog with this branch
Mads Kiilerich <madski@unity3d.com>
parents: 3654
diff changeset
20 redirect_hash_branch = function(){
c78de39f30fc summary: redirect from repo URLs with #branchname to changelog with this branch
Mads Kiilerich <madski@unity3d.com>
parents: 3654
diff changeset
21 var branch = window.location.hash.replace(/^#(.*)/, '$1');
c78de39f30fc summary: redirect from repo URLs with #branchname to changelog with this branch
Mads Kiilerich <madski@unity3d.com>
parents: 3654
diff changeset
22 if (branch){
c78de39f30fc summary: redirect from repo URLs with #branchname to changelog with this branch
Mads Kiilerich <madski@unity3d.com>
parents: 3654
diff changeset
23 window.location = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}"
c78de39f30fc summary: redirect from repo URLs with #branchname to changelog with this branch
Mads Kiilerich <madski@unity3d.com>
parents: 3654
diff changeset
24 .replace('__BRANCH__',branch);
c78de39f30fc summary: redirect from repo URLs with #branchname to changelog with this branch
Mads Kiilerich <madski@unity3d.com>
parents: 3654
diff changeset
25 }
c78de39f30fc summary: redirect from repo URLs with #branchname to changelog with this branch
Mads Kiilerich <madski@unity3d.com>
parents: 3654
diff changeset
26 }
c78de39f30fc summary: redirect from repo URLs with #branchname to changelog with this branch
Mads Kiilerich <madski@unity3d.com>
parents: 3654
diff changeset
27 redirect_hash_branch();
c78de39f30fc summary: redirect from repo URLs with #branchname to changelog with this branch
Mads Kiilerich <madski@unity3d.com>
parents: 3654
diff changeset
28 window.onhashchange = function() {
c78de39f30fc summary: redirect from repo URLs with #branchname to changelog with this branch
Mads Kiilerich <madski@unity3d.com>
parents: 3654
diff changeset
29 redirect_hash_branch();
c78de39f30fc summary: redirect from repo URLs with #branchname to changelog with this branch
Mads Kiilerich <madski@unity3d.com>
parents: 3654
diff changeset
30 };
c78de39f30fc summary: redirect from repo URLs with #branchname to changelog with this branch
Mads Kiilerich <madski@unity3d.com>
parents: 3654
diff changeset
31 </script>
c78de39f30fc summary: redirect from repo URLs with #branchname to changelog with this branch
Mads Kiilerich <madski@unity3d.com>
parents: 3654
diff changeset
32
2413
6bef2a9f73e2 added discoverable rss/atom links in pages
Marcin Kuzminski <marcin@python-works.com>
parents: 2366
diff changeset
33 </%def>
6bef2a9f73e2 added discoverable rss/atom links in pages
Marcin Kuzminski <marcin@python-works.com>
parents: 2366
diff changeset
34
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
35 <%def name="main()">
3552
7967d00e4692 Stylistic cleanup - mostly formatting
Mads Kiilerich <madski@unity3d.com>
parents: 3546
diff changeset
36 ${self.context_bar('summary')}
1728
07e56179633e - fixes celery sqlalchemy session issues for async forking
Marcin Kuzminski <marcin@python-works.com>
parents: 1724
diff changeset
37 <%
07e56179633e - fixes celery sqlalchemy session issues for async forking
Marcin Kuzminski <marcin@python-works.com>
parents: 1724
diff changeset
38 summary = lambda n:{False:'summary-short'}.get(n)
07e56179633e - fixes celery sqlalchemy session issues for async forking
Marcin Kuzminski <marcin@python-works.com>
parents: 1724
diff changeset
39 %>
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
40 %if c.show_stats:
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
41 <div class="box box-left">
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
42 %else:
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
43 <div class="box">
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
44 %endif
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
45 <!-- box / title -->
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
46 <div class="title">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
47 ${self.breadcrumbs()}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
48 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
49 <!-- end box / title -->
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
50 <div class="form">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
51 <div id="summary" class="fields">
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
52
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
53 <div class="field">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
54 <div class="label-summary">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
55 <label>${_('Name')}:</label>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
56 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
57 <div class="input ${summary(c.show_stats)}">
2973
9937afa7f093 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2932
diff changeset
58
2932
19ea3e16f65b add locking state icon into summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 2815
diff changeset
59 ## locking icon
19ea3e16f65b add locking state icon into summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 2815
diff changeset
60 %if c.rhodecode_db_repo.enable_locking:
19ea3e16f65b add locking state icon into summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 2815
diff changeset
61 %if c.rhodecode_db_repo.locked[0]:
2973
9937afa7f093 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2932
diff changeset
62 <span class="locking_locked tooltip" title="${_('Repository locked by %s') % h.person_by_id(c.rhodecode_db_repo.locked[0])}"></span>
2932
19ea3e16f65b add locking state icon into summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 2815
diff changeset
63 %else:
19ea3e16f65b add locking state icon into summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 2815
diff changeset
64 <span class="locking_unlocked tooltip" title="${_('Repository unlocked')}"></span>
19ea3e16f65b add locking state icon into summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 2815
diff changeset
65 %endif
2973
9937afa7f093 whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2932
diff changeset
66 %endif
1180
c5e330c4ed65 small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1171
diff changeset
67 ##REPO TYPE
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
68 %if h.is_hg(c.dbrepo):
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
69 <img style="margin-bottom:2px" class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
70 %endif
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
71 %if h.is_git(c.dbrepo):
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
72 <img style="margin-bottom:2px" class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
73 %endif
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
74
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
75 ##PUBLIC/PRIVATE
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
76 %if c.dbrepo.private:
3654
ec6354949623 Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents: 3635
diff changeset
77 <img style="margin-bottom:2px" class="icon" title="${_('Private repository')}" alt="${_('Private repository')}" src="${h.url('/images/icons/lock.png')}"/>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
78 %else:
3654
ec6354949623 Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents: 3635
diff changeset
79 <img style="margin-bottom:2px" class="icon" title="${_('Public repository')}" alt="${_('Public repository')}" src="${h.url('/images/icons/lock_open.png')}"/>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
80 %endif
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
81
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
82 ##REPO NAME
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
83 <span class="repo_name" title="${_('Non changable ID %s') % c.dbrepo.repo_id}">${h.repo_link(c.dbrepo.groups_and_repo)}</span>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
84
1180
c5e330c4ed65 small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1171
diff changeset
85 ##FORK
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
86 %if c.dbrepo.fork:
3527
87c97fcea029 Adding the context bar too all pages related to a Repository.
Leonardo <leo@unity3d.com>
parents: 3392
diff changeset
87 <div style="margin-top:5px;clear:both">
3654
ec6354949623 Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents: 3635
diff changeset
88 <a href="${h.url('summary_home',repo_name=c.dbrepo.fork.repo_name)}"><img class="icon" alt="${_('Public')}" title="${_('Fork of')} ${c.dbrepo.fork.repo_name}" src="${h.url('/images/icons/arrow_divide.png')}"/>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
89 ${_('Fork of')} ${c.dbrepo.fork.repo_name}
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
90 </a>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
91 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
92 %endif
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
93 ##REMOTE
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
94 %if c.dbrepo.clone_uri:
1180
c5e330c4ed65 small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1171
diff changeset
95 <div style="margin-top:5px;clear:both">
3654
ec6354949623 Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents: 3635
diff changeset
96 <a href="${h.url(str(h.hide_credentials(c.dbrepo.clone_uri)))}"><img class="icon" alt="${_('Remote clone')}" title="${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)}" src="${h.url('/images/icons/connect.png')}"/>
1605
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
97 ${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)}
1180
c5e330c4ed65 small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 1171
diff changeset
98 </a>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
99 </div>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
100 %endif
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
101 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
102 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
103
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
104 <div class="field">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
105 <div class="label-summary">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
106 <label>${_('Description')}:</label>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
107 </div>
2674
a221706dab50 merged + fixed pull request #62: Implemented metatags and visualisation options.
Marcin Kuzminski <marcin@python-works.com>
parents: 2606
diff changeset
108 %if c.visual.stylify_metatags:
a221706dab50 merged + fixed pull request #62: Implemented metatags and visualisation options.
Marcin Kuzminski <marcin@python-works.com>
parents: 2606
diff changeset
109 <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.desc_stylize(c.dbrepo.description))}</div>
a221706dab50 merged + fixed pull request #62: Implemented metatags and visualisation options.
Marcin Kuzminski <marcin@python-works.com>
parents: 2606
diff changeset
110 %else:
a221706dab50 merged + fixed pull request #62: Implemented metatags and visualisation options.
Marcin Kuzminski <marcin@python-works.com>
parents: 2606
diff changeset
111 <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(c.dbrepo.description)}</div>
2815
acc05c33cc0c White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2811
diff changeset
112 %endif
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
113 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
114
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
115 <div class="field">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
116 <div class="label-summary">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
117 <label>${_('Contact')}:</label>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
118 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
119 <div class="input ${summary(c.show_stats)}">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
120 <div class="gravatar">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
121 <img alt="gravatar" src="${h.gravatar_url(c.dbrepo.user.email)}"/>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
122 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
123 ${_('Username')}: ${c.dbrepo.user.username}<br/>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
124 ${_('Name')}: ${c.dbrepo.user.name} ${c.dbrepo.user.lastname}<br/>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
125 ${_('Email')}: <a href="mailto:${c.dbrepo.user.email}">${c.dbrepo.user.email}</a>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
126 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
127 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
128
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
129 <div class="field">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
130 <div class="label-summary">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
131 <label>${_('Clone url')}:</label>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
132 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
133 <div class="input ${summary(c.show_stats)}">
3635
be78bf3b1a1f added url quote in clone url. fixes issue #809
Marcin Kuzminski <marcin@python-works.com>
parents: 3629
diff changeset
134 <input style="width:${'75%' if c.show_stats else '80%'}" type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/>
be78bf3b1a1f added url quote in clone url. fixes issue #809
Marcin Kuzminski <marcin@python-works.com>
parents: 3629
diff changeset
135 <input style="display:none;width:${'75%' if c.show_stats else '80%'}" type="text" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}"/>
3286
e267b8e91db3 summary: show "Show by ID" toggler after the clone url
Mads Kiilerich <madski@unity3d.com>
parents: 3285
diff changeset
136 <div style="display:none" id="clone_by_name" class="ui-btn clone">${_('Show by Name')}</div>
1813
a8c66e870bd0 implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
137 <div id="clone_by_id" class="ui-btn clone">${_('Show by ID')}</div>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
138 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
139 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
140
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
141 <div class="field">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
142 <div class="label-summary">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
143 <label>${_('Trending files')}:</label>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
144 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
145 <div class="input ${summary(c.show_stats)}">
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
146 %if c.show_stats:
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
147 <div id="lang_stats"></div>
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
148 %else:
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
149 ${_('Statistics are disabled for this repository')}
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
150 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
1756
Marcin Kuzminski <marcin@python-works.com>
parents: 1751
diff changeset
151 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")}
1728
07e56179633e - fixes celery sqlalchemy session issues for async forking
Marcin Kuzminski <marcin@python-works.com>
parents: 1724
diff changeset
152 %endif
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
153 %endif
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
154 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
155 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
156
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
157 <div class="field">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
158 <div class="label-summary">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
159 <label>${_('Download')}:</label>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
160 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
161 <div class="input ${summary(c.show_stats)}">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
162 %if len(c.rhodecode_repo.revisions) == 0:
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
163 ${_('There are no downloads yet')}
3625
260a7a01b054 follow Python conventions for boolean values
Mads Kiilerich <madski@unity3d.com>
parents: 3603
diff changeset
164 %elif not c.enable_downloads:
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
165 ${_('Downloads are disabled for this repository')}
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
166 %if h.HasPermissionAll('hg.admin')('enable downloads on from summary'):
1756
Marcin Kuzminski <marcin@python-works.com>
parents: 1751
diff changeset
167 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")}
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
168 %endif
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
169 %else:
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
170 ${h.select('download_options',c.rhodecode_repo.get_changeset().raw_id,c.download_options)}
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
171 <span id="${'zip_link'}">${h.link_to(_('Download as zip'), h.url('files_archive_home',repo_name=c.dbrepo.repo_name,fname='tip.zip'),class_="archive_icon ui-btn")}</span>
1450
2a8bf2a3da98 fixes #214 added support for downloading subrepos in download menu.
Marcin Kuzminski <marcin@python-works.com>
parents: 1438
diff changeset
172 <span style="vertical-align: bottom">
1920
8f6c01c990dc label for "with subrepos" checkbox
Vladislav Poluhin <nuklea@gmail.com>
parents: 1908
diff changeset
173 <input id="archive_subrepos" type="checkbox" name="subrepos" />
2427
f467c75544af Added h.tooltip to all places that tooltip_title is used.
Marcin Kuzminski <marcin@python-works.com>
parents: 2424
diff changeset
174 <label for="archive_subrepos" class="tooltip" title="${h.tooltip(_('Check this to download archive with subrepos'))}" >${_('with subrepos')}</label>
1450
2a8bf2a3da98 fixes #214 added support for downloading subrepos in download menu.
Marcin Kuzminski <marcin@python-works.com>
parents: 1438
diff changeset
175 </span>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
176 %endif
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
177 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
178 </div>
3529
1c32b72930fa Addding context bar to more repo related pages.
leonardo
parents: 3527
diff changeset
179 </div>
1c32b72930fa Addding context bar to more repo related pages.
leonardo
parents: 3527
diff changeset
180 <div id="summary-menu-stats">
1c32b72930fa Addding context bar to more repo related pages.
leonardo
parents: 3527
diff changeset
181 <ul>
1c32b72930fa Addding context bar to more repo related pages.
leonardo
parents: 3527
diff changeset
182 <li>
1c32b72930fa Addding context bar to more repo related pages.
leonardo
parents: 3527
diff changeset
183 <a class="followers" title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}">
3538
9bf927589f7a Tweaks to Changelog and Summary view, removing excess information, and improving layout.
Leonardo Carneiro <leonardo@unity3d.com>
parents: 3532
diff changeset
184 ${_('Followers')}
3546
c5efdafee8fe small UI changes for dropdowns on upper menu
Marcin Kuzminski <marcin@python-works.com>
parents: 3541
diff changeset
185 <span style="float:right" id="current_followers_count">${c.repository_followers}</span>
3529
1c32b72930fa Addding context bar to more repo related pages.
leonardo
parents: 3527
diff changeset
186 </a>
1c32b72930fa Addding context bar to more repo related pages.
leonardo
parents: 3527
diff changeset
187 </li>
1c32b72930fa Addding context bar to more repo related pages.
leonardo
parents: 3527
diff changeset
188 <li>
1c32b72930fa Addding context bar to more repo related pages.
leonardo
parents: 3527
diff changeset
189 <a class="forks" title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}">
3538
9bf927589f7a Tweaks to Changelog and Summary view, removing excess information, and improving layout.
Leonardo Carneiro <leonardo@unity3d.com>
parents: 3532
diff changeset
190 ${_('Forks')}
3546
c5efdafee8fe small UI changes for dropdowns on upper menu
Marcin Kuzminski <marcin@python-works.com>
parents: 3541
diff changeset
191 <span style="float:right">${c.repository_forks}</span>
3529
1c32b72930fa Addding context bar to more repo related pages.
leonardo
parents: 3527
diff changeset
192 </a>
1c32b72930fa Addding context bar to more repo related pages.
leonardo
parents: 3527
diff changeset
193 </li>
3560
835d44dd6ed8 small ui fixes for summary info block
Marcin Kuzminski <marcin@python-works.com>
parents: 3552
diff changeset
194
835d44dd6ed8 small ui fixes for summary info block
Marcin Kuzminski <marcin@python-works.com>
parents: 3552
diff changeset
195 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
835d44dd6ed8 small ui fixes for summary info block
Marcin Kuzminski <marcin@python-works.com>
parents: 3552
diff changeset
196 <li>
835d44dd6ed8 small ui fixes for summary info block
Marcin Kuzminski <marcin@python-works.com>
parents: 3552
diff changeset
197 ${h.link_to(_('Settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}
3529
1c32b72930fa Addding context bar to more repo related pages.
leonardo
parents: 3527
diff changeset
198 </li>
3560
835d44dd6ed8 small ui fixes for summary info block
Marcin Kuzminski <marcin@python-works.com>
parents: 3552
diff changeset
199 %endif
835d44dd6ed8 small ui fixes for summary info block
Marcin Kuzminski <marcin@python-works.com>
parents: 3552
diff changeset
200
835d44dd6ed8 small ui fixes for summary info block
Marcin Kuzminski <marcin@python-works.com>
parents: 3552
diff changeset
201 <li>
835d44dd6ed8 small ui fixes for summary info block
Marcin Kuzminski <marcin@python-works.com>
parents: 3552
diff changeset
202 %if c.rhodecode_user.username != 'default':
835d44dd6ed8 small ui fixes for summary info block
Marcin Kuzminski <marcin@python-works.com>
parents: 3552
diff changeset
203 ${h.link_to(_('Feed'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key),class_='feed')}
835d44dd6ed8 small ui fixes for summary info block
Marcin Kuzminski <marcin@python-works.com>
parents: 3552
diff changeset
204 %else:
835d44dd6ed8 small ui fixes for summary info block
Marcin Kuzminski <marcin@python-works.com>
parents: 3552
diff changeset
205 ${h.link_to(_('Feed'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name),class_='feed')}
835d44dd6ed8 small ui fixes for summary info block
Marcin Kuzminski <marcin@python-works.com>
parents: 3552
diff changeset
206 %endif
835d44dd6ed8 small ui fixes for summary info block
Marcin Kuzminski <marcin@python-works.com>
parents: 3552
diff changeset
207 </li>
835d44dd6ed8 small ui fixes for summary info block
Marcin Kuzminski <marcin@python-works.com>
parents: 3552
diff changeset
208
3529
1c32b72930fa Addding context bar to more repo related pages.
leonardo
parents: 3527
diff changeset
209 %if c.rhodecode_user.username != 'default':
3538
9bf927589f7a Tweaks to Changelog and Summary view, removing excess information, and improving layout.
Leonardo Carneiro <leonardo@unity3d.com>
parents: 3532
diff changeset
210 <li class="repo_size">
3587
d56310b64bb3 i18n summary
Takumi IINO <trot.thunder@gmail.com>
parents: 3582
diff changeset
211 <a href="#" class="repo-size" onclick="javascript:showRepoSize('repo_size_2','${c.dbrepo.repo_name}','${str(h.get_token())}')">${_('Repository Size')}</a>
3529
1c32b72930fa Addding context bar to more repo related pages.
leonardo
parents: 3527
diff changeset
212 <span id="repo_size_2"></span>
1c32b72930fa Addding context bar to more repo related pages.
leonardo
parents: 3527
diff changeset
213 </li>
1c32b72930fa Addding context bar to more repo related pages.
leonardo
parents: 3527
diff changeset
214 %endif
1c32b72930fa Addding context bar to more repo related pages.
leonardo
parents: 3527
diff changeset
215 </ul>
1c32b72930fa Addding context bar to more repo related pages.
leonardo
parents: 3527
diff changeset
216 </div>
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
217 </div>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
218 </div>
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
219
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
220 %if c.show_stats:
410
9a7ae16ff53e fixes translations, style updates.
Marcin Kuzminski <marcin@python-works.com>
parents: 409
diff changeset
221 <div class="box box-right" style="min-height:455px">
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
222 <!-- box / title -->
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
223 <div class="title">
493
2256c78afe53 implemented basic autoupdating statistics fetched from database
Marcin Kuzminski <marcin@python-works.com>
parents: 489
diff changeset
224 <h5>${_('Commit activity by day / author')}</h5>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
225 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
226
1247
4d195ad0ff03 made rhodecode compatible with 1024px displays
Marcin Kuzminski <marcin@python-works.com>
parents: 1244
diff changeset
227 <div class="graph">
1981
518f87919375 UI: percentage of stats gathered doesn't seem like important enough to need a large font
Aras Pranckevicius <aras@unity3d.com>
parents: 1959
diff changeset
228 <div style="padding:0 10px 10px 17px;">
800
e41aacb6aa18 small fixes for summary graph, added message about no data for the graph, when empty
Marcin Kuzminski <marcin@python-works.com>
parents: 793
diff changeset
229 %if c.no_data:
1181
36b12336cb7f added percentage of progress of gathered commit activity statistics
Marcin Kuzminski <marcin@python-works.com>
parents: 1180
diff changeset
230 ${c.no_data_msg}
917
de8b95f461f6 enabled quick link to enabling statistics in admin page, for admins
Marcin Kuzminski <marcin@python-works.com>
parents: 872
diff changeset
231 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
1756
Marcin Kuzminski <marcin@python-works.com>
parents: 1751
diff changeset
232 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-btn")}
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
233 %endif
1181
36b12336cb7f added percentage of progress of gathered commit activity statistics
Marcin Kuzminski <marcin@python-works.com>
parents: 1180
diff changeset
234 %else:
1981
518f87919375 UI: percentage of stats gathered doesn't seem like important enough to need a large font
Aras Pranckevicius <aras@unity3d.com>
parents: 1959
diff changeset
235 ${_('Stats gathered: ')} ${c.stats_percentage}%
1181
36b12336cb7f added percentage of progress of gathered commit activity statistics
Marcin Kuzminski <marcin@python-works.com>
parents: 1180
diff changeset
236 %endif
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
237 </div>
1247
4d195ad0ff03 made rhodecode compatible with 1024px displays
Marcin Kuzminski <marcin@python-works.com>
parents: 1244
diff changeset
238 <div id="commit_history" style="width:450px;height:300px;float:left"></div>
486
5c376ac2d4c9 rewrote graph plotting, added zooming and json dump insted of stupid string formating.
Marcin Kuzminski <marcin@python-works.com>
parents: 480
diff changeset
239 <div style="clear: both;height: 10px"></div>
1247
4d195ad0ff03 made rhodecode compatible with 1024px displays
Marcin Kuzminski <marcin@python-works.com>
parents: 1244
diff changeset
240 <div id="overview" style="width:450px;height:100px;float:left"></div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
241
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
242 <div id="legend_data" style="clear:both;margin-top:10px;">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
243 <div id="legend_container"></div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
244 <div id="legend_choices">
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
245 <table id="legend_choices_tables" class="noborder" style="font-size:smaller;color:#545454"></table>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
246 </div>
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
247 </div>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
248 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
249 </div>
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
250 %endif
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
251
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
252 <div class="box">
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
253 <div class="title">
1736
e2d76554d2c6 added quickstart page for new repos
Marcin Kuzminski <marcin@python-works.com>
parents: 1728
diff changeset
254 <div class="breadcrumbs">
e2d76554d2c6 added quickstart page for new repos
Marcin Kuzminski <marcin@python-works.com>
parents: 1728
diff changeset
255 %if c.repo_changesets:
3285
6aae03fa3fee summary: "shortlog" is not a word ... and the changelog is always better
Mads Kiilerich <madski@unity3d.com>
parents: 3267
diff changeset
256 ${h.link_to(_('Latest changes'),h.url('changelog_home',repo_name=c.repo_name))}
1736
e2d76554d2c6 added quickstart page for new repos
Marcin Kuzminski <marcin@python-works.com>
parents: 1728
diff changeset
257 %else:
e2d76554d2c6 added quickstart page for new repos
Marcin Kuzminski <marcin@python-works.com>
parents: 1728
diff changeset
258 ${_('Quick start')}
e2d76554d2c6 added quickstart page for new repos
Marcin Kuzminski <marcin@python-works.com>
parents: 1728
diff changeset
259 %endif
e2d76554d2c6 added quickstart page for new repos
Marcin Kuzminski <marcin@python-works.com>
parents: 1728
diff changeset
260 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
261 </div>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
262 <div class="table">
637
b04d5214fd3c removed shortlog from main menu, as duplicated functionality of changelog,
Marcin Kuzminski <marcin@python-works.com>
parents: 636
diff changeset
263 <div id="shortlog_data">
b04d5214fd3c removed shortlog from main menu, as duplicated functionality of changelog,
Marcin Kuzminski <marcin@python-works.com>
parents: 636
diff changeset
264 <%include file='../shortlog/shortlog_data.html'/>
b04d5214fd3c removed shortlog from main menu, as duplicated functionality of changelog,
Marcin Kuzminski <marcin@python-works.com>
parents: 636
diff changeset
265 </div>
1605
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
266 </div>
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
267 </div>
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
268
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
269 %if c.readme_data:
2990
0bc7b5895242 small anchor cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2973
diff changeset
270 <div id="readme" class="anchor">
0bc7b5895242 small anchor cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2973
diff changeset
271 <div class="box" style="background-color: #FAFAFA">
0bc7b5895242 small anchor cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2973
diff changeset
272 <div class="title" title="${_("Readme file at revision '%s'" % c.rhodecode_db_repo.landing_rev)}">
2606
59fab1f641bf added readme permalink
Marcin Kuzminski <marcin@python-works.com>
parents: 2603
diff changeset
273 <div class="breadcrumbs">
59fab1f641bf added readme permalink
Marcin Kuzminski <marcin@python-works.com>
parents: 2603
diff changeset
274 <a href="${h.url('files_home',repo_name=c.repo_name,revision='tip',f_path=c.readme_file)}">${c.readme_file}</a>
59fab1f641bf added readme permalink
Marcin Kuzminski <marcin@python-works.com>
parents: 2603
diff changeset
275 <a class="permalink" href="#readme" title="${_('Permalink to this readme')}">&para;</a>
59fab1f641bf added readme permalink
Marcin Kuzminski <marcin@python-works.com>
parents: 2603
diff changeset
276 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
277 </div>
2990
0bc7b5895242 small anchor cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2973
diff changeset
278 <div class="readme">
1605
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
279 <div class="readme_box">
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
280 ${c.readme_data|n}
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
281 </div>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
282 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
283 </div>
2990
0bc7b5895242 small anchor cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2973
diff changeset
284 </div>
1605
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
285 %endif
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
286
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
287 <script type="text/javascript">
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
288 var clone_url = 'clone_url';
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
289 YUE.on(clone_url,'click',function(e){
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
290 if(YUD.hasClass(clone_url,'selected')){
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
291 return
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
292 }
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
293 else{
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
294 YUD.addClass(clone_url,'selected');
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
295 YUD.get(clone_url).select();
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
296 }
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
297 })
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
298
1813
a8c66e870bd0 implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
299 YUE.on('clone_by_name','click',function(e){
a8c66e870bd0 implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
300 // show url by name and hide name button
a8c66e870bd0 implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
301 YUD.setStyle('clone_url','display','');
a8c66e870bd0 implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
302 YUD.setStyle('clone_by_name','display','none');
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
303
1813
a8c66e870bd0 implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
304 // hide url by id and show name button
a8c66e870bd0 implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
305 YUD.setStyle('clone_by_id','display','');
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
306 YUD.setStyle('clone_url_id','display','none');
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
307
1813
a8c66e870bd0 implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
308 })
a8c66e870bd0 implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
309 YUE.on('clone_by_id','click',function(e){
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
310
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
311 // show url by id and hide id button
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
312 YUD.setStyle('clone_by_id','display','none');
1813
a8c66e870bd0 implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
313 YUD.setStyle('clone_url_id','display','');
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
314
1813
a8c66e870bd0 implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
315 // hide url by name and show id button
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
316 YUD.setStyle('clone_by_name','display','');
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
317 YUD.setStyle('clone_url','display','none');
1813
a8c66e870bd0 implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
318 })
a8c66e870bd0 implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
319
a8c66e870bd0 implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents: 1756
diff changeset
320
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
321 var tmpl_links = {};
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
322 %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()):
1756
Marcin Kuzminski <marcin@python-works.com>
parents: 1751
diff changeset
323 tmpl_links["${archive['type']}"] = '${h.link_to('__NAME__', h.url('files_archive_home',repo_name=c.dbrepo.repo_name, fname='__CS__'+archive['extension'],subrepos='__SUB__'),class_='archive_icon ui-btn')}';
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
324 %endfor
1605
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
325
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
326 YUE.on(['download_options','archive_subrepos'],'change',function(e){
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
327 var sm = YUD.get('download_options');
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
328 var new_cs = sm.options[sm.selectedIndex];
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
329
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
330 for(k in tmpl_links){
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
331 var s = YUD.get(k+'_link');
1751
47c2a006d43b Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents: 1748
diff changeset
332 if(s){
47c2a006d43b Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents: 1748
diff changeset
333 var title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__','__CS_EXT__')}";
47c2a006d43b Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents: 1748
diff changeset
334 title_tmpl= title_tmpl.replace('__CS_NAME__',new_cs.text);
47c2a006d43b Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents: 1748
diff changeset
335 title_tmpl = title_tmpl.replace('__CS_EXT__',k);
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
336
1751
47c2a006d43b Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents: 1748
diff changeset
337 var url = tmpl_links[k].replace('__CS__',new_cs.value);
47c2a006d43b Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents: 1748
diff changeset
338 var subrepos = YUD.get('archive_subrepos').checked;
47c2a006d43b Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents: 1748
diff changeset
339 url = url.replace('__SUB__',subrepos);
47c2a006d43b Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents: 1748
diff changeset
340 url = url.replace('__NAME__',title_tmpl);
47c2a006d43b Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents: 1748
diff changeset
341 s.innerHTML = url
47c2a006d43b Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents: 1748
diff changeset
342 }
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
343 }
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
344 });
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
345 </script>
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
346 %if c.show_stats:
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
347 <script type="text/javascript">
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
348 var data = ${c.trending_languages|n};
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
349 var total = 0;
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
350 var no_data = true;
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
351 var tbl = document.createElement('table');
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
352 tbl.setAttribute('class','trending_language_tbl');
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
353 var cnt = 0;
1890
a3efaaa6ed4f fixes issue #271
Marcin Kuzminski <marcin@python-works.com>
parents: 1888
diff changeset
354 for (var i=0;i<data.length;i++){
3197
b4f401524060 html: don't use tabs
Mads Kiilerich <madski@unity3d.com>
parents: 2990
diff changeset
355 total+= data[i][1].count;
1940
ef23fa832ab2 fixed percentage in stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1922
diff changeset
356 }
ef23fa832ab2 fixed percentage in stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1922
diff changeset
357 for (var i=0;i<data.length;i++){
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
358 cnt += 1;
1890
a3efaaa6ed4f fixes issue #271
Marcin Kuzminski <marcin@python-works.com>
parents: 1888
diff changeset
359 no_data = false;
1908
b3a3890b7160 code garden
Marcin Kuzminski <marcin@python-works.com>
parents: 1890
diff changeset
360
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
361 var hide = cnt>2;
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
362 var tr = document.createElement('tr');
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
363 if (hide){
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
364 tr.setAttribute('style','display:none');
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
365 tr.setAttribute('class','stats_hidden');
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
366 }
1890
a3efaaa6ed4f fixes issue #271
Marcin Kuzminski <marcin@python-works.com>
parents: 1888
diff changeset
367 var k = data[i][0];
a3efaaa6ed4f fixes issue #271
Marcin Kuzminski <marcin@python-works.com>
parents: 1888
diff changeset
368 var obj = data[i][1];
a3efaaa6ed4f fixes issue #271
Marcin Kuzminski <marcin@python-works.com>
parents: 1888
diff changeset
369 var percentage = Math.round((obj.count/total*100),2);
1908
b3a3890b7160 code garden
Marcin Kuzminski <marcin@python-works.com>
parents: 1890
diff changeset
370
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
371 var td1 = document.createElement('td');
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
372 td1.width = 150;
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
373 var trending_language_label = document.createElement('div');
1890
a3efaaa6ed4f fixes issue #271
Marcin Kuzminski <marcin@python-works.com>
parents: 1888
diff changeset
374 trending_language_label.innerHTML = obj.desc+" ("+k+")";
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
375 td1.appendChild(trending_language_label);
1605
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
376
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
377 var td2 = document.createElement('td');
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
378 td2.setAttribute('style','padding-right:14px !important');
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
379 var trending_language = document.createElement('div');
1890
a3efaaa6ed4f fixes issue #271
Marcin Kuzminski <marcin@python-works.com>
parents: 1888
diff changeset
380 var nr_files = obj.count+" ${_('files')}";
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
381
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
382 trending_language.title = k+" "+nr_files;
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
383
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
384 if (percentage>22){
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
385 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"% "+nr_files+ "</b>";
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
386 }
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
387 else{
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
388 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"%</b>";
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
389 }
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
390
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
391 trending_language.setAttribute("class", 'trending_language top-right-rounded-corner bottom-right-rounded-corner');
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
392 trending_language.style.width=percentage+"%";
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
393 td2.appendChild(trending_language);
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
394
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
395 tr.appendChild(td1);
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
396 tr.appendChild(td2);
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
397 tbl.appendChild(tr);
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
398 if(cnt == 3){
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
399 var show_more = document.createElement('tr');
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
400 var td = document.createElement('td');
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
401 lnk = document.createElement('a');
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
402
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
403 lnk.href='#';
3654
ec6354949623 Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents: 3635
diff changeset
404 lnk.innerHTML = "${_('Show more')}";
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
405 lnk.id='code_stats_show_more';
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
406 td.appendChild(lnk);
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
407
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
408 show_more.appendChild(td);
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
409 show_more.appendChild(document.createElement('td'));
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
410 tbl.appendChild(show_more);
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
411 }
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
412
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
413 }
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
414
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
415 YUD.get('lang_stats').appendChild(tbl);
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
416 YUE.on('code_stats_show_more','click',function(){
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
417 l = YUD.getElementsByClassName('stats_hidden')
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
418 for (e in l){
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
419 YUD.setStyle(l[e],'display','');
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
420 };
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
421 YUD.setStyle(YUD.get('code_stats_show_more'),
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
422 'display','none');
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
423 });
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
424 </script>
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
425 <script type="text/javascript">
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
426 /**
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
427 * Plots summary graph
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
428 *
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
429 * @class SummaryPlot
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
430 * @param {from} initial from for detailed graph
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
431 * @param {to} initial to for detailed graph
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
432 * @param {dataset}
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
433 * @param {overview_dataset}
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
434 */
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
435 function SummaryPlot(from,to,dataset,overview_dataset) {
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
436 var initial_ranges = {
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
437 "xaxis":{
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
438 "from":from,
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
439 "to":to,
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
440 },
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
441 };
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
442 var dataset = dataset;
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
443 var overview_dataset = [overview_dataset];
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
444 var choiceContainer = YUD.get("legend_choices");
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
445 var choiceContainerTable = YUD.get("legend_choices_tables");
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
446 var plotContainer = YUD.get('commit_history');
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
447 var overviewContainer = YUD.get('overview');
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
448
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
449 var plot_options = {
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
450 bars: {show:true,align:'center',lineWidth:4},
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
451 legend: {show:true, container:"legend_container"},
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
452 points: {show:true,radius:0,fill:false},
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
453 yaxis: {tickDecimals:0,},
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
454 xaxis: {
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
455 mode: "time",
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
456 timeformat: "%d/%m",
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
457 min:from,
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
458 max:to,
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
459 },
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
460 grid: {
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
461 hoverable: true,
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
462 clickable: true,
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
463 autoHighlight:true,
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
464 color: "#999"
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
465 },
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
466 //selection: {mode: "x"}
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
467 };
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
468 var overview_options = {
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
469 legend:{show:false},
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
470 bars: {show:true,barWidth: 2,},
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
471 shadowSize: 0,
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
472 xaxis: {mode: "time", timeformat: "%d/%m/%y",},
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
473 yaxis: {ticks: 3, min: 0,tickDecimals:0,},
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
474 grid: {color: "#999",},
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
475 selection: {mode: "x"}
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
476 };
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
477
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
478 /**
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
479 *get dummy data needed in few places
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
480 */
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
481 function getDummyData(label){
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
482 return {"label":label,
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
483 "data":[{"time":0,
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
484 "commits":0,
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
485 "added":0,
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
486 "changed":0,
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
487 "removed":0,
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
488 }],
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
489 "schema":["commits"],
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
490 "color":'#ffffff',
1605
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
491 }
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
492 }
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
493
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
494 /**
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
495 * generate checkboxes accordindly to data
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
496 * @param keys
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
497 * @returns
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
498 */
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
499 function generateCheckboxes(data) {
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
500 //append checkboxes
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
501 var i = 0;
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
502 choiceContainerTable.innerHTML = '';
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
503 for(var pos in data) {
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
504
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
505 data[pos].color = i;
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
506 i++;
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
507 if(data[pos].label != ''){
1922
0ef681e3ff66 labels "commit activity" using format
Vladislav Poluhin <nuklea@gmail.com>
parents: 1921
diff changeset
508 choiceContainerTable.innerHTML +=
0ef681e3ff66 labels "commit activity" using format
Vladislav Poluhin <nuklea@gmail.com>
parents: 1921
diff changeset
509 '<tr><td><input type="checkbox" id="id_user_{0}" name="{0}" checked="checked" /> \
0ef681e3ff66 labels "commit activity" using format
Vladislav Poluhin <nuklea@gmail.com>
parents: 1921
diff changeset
510 <label for="id_user_{0}">{0}</label></td></tr>'.format(data[pos].label);
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
511 }
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
512 }
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
513 }
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
514
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
515 /**
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
516 * ToolTip show
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
517 */
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
518 function showTooltip(x, y, contents) {
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
519 var div=document.getElementById('tooltip');
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
520 if(!div) {
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
521 div = document.createElement('div');
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
522 div.id="tooltip";
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
523 div.style.position="absolute";
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
524 div.style.border='1px solid #fdd';
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
525 div.style.padding='2px';
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
526 div.style.backgroundColor='#fee';
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
527 document.body.appendChild(div);
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
528 }
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
529 YUD.setStyle(div, 'opacity', 0);
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
530 div.innerHTML = contents;
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
531 div.style.top=(y + 5) + "px";
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
532 div.style.left=(x + 5) + "px";
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
533
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
534 var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2);
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
535 anim.animate();
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
536 }
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
537
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
538 /**
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
539 * This function will detect if selected period has some changesets
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
540 for this user if it does this data is then pushed for displaying
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
541 Additionally it will only display users that are selected by the checkbox
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
542 */
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
543 function getDataAccordingToRanges(ranges) {
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
544
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
545 var data = [];
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
546 var new_dataset = {};
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
547 var keys = [];
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
548 var max_commits = 0;
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
549 for(var key in dataset){
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
550
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
551 for(var ds in dataset[key].data){
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
552 commit_data = dataset[key].data[ds];
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
553 if (commit_data.time >= ranges.xaxis.from && commit_data.time <= ranges.xaxis.to){
1605
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
554
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
555 if(new_dataset[key] === undefined){
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
556 new_dataset[key] = {data:[],schema:["commits"],label:key};
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
557 }
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
558 new_dataset[key].data.push(commit_data);
1605
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
559 }
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
560 }
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
561 if (new_dataset[key] !== undefined){
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
562 data.push(new_dataset[key]);
1605
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
563 }
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
564 }
1605
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
565
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
566 if (data.length > 0){
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
567 return data;
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
568 }
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
569 else{
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
570 //just return dummy data for graph to plot itself
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
571 return [getDummyData('')];
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
572 }
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
573 }
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
574
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
575 /**
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
576 * redraw using new checkbox data
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
577 */
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
578 function plotchoiced(e,args){
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
579 var cur_data = args[0];
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
580 var cur_ranges = args[1];
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
581
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
582 var new_data = [];
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
583 var inputs = choiceContainer.getElementsByTagName("input");
1605
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
584
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
585 //show only checked labels
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
586 for(var i=0; i<inputs.length; i++) {
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
587 var checkbox_key = inputs[i].name;
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
588
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
589 if(inputs[i].checked){
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
590 for(var d in cur_data){
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
591 if(cur_data[d].label == checkbox_key){
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
592 new_data.push(cur_data[d]);
1605
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
593 }
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
594 }
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
595 }
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
596 else{
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
597 //push dummy data to not hide the label
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
598 new_data.push(getDummyData(checkbox_key));
1605
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
599 }
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
600 }
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
601
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
602 var new_options = YAHOO.lang.merge(plot_options, {
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
603 xaxis: {
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
604 min: cur_ranges.xaxis.from,
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
605 max: cur_ranges.xaxis.to,
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
606 mode:"time",
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
607 timeformat: "%d/%m",
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
608 },
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
609 });
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
610 if (!new_data){
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
611 new_data = [[0,1]];
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
612 }
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
613 // do the zooming
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
614 plot = YAHOO.widget.Flot(plotContainer, new_data, new_options);
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
615
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
616 plot.subscribe("plotselected", plotselected);
1605
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
617
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
618 //resubscribe plothover
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
619 plot.subscribe("plothover", plothover);
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
620
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
621 // don't fire event on the overview to prevent eternal loop
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
622 overview.setSelection(cur_ranges, true);
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
623
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
624 }
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
625
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
626 /**
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
627 * plot only selected items from overview
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
628 * @param ranges
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
629 * @returns
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
630 */
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
631 function plotselected(ranges,cur_data) {
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
632 //updates the data for new plot
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
633 var data = getDataAccordingToRanges(ranges);
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
634 generateCheckboxes(data);
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
635
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
636 var new_options = YAHOO.lang.merge(plot_options, {
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
637 xaxis: {
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
638 min: ranges.xaxis.from,
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
639 max: ranges.xaxis.to,
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
640 mode:"time",
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
641 timeformat: "%d/%m",
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
642 },
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
643 });
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
644 // do the zooming
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
645 plot = YAHOO.widget.Flot(plotContainer, data, new_options);
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
646
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
647 plot.subscribe("plotselected", plotselected);
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
648
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
649 //resubscribe plothover
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
650 plot.subscribe("plothover", plothover);
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
651
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
652 // don't fire event on the overview to prevent eternal loop
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
653 overview.setSelection(ranges, true);
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
654
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
655 //resubscribe choiced
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
656 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, ranges]);
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
657 }
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
658
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
659 var previousPoint = null;
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
660
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
661 function plothover(o) {
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
662 var pos = o.pos;
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
663 var item = o.item;
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
664
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
665 //YUD.get("x").innerHTML = pos.x.toFixed(2);
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
666 //YUD.get("y").innerHTML = pos.y.toFixed(2);
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
667 if (item) {
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
668 if (previousPoint != item.datapoint) {
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
669 previousPoint = item.datapoint;
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
670
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
671 var tooltip = YUD.get("tooltip");
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
672 if(tooltip) {
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
673 tooltip.parentNode.removeChild(tooltip);
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
674 }
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
675 var x = item.datapoint.x.toFixed(2);
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
676 var y = item.datapoint.y.toFixed(2);
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
677
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
678 if (!item.series.label){
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
679 item.series.label = 'commits';
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
680 }
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
681 var d = new Date(x*1000);
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
682 var fd = d.toDateString()
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
683 var nr_commits = parseInt(y);
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
684
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
685 var cur_data = dataset[item.series.label].data[item.dataIndex];
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
686 var added = cur_data.added;
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
687 var changed = cur_data.changed;
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
688 var removed = cur_data.removed;
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
689
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
690 var nr_commits_suffix = " ${_('commits')} ";
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
691 var added_suffix = " ${_('files added')} ";
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
692 var changed_suffix = " ${_('files changed')} ";
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
693 var removed_suffix = " ${_('files removed')} ";
1605
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
694
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
695 if(nr_commits == 1){nr_commits_suffix = " ${_('commit')} ";}
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
696 if(added==1){added_suffix=" ${_('file added')} ";}
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
697 if(changed==1){changed_suffix=" ${_('file changed')} ";}
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
698 if(removed==1){removed_suffix=" ${_('file removed')} ";}
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
699
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
700 showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
701 +'<br/>'+
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
702 nr_commits + nr_commits_suffix+'<br/>'+
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
703 added + added_suffix +'<br/>'+
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
704 changed + changed_suffix + '<br/>'+
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
705 removed + removed_suffix + '<br/>');
1605
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
706 }
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
707 }
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
708 else {
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
709 var tooltip = YUD.get("tooltip");
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
710
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
711 if(tooltip) {
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
712 tooltip.parentNode.removeChild(tooltip);
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
713 }
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
714 previousPoint = null;
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
715 }
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
716 }
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
717
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
718 /**
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
719 * MAIN EXECUTION
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
720 */
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
721
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
722 var data = getDataAccordingToRanges(initial_ranges);
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
723 generateCheckboxes(data);
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
724
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
725 //main plot
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
726 var plot = YAHOO.widget.Flot(plotContainer,data,plot_options);
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
727
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
728 //overview
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
729 var overview = YAHOO.widget.Flot(overviewContainer,
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
730 overview_dataset, overview_options);
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
731
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
732 //show initial selection on overview
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
733 overview.setSelection(initial_ranges);
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
734
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
735 plot.subscribe("plotselected", plotselected);
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
736 plot.subscribe("plothover", plothover)
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
737
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
738 overview.subscribe("plotselected", function (ranges) {
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
739 plot.setSelection(ranges);
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
740 });
1605
df59c0503636 implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents: 1553
diff changeset
741
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
742 // user choices on overview
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
743 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, initial_ranges]);
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
744 }
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
745 SummaryPlot(${c.ts_min},${c.ts_max},${c.commit_data|n},${c.overview_data|n});
1719
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
746 </script>
4a28aff31a15 optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents: 1605
diff changeset
747 %endif
74
cdf4fda66dd9 Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
748
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1813
diff changeset
749 </%def>