Mercurial > kallithea
annotate rhodecode/templates/summary/summary.html @ 3046:be781af446af beta
bring back cached Repo() instance due to some other issues it generated
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 29 Nov 2012 21:35:59 +0100 |
parents | 0bc7b5895242 |
children | a5f0bc867edc b4f401524060 |
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()"> |
2417
76d156bef5a2
Better i18n for page titles.
Vincent Duvert <vincent@duvert.net>
parents:
2415
diff
changeset
|
4 ${_('%s Summary') % c.repo_name} - ${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()"> |
2492
79818f546538
i18n 'Home' in breadcrumbs
Takumi IINO <trot.thunder@gmail.com>
parents:
2427
diff
changeset
|
8 ${h.link_to(_(u'Home'),h.url('/'))} |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
9 » |
2811
b1467856a638
#551 show breadcrumbs in summary view for repositories inside a group
Marcin Kuzminski <marcin@python-works.com>
parents:
2674
diff
changeset
|
10 ${h.repo_link(c.dbrepo.groups_and_repo)} |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
11 » |
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
|
12 ${_('summary')} |
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> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
14 |
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
|
15 <%def name="page_nav()"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
16 ${self.menu('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
|
17 </%def> |
219
64e1125fc479
html + css changes, added icons and etc.
Marcin Kuzminski <marcin@python-works.com>
parents:
210
diff
changeset
|
18 |
2413
6bef2a9f73e2
added discoverable rss/atom links in pages
Marcin Kuzminski <marcin@python-works.com>
parents:
2366
diff
changeset
|
19 <%def name="head_extra()"> |
6bef2a9f73e2
added discoverable rss/atom links in pages
Marcin Kuzminski <marcin@python-works.com>
parents:
2366
diff
changeset
|
20 <link href="${h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('repo %s ATOM feed') % c.repo_name}" type="application/atom+xml" /> |
6bef2a9f73e2
added discoverable rss/atom links in pages
Marcin Kuzminski <marcin@python-works.com>
parents:
2366
diff
changeset
|
21 <link href="${h.url('rss_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('repo %s RSS feed') % c.repo_name}" type="application/rss+xml" /> |
6bef2a9f73e2
added discoverable rss/atom links in pages
Marcin Kuzminski <marcin@python-works.com>
parents:
2366
diff
changeset
|
22 </%def> |
6bef2a9f73e2
added discoverable rss/atom links in pages
Marcin Kuzminski <marcin@python-works.com>
parents:
2366
diff
changeset
|
23 |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
24 <%def name="main()"> |
1728
07e56179633e
- fixes celery sqlalchemy session issues for async forking
Marcin Kuzminski <marcin@python-works.com>
parents:
1724
diff
changeset
|
25 <% |
07e56179633e
- fixes celery sqlalchemy session issues for async forking
Marcin Kuzminski <marcin@python-works.com>
parents:
1724
diff
changeset
|
26 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
|
27 %> |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
28 %if c.show_stats: |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
29 <div class="box box-left"> |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
30 %else: |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
31 <div class="box"> |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
32 %endif |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
33 <!-- box / title --> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
34 <div class="title"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
35 ${self.breadcrumbs()} |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
36 </div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
37 <!-- end box / title --> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
38 <div class="form"> |
1310
4d37c3f2a410
fixed white-space formatting for description in summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
1281
diff
changeset
|
39 <div id="summary" class="fields"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
40 |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
41 <div class="field"> |
1721
05dbebede0d8
css fixes for new summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
1719
diff
changeset
|
42 <div class="label-summary"> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
43 <label>${_('Name')}:</label> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
44 </div> |
1728
07e56179633e
- fixes celery sqlalchemy session issues for async forking
Marcin Kuzminski <marcin@python-works.com>
parents:
1724
diff
changeset
|
45 <div class="input ${summary(c.show_stats)}"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
46 <div style="float:right;padding:5px 0px 0px 5px"> |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
47 %if c.rhodecode_user.username != 'default': |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
48 ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key),class_='rss_icon')} |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
49 ${h.link_to(_('ATOM'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name,api_key=c.rhodecode_user.api_key),class_='atom_icon')} |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
50 %else: |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
51 ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.dbrepo.repo_name),class_='rss_icon')} |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
52 ${h.link_to(_('ATOM'),h.url('atom_feed_home',repo_name=c.dbrepo.repo_name),class_='atom_icon')} |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
53 %endif |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
54 </div> |
1171
2ab211e0aecd
changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents:
1124
diff
changeset
|
55 %if c.rhodecode_user.username != 'default': |
2ab211e0aecd
changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents:
1124
diff
changeset
|
56 %if c.following: |
2932
19ea3e16f65b
add locking state icon into summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
2815
diff
changeset
|
57 <span id="follow_toggle" class="following tooltip" title="${_('Stop following this repository')}" |
1171
2ab211e0aecd
changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents:
1124
diff
changeset
|
58 onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
59 </span> |
1171
2ab211e0aecd
changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents:
1124
diff
changeset
|
60 %else: |
2932
19ea3e16f65b
add locking state icon into summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
2815
diff
changeset
|
61 <span id="follow_toggle" class="follow tooltip" title="${_('Start following this repository')}" |
1171
2ab211e0aecd
changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents:
1124
diff
changeset
|
62 onclick="javascript:toggleFollowingRepo(this,${c.dbrepo.repo_id},'${str(h.get_token())}')"> |
2ab211e0aecd
changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents:
1124
diff
changeset
|
63 </span> |
2ab211e0aecd
changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents:
1124
diff
changeset
|
64 %endif |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
65 %endif: |
2973
9937afa7f093
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2932
diff
changeset
|
66 |
2932
19ea3e16f65b
add locking state icon into summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
2815
diff
changeset
|
67 ## locking icon |
19ea3e16f65b
add locking state icon into summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
2815
diff
changeset
|
68 %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
|
69 %if c.rhodecode_db_repo.locked[0]: |
2973
9937afa7f093
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2932
diff
changeset
|
70 <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
|
71 %else: |
19ea3e16f65b
add locking state icon into summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
2815
diff
changeset
|
72 <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
|
73 %endif |
2973
9937afa7f093
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2932
diff
changeset
|
74 %endif |
1180
c5e330c4ed65
small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
1171
diff
changeset
|
75 ##REPO TYPE |
1959
7a7ffe24b82c
optimized speed for browsing git changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
1940
diff
changeset
|
76 %if h.is_hg(c.dbrepo): |
1547
fbc762ae3496
unified generation of repo groups choices
Marcin Kuzminski <marcin@python-works.com>
parents:
1450
diff
changeset
|
77 <img style="margin-bottom:2px" class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> |
637
b04d5214fd3c
removed shortlog from main menu, as duplicated functionality of changelog,
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
78 %endif |
1959
7a7ffe24b82c
optimized speed for browsing git changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
1940
diff
changeset
|
79 %if h.is_git(c.dbrepo): |
1547
fbc762ae3496
unified generation of repo groups choices
Marcin Kuzminski <marcin@python-works.com>
parents:
1450
diff
changeset
|
80 <img style="margin-bottom:2px" class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
81 %endif |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
82 |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
83 ##PUBLIC/PRIVATE |
1038
5554aa9c2480
another major code rafactor, reimplemented (almost from scratch)
Marcin Kuzminski <marcin@python-works.com>
parents:
999
diff
changeset
|
84 %if c.dbrepo.private: |
1547
fbc762ae3496
unified generation of repo groups choices
Marcin Kuzminski <marcin@python-works.com>
parents:
1450
diff
changeset
|
85 <img style="margin-bottom:2px" class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/> |
532
946ed2955f48
template updates, added icon to repo name showing private/public
Marcin Kuzminski <marcin@python-works.com>
parents:
531
diff
changeset
|
86 %else: |
1547
fbc762ae3496
unified generation of repo groups choices
Marcin Kuzminski <marcin@python-works.com>
parents:
1450
diff
changeset
|
87 <img style="margin-bottom:2px" class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/> |
532
946ed2955f48
template updates, added icon to repo name showing private/public
Marcin Kuzminski <marcin@python-works.com>
parents:
531
diff
changeset
|
88 %endif |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
89 |
1180
c5e330c4ed65
small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
1171
diff
changeset
|
90 ##REPO NAME |
1813
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
91 <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
|
92 |
1180
c5e330c4ed65
small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
1171
diff
changeset
|
93 ##FORK |
c5e330c4ed65
small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
1171
diff
changeset
|
94 %if c.dbrepo.fork: |
c5e330c4ed65
small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
1171
diff
changeset
|
95 <div style="margin-top:5px;clear:both""> |
1605
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
96 <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')}"/> |
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
97 ${_('Fork of')} ${c.dbrepo.fork.repo_name} |
1180
c5e330c4ed65
small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
1171
diff
changeset
|
98 </a> |
c5e330c4ed65
small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
1171
diff
changeset
|
99 </div> |
c5e330c4ed65
small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
1171
diff
changeset
|
100 %endif |
c5e330c4ed65
small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
1171
diff
changeset
|
101 ##REMOTE |
c5e330c4ed65
small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
1171
diff
changeset
|
102 %if c.dbrepo.clone_uri: |
c5e330c4ed65
small fixes to summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
1171
diff
changeset
|
103 <div style="margin-top:5px;clear:both"> |
1605
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
104 <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')}"/> |
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
105 ${_('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
|
106 </a> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
107 </div> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
108 %endif |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
109 </div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
110 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
111 |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
112 <div class="field"> |
1721
05dbebede0d8
css fixes for new summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
1719
diff
changeset
|
113 <div class="label-summary"> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
114 <label>${_('Description')}:</label> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
115 </div> |
2674
a221706dab50
merged + fixed pull request #62: Implemented metatags and visualisation options.
Marcin Kuzminski <marcin@python-works.com>
parents:
2606
diff
changeset
|
116 %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
|
117 <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
|
118 %else: |
a221706dab50
merged + fixed pull request #62: Implemented metatags and visualisation options.
Marcin Kuzminski <marcin@python-works.com>
parents:
2606
diff
changeset
|
119 <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
|
120 %endif |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
121 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
122 |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
123 <div class="field"> |
1721
05dbebede0d8
css fixes for new summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
1719
diff
changeset
|
124 <div class="label-summary"> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
125 <label>${_('Contact')}:</label> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
126 </div> |
1728
07e56179633e
- fixes celery sqlalchemy session issues for async forking
Marcin Kuzminski <marcin@python-works.com>
parents:
1724
diff
changeset
|
127 <div class="input ${summary(c.show_stats)}"> |
400
7eba3d1e4227
webhelpers import bugfix for gravatar
Marcin Kuzminski <marcin@python-works.com>
parents:
390
diff
changeset
|
128 <div class="gravatar"> |
1038
5554aa9c2480
another major code rafactor, reimplemented (almost from scratch)
Marcin Kuzminski <marcin@python-works.com>
parents:
999
diff
changeset
|
129 <img alt="gravatar" src="${h.gravatar_url(c.dbrepo.user.email)}"/> |
400
7eba3d1e4227
webhelpers import bugfix for gravatar
Marcin Kuzminski <marcin@python-works.com>
parents:
390
diff
changeset
|
130 </div> |
1038
5554aa9c2480
another major code rafactor, reimplemented (almost from scratch)
Marcin Kuzminski <marcin@python-works.com>
parents:
999
diff
changeset
|
131 ${_('Username')}: ${c.dbrepo.user.username}<br/> |
5554aa9c2480
another major code rafactor, reimplemented (almost from scratch)
Marcin Kuzminski <marcin@python-works.com>
parents:
999
diff
changeset
|
132 ${_('Name')}: ${c.dbrepo.user.name} ${c.dbrepo.user.lastname}<br/> |
5554aa9c2480
another major code rafactor, reimplemented (almost from scratch)
Marcin Kuzminski <marcin@python-works.com>
parents:
999
diff
changeset
|
133 ${_('Email')}: <a href="mailto:${c.dbrepo.user.email}">${c.dbrepo.user.email}</a> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
134 </div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
135 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
136 |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
137 <div class="field"> |
1721
05dbebede0d8
css fixes for new summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
1719
diff
changeset
|
138 <div class="label-summary"> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
139 <label>${_('Clone url')}:</label> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
140 </div> |
1728
07e56179633e
- fixes celery sqlalchemy session issues for async forking
Marcin Kuzminski <marcin@python-works.com>
parents:
1724
diff
changeset
|
141 <div class="input ${summary(c.show_stats)}"> |
1813
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
142 <div style="display:none" id="clone_by_name" class="ui-btn clone">${_('Show by Name')}</div> |
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
143 <div id="clone_by_id" class="ui-btn clone">${_('Show by ID')}</div> |
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
144 <input style="width:80%;margin-left:105px" type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/> |
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
145 <input style="display:none;width:80%;margin-left:105px" type="text" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}"/> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
146 </div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
147 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
148 |
506
d5efb83590ef
fixed lock decorator bug which didn't release the lock after func execution and rewrote the pidlock a little with Ask Solem suggestions!
Marcin Kuzminski <marcin@python-works.com>
parents:
493
diff
changeset
|
149 <div class="field"> |
1721
05dbebede0d8
css fixes for new summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
1719
diff
changeset
|
150 <div class="label-summary"> |
1724
9126e8ca276d
some small optimizations on summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
1721
diff
changeset
|
151 <label>${_('Trending files')}:</label> |
506
d5efb83590ef
fixed lock decorator bug which didn't release the lock after func execution and rewrote the pidlock a little with Ask Solem suggestions!
Marcin Kuzminski <marcin@python-works.com>
parents:
493
diff
changeset
|
152 </div> |
1728
07e56179633e
- fixes celery sqlalchemy session issues for async forking
Marcin Kuzminski <marcin@python-works.com>
parents:
1724
diff
changeset
|
153 <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
|
154 %if c.show_stats: |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
155 <div id="lang_stats"></div> |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
156 %else: |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
157 ${_('Statistics are disabled for this repository')} |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
158 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'): |
1756 | 159 ${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
|
160 %endif |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
161 %endif |
942
32318ec7bfc1
added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents:
917
diff
changeset
|
162 </div> |
32318ec7bfc1
added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents:
917
diff
changeset
|
163 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
164 |
942
32318ec7bfc1
added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents:
917
diff
changeset
|
165 <div class="field"> |
1721
05dbebede0d8
css fixes for new summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
1719
diff
changeset
|
166 <div class="label-summary"> |
942
32318ec7bfc1
added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents:
917
diff
changeset
|
167 <label>${_('Download')}:</label> |
32318ec7bfc1
added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents:
917
diff
changeset
|
168 </div> |
1728
07e56179633e
- fixes celery sqlalchemy session issues for async forking
Marcin Kuzminski <marcin@python-works.com>
parents:
1724
diff
changeset
|
169 <div class="input ${summary(c.show_stats)}"> |
1171
2ab211e0aecd
changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents:
1124
diff
changeset
|
170 %if len(c.rhodecode_repo.revisions) == 0: |
945
05b59c48556f
fixed error when trying to make download on empty repository
Marcin Kuzminski <marcin@python-works.com>
parents:
944
diff
changeset
|
171 ${_('There are no downloads yet')} |
962
72f008ed9b18
implemented #84 downloads can be enabled/disabled per each repository from now.
Marcin Kuzminski <marcin@python-works.com>
parents:
945
diff
changeset
|
172 %elif c.enable_downloads is False: |
72f008ed9b18
implemented #84 downloads can be enabled/disabled per each repository from now.
Marcin Kuzminski <marcin@python-works.com>
parents:
945
diff
changeset
|
173 ${_('Downloads are disabled for this repository')} |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
174 %if h.HasPermissionAll('hg.admin')('enable downloads on from summary'): |
1756 | 175 ${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
|
176 %endif |
945
05b59c48556f
fixed error when trying to make download on empty repository
Marcin Kuzminski <marcin@python-works.com>
parents:
944
diff
changeset
|
177 %else: |
1171
2ab211e0aecd
changes for #56
Marcin Kuzminski <marcin@python-works.com>
parents:
1124
diff
changeset
|
178 ${h.select('download_options',c.rhodecode_repo.get_changeset().raw_id,c.download_options)} |
2415
b9abef8dd2b4
Small addition to render the Download button translatable.
Vincent Duvert <vincent@duvert.net>
parents:
2366
diff
changeset
|
179 <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
|
180 <span style="vertical-align: bottom"> |
1920
8f6c01c990dc
label for "with subrepos" checkbox
Vladislav Poluhin <nuklea@gmail.com>
parents:
1908
diff
changeset
|
181 <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
|
182 <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
|
183 </span> |
945
05b59c48556f
fixed error when trying to make download on empty repository
Marcin Kuzminski <marcin@python-works.com>
parents:
944
diff
changeset
|
184 %endif |
942
32318ec7bfc1
added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents:
917
diff
changeset
|
185 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
186 </div> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
187 </div> |
942
32318ec7bfc1
added branch/tag options to download links in summary
Marcin Kuzminski <marcin@python-works.com>
parents:
917
diff
changeset
|
188 </div> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
189 </div> |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
190 |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
191 %if c.show_stats: |
410
9a7ae16ff53e
fixes translations, style updates.
Marcin Kuzminski <marcin@python-works.com>
parents:
409
diff
changeset
|
192 <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
|
193 <!-- box / title --> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
194 <div class="title"> |
493
2256c78afe53
implemented basic autoupdating statistics fetched from database
Marcin Kuzminski <marcin@python-works.com>
parents:
489
diff
changeset
|
195 <h5>${_('Commit activity by day / author')}</h5> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
196 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
197 |
1247
4d195ad0ff03
made rhodecode compatible with 1024px displays
Marcin Kuzminski <marcin@python-works.com>
parents:
1244
diff
changeset
|
198 <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
|
199 <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
|
200 %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
|
201 ${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
|
202 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'): |
1756 | 203 ${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
|
204 %endif |
1181
36b12336cb7f
added percentage of progress of gathered commit activity statistics
Marcin Kuzminski <marcin@python-works.com>
parents:
1180
diff
changeset
|
205 %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
|
206 ${_('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
|
207 %endif |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
208 </div> |
1247
4d195ad0ff03
made rhodecode compatible with 1024px displays
Marcin Kuzminski <marcin@python-works.com>
parents:
1244
diff
changeset
|
209 <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
|
210 <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
|
211 <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
|
212 |
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
|
213 <div id="legend_data" style="clear:both;margin-top:10px;"> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
214 <div id="legend_container"></div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
215 <div id="legend_choices"> |
1605
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
216 <table id="legend_choices_tables" class="noborder" style="font-size:smaller;color:#545454"></table> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
217 </div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
218 </div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
219 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
220 </div> |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
221 %endif |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
222 |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
223 <div class="box"> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
224 <div class="title"> |
1736
e2d76554d2c6
added quickstart page for new repos
Marcin Kuzminski <marcin@python-works.com>
parents:
1728
diff
changeset
|
225 <div class="breadcrumbs"> |
e2d76554d2c6
added quickstart page for new repos
Marcin Kuzminski <marcin@python-works.com>
parents:
1728
diff
changeset
|
226 %if c.repo_changesets: |
e2d76554d2c6
added quickstart page for new repos
Marcin Kuzminski <marcin@python-works.com>
parents:
1728
diff
changeset
|
227 ${h.link_to(_('Shortlog'),h.url('shortlog_home',repo_name=c.repo_name))} |
e2d76554d2c6
added quickstart page for new repos
Marcin Kuzminski <marcin@python-works.com>
parents:
1728
diff
changeset
|
228 %else: |
e2d76554d2c6
added quickstart page for new repos
Marcin Kuzminski <marcin@python-works.com>
parents:
1728
diff
changeset
|
229 ${_('Quick start')} |
e2d76554d2c6
added quickstart page for new repos
Marcin Kuzminski <marcin@python-works.com>
parents:
1728
diff
changeset
|
230 %endif |
e2d76554d2c6
added quickstart page for new repos
Marcin Kuzminski <marcin@python-works.com>
parents:
1728
diff
changeset
|
231 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
232 </div> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
233 <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
|
234 <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
|
235 <%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
|
236 </div> |
1605
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
237 </div> |
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
238 </div> |
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
239 |
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
240 %if c.readme_data: |
2990
0bc7b5895242
small anchor cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2973
diff
changeset
|
241 <div id="readme" class="anchor"> |
0bc7b5895242
small anchor cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2973
diff
changeset
|
242 <div class="box" style="background-color: #FAFAFA"> |
0bc7b5895242
small anchor cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2973
diff
changeset
|
243 <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
|
244 <div class="breadcrumbs"> |
59fab1f641bf
added readme permalink
Marcin Kuzminski <marcin@python-works.com>
parents:
2603
diff
changeset
|
245 <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
|
246 <a class="permalink" href="#readme" title="${_('Permalink to this readme')}">¶</a> |
59fab1f641bf
added readme permalink
Marcin Kuzminski <marcin@python-works.com>
parents:
2603
diff
changeset
|
247 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
248 </div> |
2990
0bc7b5895242
small anchor cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2973
diff
changeset
|
249 <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
|
250 <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
|
251 ${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
|
252 </div> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
253 </div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
254 </div> |
2990
0bc7b5895242
small anchor cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2973
diff
changeset
|
255 </div> |
1605
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
256 %endif |
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
257 |
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
258 <script type="text/javascript"> |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
259 var clone_url = 'clone_url'; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
260 YUE.on(clone_url,'click',function(e){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
261 if(YUD.hasClass(clone_url,'selected')){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
262 return |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
263 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
264 else{ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
265 YUD.addClass(clone_url,'selected'); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
266 YUD.get(clone_url).select(); |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
267 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
268 }) |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
269 |
1813
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
270 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
|
271 // 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
|
272 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
|
273 YUD.setStyle('clone_by_name','display','none'); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
274 |
1813
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
275 // 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
|
276 YUD.setStyle('clone_by_id','display',''); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
277 YUD.setStyle('clone_url_id','display','none'); |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
278 |
1813
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
279 }) |
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
280 YUE.on('clone_by_id','click',function(e){ |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
281 |
1813
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
282 // show url by id and hide id button |
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
283 YUD.setStyle('clone_by_id','display','none'); |
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
284 YUD.setStyle('clone_url_id','display',''); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
285 |
1813
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
286 // hide url by name and show id button |
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
287 YUD.setStyle('clone_by_name','display',''); |
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
288 YUD.setStyle('clone_url','display','none'); |
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
289 }) |
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
290 |
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
291 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
292 var tmpl_links = {}; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
293 %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()): |
1756 | 294 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
|
295 %endfor |
1605
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
296 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
297 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
|
298 var sm = YUD.get('download_options'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
299 var new_cs = sm.options[sm.selectedIndex]; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
300 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
301 for(k in tmpl_links){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
302 var s = YUD.get(k+'_link'); |
1751
47c2a006d43b
Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
303 if(s){ |
47c2a006d43b
Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
304 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
|
305 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
|
306 title_tmpl = title_tmpl.replace('__CS_EXT__',k); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
307 |
1751
47c2a006d43b
Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
308 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
|
309 var subrepos = YUD.get('archive_subrepos').checked; |
47c2a006d43b
Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
310 url = url.replace('__SUB__',subrepos); |
47c2a006d43b
Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
311 url = url.replace('__NAME__',title_tmpl); |
47c2a006d43b
Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
312 s.innerHTML = url |
47c2a006d43b
Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
313 } |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
314 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
315 }); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
316 </script> |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
317 %if c.show_stats: |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
318 <script type="text/javascript"> |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
319 var data = ${c.trending_languages|n}; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
320 var total = 0; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
321 var no_data = true; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
322 var tbl = document.createElement('table'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
323 tbl.setAttribute('class','trending_language_tbl'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
324 var cnt = 0; |
1890
a3efaaa6ed4f
fixes issue #271
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
325 for (var i=0;i<data.length;i++){ |
1940
ef23fa832ab2
fixed percentage in stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1922
diff
changeset
|
326 total+= data[i][1].count; |
ef23fa832ab2
fixed percentage in stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1922
diff
changeset
|
327 } |
ef23fa832ab2
fixed percentage in stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1922
diff
changeset
|
328 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
|
329 cnt += 1; |
1890
a3efaaa6ed4f
fixes issue #271
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
330 no_data = false; |
1908 | 331 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
332 var hide = cnt>2; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
333 var tr = document.createElement('tr'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
334 if (hide){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
335 tr.setAttribute('style','display:none'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
336 tr.setAttribute('class','stats_hidden'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
337 } |
1890
a3efaaa6ed4f
fixes issue #271
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
338 var k = data[i][0]; |
a3efaaa6ed4f
fixes issue #271
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
339 var obj = data[i][1]; |
a3efaaa6ed4f
fixes issue #271
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
340 var percentage = Math.round((obj.count/total*100),2); |
1908 | 341 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
342 var td1 = document.createElement('td'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
343 td1.width = 150; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
344 var trending_language_label = document.createElement('div'); |
1890
a3efaaa6ed4f
fixes issue #271
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
345 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
|
346 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
|
347 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
348 var td2 = document.createElement('td'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
349 td2.setAttribute('style','padding-right:14px !important'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
350 var trending_language = document.createElement('div'); |
1890
a3efaaa6ed4f
fixes issue #271
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
351 var nr_files = obj.count+" ${_('files')}"; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
352 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
353 trending_language.title = k+" "+nr_files; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
354 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
355 if (percentage>22){ |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
356 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
|
357 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
358 else{ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
359 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
|
360 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
361 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
362 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
|
363 trending_language.style.width=percentage+"%"; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
364 td2.appendChild(trending_language); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
365 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
366 tr.appendChild(td1); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
367 tr.appendChild(td2); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
368 tbl.appendChild(tr); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
369 if(cnt == 3){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
370 var show_more = document.createElement('tr'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
371 var td = document.createElement('td'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
372 lnk = document.createElement('a'); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
373 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
374 lnk.href='#'; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
375 lnk.innerHTML = "${_('show more')}"; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
376 lnk.id='code_stats_show_more'; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
377 td.appendChild(lnk); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
378 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
379 show_more.appendChild(td); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
380 show_more.appendChild(document.createElement('td')); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
381 tbl.appendChild(show_more); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
382 } |
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 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
385 |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
386 YUD.get('lang_stats').appendChild(tbl); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
387 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
|
388 l = YUD.getElementsByClassName('stats_hidden') |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
389 for (e in l){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
390 YUD.setStyle(l[e],'display',''); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
391 }; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
392 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
|
393 'display','none'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
394 }); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
395 </script> |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
396 <script type="text/javascript"> |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
397 /** |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
398 * Plots summary graph |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
399 * |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
400 * @class SummaryPlot |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
401 * @param {from} initial from for detailed graph |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
402 * @param {to} initial to for detailed graph |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
403 * @param {dataset} |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
404 * @param {overview_dataset} |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
405 */ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
406 function SummaryPlot(from,to,dataset,overview_dataset) { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
407 var initial_ranges = { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
408 "xaxis":{ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
409 "from":from, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
410 "to":to, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
411 }, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
412 }; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
413 var dataset = dataset; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
414 var overview_dataset = [overview_dataset]; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
415 var choiceContainer = YUD.get("legend_choices"); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
416 var choiceContainerTable = YUD.get("legend_choices_tables"); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
417 var plotContainer = YUD.get('commit_history'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
418 var overviewContainer = YUD.get('overview'); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
419 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
420 var plot_options = { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
421 bars: {show:true,align:'center',lineWidth:4}, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
422 legend: {show:true, container:"legend_container"}, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
423 points: {show:true,radius:0,fill:false}, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
424 yaxis: {tickDecimals:0,}, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
425 xaxis: { |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
426 mode: "time", |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
427 timeformat: "%d/%m", |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
428 min:from, |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
429 max:to, |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
430 }, |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
431 grid: { |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
432 hoverable: true, |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
433 clickable: true, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
434 autoHighlight:true, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
435 color: "#999" |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
436 }, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
437 //selection: {mode: "x"} |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
438 }; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
439 var overview_options = { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
440 legend:{show:false}, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
441 bars: {show:true,barWidth: 2,}, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
442 shadowSize: 0, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
443 xaxis: {mode: "time", timeformat: "%d/%m/%y",}, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
444 yaxis: {ticks: 3, min: 0,tickDecimals:0,}, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
445 grid: {color: "#999",}, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
446 selection: {mode: "x"} |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
447 }; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
448 |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
449 /** |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
450 *get dummy data needed in few places |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
451 */ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
452 function getDummyData(label){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
453 return {"label":label, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
454 "data":[{"time":0, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
455 "commits":0, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
456 "added":0, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
457 "changed":0, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
458 "removed":0, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
459 }], |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
460 "schema":["commits"], |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
461 "color":'#ffffff', |
1605
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
462 } |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
463 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
464 |
1719
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 * generate checkboxes accordindly to data |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
467 * @param keys |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
468 * @returns |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
469 */ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
470 function generateCheckboxes(data) { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
471 //append checkboxes |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
472 var i = 0; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
473 choiceContainerTable.innerHTML = ''; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
474 for(var pos in data) { |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
475 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
476 data[pos].color = i; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
477 i++; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
478 if(data[pos].label != ''){ |
1922
0ef681e3ff66
labels "commit activity" using format
Vladislav Poluhin <nuklea@gmail.com>
parents:
1921
diff
changeset
|
479 choiceContainerTable.innerHTML += |
0ef681e3ff66
labels "commit activity" using format
Vladislav Poluhin <nuklea@gmail.com>
parents:
1921
diff
changeset
|
480 '<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
|
481 <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
|
482 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
483 } |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
484 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
485 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
486 /** |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
487 * ToolTip show |
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 function showTooltip(x, y, contents) { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
490 var div=document.getElementById('tooltip'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
491 if(!div) { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
492 div = document.createElement('div'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
493 div.id="tooltip"; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
494 div.style.position="absolute"; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
495 div.style.border='1px solid #fdd'; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
496 div.style.padding='2px'; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
497 div.style.backgroundColor='#fee'; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
498 document.body.appendChild(div); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
499 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
500 YUD.setStyle(div, 'opacity', 0); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
501 div.innerHTML = contents; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
502 div.style.top=(y + 5) + "px"; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
503 div.style.left=(x + 5) + "px"; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
504 |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
505 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
|
506 anim.animate(); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
507 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
508 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
509 /** |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
510 * 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
|
511 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
|
512 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
|
513 */ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
514 function getDataAccordingToRanges(ranges) { |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
515 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
516 var data = []; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
517 var new_dataset = {}; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
518 var keys = []; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
519 var max_commits = 0; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
520 for(var key in dataset){ |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
521 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
522 for(var ds in dataset[key].data){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
523 commit_data = dataset[key].data[ds]; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
524 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
|
525 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
526 if(new_dataset[key] === undefined){ |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
527 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
|
528 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
529 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
|
530 } |
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
531 } |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
532 if (new_dataset[key] !== undefined){ |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
533 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
|
534 } |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
535 } |
1605
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
536 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
537 if (data.length > 0){ |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
538 return data; |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
539 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
540 else{ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
541 //just return dummy data for graph to plot itself |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
542 return [getDummyData('')]; |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
543 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
544 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
545 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
546 /** |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
547 * redraw using new checkbox data |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
548 */ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
549 function plotchoiced(e,args){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
550 var cur_data = args[0]; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
551 var cur_ranges = args[1]; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
552 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
553 var new_data = []; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
554 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
|
555 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
556 //show only checked labels |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
557 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
|
558 var checkbox_key = inputs[i].name; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
559 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
560 if(inputs[i].checked){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
561 for(var d in cur_data){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
562 if(cur_data[d].label == checkbox_key){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
563 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
|
564 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
565 } |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
566 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
567 else{ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
568 //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
|
569 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
|
570 } |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
571 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
572 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
573 var new_options = YAHOO.lang.merge(plot_options, { |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
574 xaxis: { |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
575 min: cur_ranges.xaxis.from, |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
576 max: cur_ranges.xaxis.to, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
577 mode:"time", |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
578 timeformat: "%d/%m", |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
579 }, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
580 }); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
581 if (!new_data){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
582 new_data = [[0,1]]; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
583 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
584 // do the zooming |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
585 plot = YAHOO.widget.Flot(plotContainer, new_data, new_options); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
586 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
587 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
|
588 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
589 //resubscribe plothover |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
590 plot.subscribe("plothover", plothover); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
591 |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
592 // 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
|
593 overview.setSelection(cur_ranges, true); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
594 |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
595 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
596 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
597 /** |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
598 * plot only selected items from overview |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
599 * @param ranges |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
600 * @returns |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
601 */ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
602 function plotselected(ranges,cur_data) { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
603 //updates the data for new plot |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
604 var data = getDataAccordingToRanges(ranges); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
605 generateCheckboxes(data); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
606 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
607 var new_options = YAHOO.lang.merge(plot_options, { |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
608 xaxis: { |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
609 min: ranges.xaxis.from, |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
610 max: ranges.xaxis.to, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
611 mode:"time", |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
612 timeformat: "%d/%m", |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
613 }, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
614 }); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
615 // do the zooming |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
616 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
|
617 |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
618 plot.subscribe("plotselected", plotselected); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
619 |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
620 //resubscribe plothover |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
621 plot.subscribe("plothover", plothover); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
622 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
623 // 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
|
624 overview.setSelection(ranges, true); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
625 |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
626 //resubscribe choiced |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
627 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
|
628 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
629 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
630 var previousPoint = null; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
631 |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
632 function plothover(o) { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
633 var pos = o.pos; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
634 var item = o.item; |
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 //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
|
637 //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
|
638 if (item) { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
639 if (previousPoint != item.datapoint) { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
640 previousPoint = item.datapoint; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
641 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
642 var tooltip = YUD.get("tooltip"); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
643 if(tooltip) { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
644 tooltip.parentNode.removeChild(tooltip); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
645 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
646 var x = item.datapoint.x.toFixed(2); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
647 var y = item.datapoint.y.toFixed(2); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
648 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
649 if (!item.series.label){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
650 item.series.label = 'commits'; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
651 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
652 var d = new Date(x*1000); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
653 var fd = d.toDateString() |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
654 var nr_commits = parseInt(y); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
655 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
656 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
|
657 var added = cur_data.added; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
658 var changed = cur_data.changed; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
659 var removed = cur_data.removed; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
660 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
661 var nr_commits_suffix = " ${_('commits')} "; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
662 var added_suffix = " ${_('files added')} "; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
663 var changed_suffix = " ${_('files changed')} "; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
664 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
|
665 |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
666 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
667 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
|
668 if(added==1){added_suffix=" ${_('file added')} ";} |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
669 if(changed==1){changed_suffix=" ${_('file changed')} ";} |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
670 if(removed==1){removed_suffix=" ${_('file removed')} ";} |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
671 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
672 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
|
673 +'<br/>'+ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
674 nr_commits + nr_commits_suffix+'<br/>'+ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
675 added + added_suffix +'<br/>'+ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
676 changed + changed_suffix + '<br/>'+ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
677 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
|
678 } |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
679 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
680 else { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
681 var tooltip = YUD.get("tooltip"); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
682 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
683 if(tooltip) { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
684 tooltip.parentNode.removeChild(tooltip); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
685 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
686 previousPoint = null; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
687 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
688 } |
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 /** |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
691 * MAIN EXECUTION |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
692 */ |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
693 |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
694 var data = getDataAccordingToRanges(initial_ranges); |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
695 generateCheckboxes(data); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
696 |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
697 //main plot |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
698 var plot = YAHOO.widget.Flot(plotContainer,data,plot_options); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
699 |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
700 //overview |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
701 var overview = YAHOO.widget.Flot(overviewContainer, |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
702 overview_dataset, overview_options); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
703 |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
704 //show initial selection on overview |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
705 overview.setSelection(initial_ranges); |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
706 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
707 plot.subscribe("plotselected", plotselected); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
708 plot.subscribe("plothover", plothover) |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
709 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
710 overview.subscribe("plotselected", function (ranges) { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
711 plot.setSelection(ranges); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
712 }); |
1605
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
713 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
714 // user choices on overview |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
715 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
|
716 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
717 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
|
718 </script> |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
719 %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
|
720 |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
721 </%def> |