Mercurial > kallithea
annotate rhodecode/templates/summary/summary.html @ 2941:d0c2299d08d4 beta
my account page should use new dt.repo_name format
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 19 Oct 2012 23:39:43 +0200 |
parents | 19ea3e16f65b |
children | 9937afa7f093 |
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: |
2932
19ea3e16f65b
add locking state icon into summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
2815
diff
changeset
|
66 |
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]: |
19ea3e16f65b
add locking state icon into summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
2815
diff
changeset
|
70 <span class="locking_locked tooltip" title="${_('Repository locked by %s') % h.person_by_id(c.rhodecode_db_repo.locked[0])}"></span> |
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 |
19ea3e16f65b
add locking state icon into summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
2815
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: |
2366
1b12e71b636f
added #readme anchor link
Marcin Kuzminski <marcin@python-works.com>
parents:
2016
diff
changeset
|
241 <div id="readme" class="box header-pos-fix" style="background-color: #FAFAFA"> |
2603
370ed7829168
Readme renderer now uses landing_rev parameter to render the readme based on
Marcin Kuzminski <marcin@python-works.com>
parents:
2492
diff
changeset
|
242 <div id="readme" 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
|
243 <div class="breadcrumbs"> |
59fab1f641bf
added readme permalink
Marcin Kuzminski <marcin@python-works.com>
parents:
2603
diff
changeset
|
244 <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
|
245 <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
|
246 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
247 </div> |
2366
1b12e71b636f
added #readme anchor link
Marcin Kuzminski <marcin@python-works.com>
parents:
2016
diff
changeset
|
248 <div id="readme" class="readme"> |
1605
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
249 <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
|
250 ${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
|
251 </div> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
252 </div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
282
diff
changeset
|
253 </div> |
1605
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
254 %endif |
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
255 |
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
256 <script type="text/javascript"> |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
257 var clone_url = 'clone_url'; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
258 YUE.on(clone_url,'click',function(e){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
259 if(YUD.hasClass(clone_url,'selected')){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
260 return |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
261 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
262 else{ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
263 YUD.addClass(clone_url,'selected'); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
264 YUD.get(clone_url).select(); |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
265 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
266 }) |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
267 |
1813
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
268 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
|
269 // 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
|
270 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
|
271 YUD.setStyle('clone_by_name','display','none'); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
272 |
1813
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
273 // 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
|
274 YUD.setStyle('clone_by_id','display',''); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
275 YUD.setStyle('clone_url_id','display','none'); |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
276 |
1813
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
277 }) |
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
278 YUE.on('clone_by_id','click',function(e){ |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
279 |
1813
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
280 // 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
|
281 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
|
282 YUD.setStyle('clone_url_id','display',''); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
283 |
1813
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
284 // 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
|
285 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
|
286 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
|
287 }) |
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
288 |
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
289 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
290 var tmpl_links = {}; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
291 %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()): |
1756 | 292 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
|
293 %endfor |
1605
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
294 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
295 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
|
296 var sm = YUD.get('download_options'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
297 var new_cs = sm.options[sm.selectedIndex]; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
298 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
299 for(k in tmpl_links){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
300 var s = YUD.get(k+'_link'); |
1751
47c2a006d43b
Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
301 if(s){ |
47c2a006d43b
Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
302 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
|
303 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
|
304 title_tmpl = title_tmpl.replace('__CS_EXT__',k); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
305 |
1751
47c2a006d43b
Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
306 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
|
307 var subrepos = YUD.get('archive_subrepos').checked; |
47c2a006d43b
Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
308 url = url.replace('__SUB__',subrepos); |
47c2a006d43b
Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
309 url = url.replace('__NAME__',title_tmpl); |
47c2a006d43b
Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
310 s.innerHTML = url |
47c2a006d43b
Summary page downloads limited to zip.
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
311 } |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
312 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
313 }); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
314 </script> |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
315 %if c.show_stats: |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
316 <script type="text/javascript"> |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
317 var data = ${c.trending_languages|n}; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
318 var total = 0; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
319 var no_data = true; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
320 var tbl = document.createElement('table'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
321 tbl.setAttribute('class','trending_language_tbl'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
322 var cnt = 0; |
1890
a3efaaa6ed4f
fixes issue #271
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
323 for (var i=0;i<data.length;i++){ |
1940
ef23fa832ab2
fixed percentage in stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1922
diff
changeset
|
324 total+= data[i][1].count; |
ef23fa832ab2
fixed percentage in stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1922
diff
changeset
|
325 } |
ef23fa832ab2
fixed percentage in stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1922
diff
changeset
|
326 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
|
327 cnt += 1; |
1890
a3efaaa6ed4f
fixes issue #271
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
328 no_data = false; |
1908 | 329 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
330 var hide = cnt>2; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
331 var tr = document.createElement('tr'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
332 if (hide){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
333 tr.setAttribute('style','display:none'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
334 tr.setAttribute('class','stats_hidden'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
335 } |
1890
a3efaaa6ed4f
fixes issue #271
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
336 var k = data[i][0]; |
a3efaaa6ed4f
fixes issue #271
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
337 var obj = data[i][1]; |
a3efaaa6ed4f
fixes issue #271
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
338 var percentage = Math.round((obj.count/total*100),2); |
1908 | 339 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
340 var td1 = document.createElement('td'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
341 td1.width = 150; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
342 var trending_language_label = document.createElement('div'); |
1890
a3efaaa6ed4f
fixes issue #271
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
343 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
|
344 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
|
345 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
346 var td2 = document.createElement('td'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
347 td2.setAttribute('style','padding-right:14px !important'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
348 var trending_language = document.createElement('div'); |
1890
a3efaaa6ed4f
fixes issue #271
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
349 var nr_files = obj.count+" ${_('files')}"; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
350 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
351 trending_language.title = k+" "+nr_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 if (percentage>22){ |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
354 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
|
355 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
356 else{ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
357 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
|
358 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
359 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
360 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
|
361 trending_language.style.width=percentage+"%"; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
362 td2.appendChild(trending_language); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
363 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
364 tr.appendChild(td1); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
365 tr.appendChild(td2); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
366 tbl.appendChild(tr); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
367 if(cnt == 3){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
368 var show_more = document.createElement('tr'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
369 var td = document.createElement('td'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
370 lnk = document.createElement('a'); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
371 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
372 lnk.href='#'; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
373 lnk.innerHTML = "${_('show more')}"; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
374 lnk.id='code_stats_show_more'; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
375 td.appendChild(lnk); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
376 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
377 show_more.appendChild(td); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
378 show_more.appendChild(document.createElement('td')); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
379 tbl.appendChild(show_more); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
380 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
381 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
382 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
383 |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
384 YUD.get('lang_stats').appendChild(tbl); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
385 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
|
386 l = YUD.getElementsByClassName('stats_hidden') |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
387 for (e in l){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
388 YUD.setStyle(l[e],'display',''); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
389 }; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
390 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
|
391 'display','none'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
392 }); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
393 </script> |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
394 <script type="text/javascript"> |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
395 /** |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
396 * Plots summary graph |
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 * @class SummaryPlot |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
399 * @param {from} initial from for detailed graph |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
400 * @param {to} initial to for detailed graph |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
401 * @param {dataset} |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
402 * @param {overview_dataset} |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
403 */ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
404 function SummaryPlot(from,to,dataset,overview_dataset) { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
405 var initial_ranges = { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
406 "xaxis":{ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
407 "from":from, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
408 "to":to, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
409 }, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
410 }; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
411 var dataset = dataset; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
412 var overview_dataset = [overview_dataset]; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
413 var choiceContainer = YUD.get("legend_choices"); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
414 var choiceContainerTable = YUD.get("legend_choices_tables"); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
415 var plotContainer = YUD.get('commit_history'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
416 var overviewContainer = YUD.get('overview'); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
417 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
418 var plot_options = { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
419 bars: {show:true,align:'center',lineWidth:4}, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
420 legend: {show:true, container:"legend_container"}, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
421 points: {show:true,radius:0,fill:false}, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
422 yaxis: {tickDecimals:0,}, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
423 xaxis: { |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
424 mode: "time", |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
425 timeformat: "%d/%m", |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
426 min:from, |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
427 max:to, |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
428 }, |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
429 grid: { |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
430 hoverable: true, |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
431 clickable: true, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
432 autoHighlight:true, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
433 color: "#999" |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
434 }, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
435 //selection: {mode: "x"} |
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 var overview_options = { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
438 legend:{show:false}, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
439 bars: {show:true,barWidth: 2,}, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
440 shadowSize: 0, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
441 xaxis: {mode: "time", timeformat: "%d/%m/%y",}, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
442 yaxis: {ticks: 3, min: 0,tickDecimals:0,}, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
443 grid: {color: "#999",}, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
444 selection: {mode: "x"} |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
445 }; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
446 |
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 *get dummy data needed in few places |
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 function getDummyData(label){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
451 return {"label":label, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
452 "data":[{"time":0, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
453 "commits":0, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
454 "added":0, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
455 "changed":0, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
456 "removed":0, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
457 }], |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
458 "schema":["commits"], |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
459 "color":'#ffffff', |
1605
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
460 } |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
461 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
462 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
463 /** |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
464 * generate checkboxes accordindly to data |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
465 * @param keys |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
466 * @returns |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
467 */ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
468 function generateCheckboxes(data) { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
469 //append checkboxes |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
470 var i = 0; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
471 choiceContainerTable.innerHTML = ''; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
472 for(var pos in data) { |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
473 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
474 data[pos].color = i; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
475 i++; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
476 if(data[pos].label != ''){ |
1922
0ef681e3ff66
labels "commit activity" using format
Vladislav Poluhin <nuklea@gmail.com>
parents:
1921
diff
changeset
|
477 choiceContainerTable.innerHTML += |
0ef681e3ff66
labels "commit activity" using format
Vladislav Poluhin <nuklea@gmail.com>
parents:
1921
diff
changeset
|
478 '<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
|
479 <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
|
480 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
481 } |
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 /** |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
485 * ToolTip show |
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 function showTooltip(x, y, contents) { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
488 var div=document.getElementById('tooltip'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
489 if(!div) { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
490 div = document.createElement('div'); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
491 div.id="tooltip"; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
492 div.style.position="absolute"; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
493 div.style.border='1px solid #fdd'; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
494 div.style.padding='2px'; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
495 div.style.backgroundColor='#fee'; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
496 document.body.appendChild(div); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
497 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
498 YUD.setStyle(div, 'opacity', 0); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
499 div.innerHTML = contents; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
500 div.style.top=(y + 5) + "px"; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
501 div.style.left=(x + 5) + "px"; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
502 |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
503 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
|
504 anim.animate(); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
505 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
506 |
1719
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 * 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
|
509 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
|
510 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
|
511 */ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
512 function getDataAccordingToRanges(ranges) { |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
513 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
514 var data = []; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
515 var new_dataset = {}; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
516 var keys = []; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
517 var max_commits = 0; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
518 for(var key in dataset){ |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
519 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
520 for(var ds in dataset[key].data){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
521 commit_data = dataset[key].data[ds]; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
522 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
|
523 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
524 if(new_dataset[key] === undefined){ |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
525 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
|
526 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
527 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
|
528 } |
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
529 } |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
530 if (new_dataset[key] !== undefined){ |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
531 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
|
532 } |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
533 } |
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 if (data.length > 0){ |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
536 return data; |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
537 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
538 else{ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
539 //just return dummy data for graph to plot itself |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
540 return [getDummyData('')]; |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
541 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
542 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
543 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
544 /** |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
545 * redraw using new checkbox data |
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 function plotchoiced(e,args){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
548 var cur_data = args[0]; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
549 var cur_ranges = args[1]; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
550 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
551 var new_data = []; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
552 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
|
553 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
554 //show only checked labels |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
555 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
|
556 var checkbox_key = inputs[i].name; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
557 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
558 if(inputs[i].checked){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
559 for(var d in cur_data){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
560 if(cur_data[d].label == checkbox_key){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
561 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
|
562 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
563 } |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
564 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
565 else{ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
566 //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
|
567 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
|
568 } |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
569 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
570 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
571 var new_options = YAHOO.lang.merge(plot_options, { |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
572 xaxis: { |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
573 min: cur_ranges.xaxis.from, |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
574 max: cur_ranges.xaxis.to, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
575 mode:"time", |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
576 timeformat: "%d/%m", |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
577 }, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
578 }); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
579 if (!new_data){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
580 new_data = [[0,1]]; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
581 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
582 // do the zooming |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
583 plot = YAHOO.widget.Flot(plotContainer, new_data, new_options); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
584 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
585 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
|
586 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
587 //resubscribe plothover |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
588 plot.subscribe("plothover", plothover); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
589 |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
590 // 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
|
591 overview.setSelection(cur_ranges, true); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
592 |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
593 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
594 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
595 /** |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
596 * plot only selected items from overview |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
597 * @param ranges |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
598 * @returns |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
599 */ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
600 function plotselected(ranges,cur_data) { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
601 //updates the data for new plot |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
602 var data = getDataAccordingToRanges(ranges); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
603 generateCheckboxes(data); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
604 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
605 var new_options = YAHOO.lang.merge(plot_options, { |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
606 xaxis: { |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
607 min: ranges.xaxis.from, |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
608 max: ranges.xaxis.to, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
609 mode:"time", |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
610 timeformat: "%d/%m", |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
611 }, |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
612 }); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
613 // do the zooming |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
614 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
|
615 |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
616 plot.subscribe("plotselected", plotselected); |
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 //resubscribe plothover |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
619 plot.subscribe("plothover", plothover); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
620 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
621 // 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
|
622 overview.setSelection(ranges, true); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
623 |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
624 //resubscribe choiced |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
625 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
|
626 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
627 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
628 var previousPoint = null; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
629 |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
630 function plothover(o) { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
631 var pos = o.pos; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
632 var item = o.item; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
633 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
634 //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
|
635 //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
|
636 if (item) { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
637 if (previousPoint != item.datapoint) { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
638 previousPoint = item.datapoint; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
639 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
640 var tooltip = YUD.get("tooltip"); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
641 if(tooltip) { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
642 tooltip.parentNode.removeChild(tooltip); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
643 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
644 var x = item.datapoint.x.toFixed(2); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
645 var y = item.datapoint.y.toFixed(2); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
646 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
647 if (!item.series.label){ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
648 item.series.label = 'commits'; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
649 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
650 var d = new Date(x*1000); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
651 var fd = d.toDateString() |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
652 var nr_commits = parseInt(y); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
653 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
654 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
|
655 var added = cur_data.added; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
656 var changed = cur_data.changed; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
657 var removed = cur_data.removed; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
658 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
659 var nr_commits_suffix = " ${_('commits')} "; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
660 var added_suffix = " ${_('files added')} "; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
661 var changed_suffix = " ${_('files changed')} "; |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
662 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
|
663 |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
664 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
665 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
|
666 if(added==1){added_suffix=" ${_('file added')} ";} |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
667 if(changed==1){changed_suffix=" ${_('file changed')} ";} |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
668 if(removed==1){removed_suffix=" ${_('file removed')} ";} |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
669 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
670 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
|
671 +'<br/>'+ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
672 nr_commits + nr_commits_suffix+'<br/>'+ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
673 added + added_suffix +'<br/>'+ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
674 changed + changed_suffix + '<br/>'+ |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
675 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
|
676 } |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
677 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
678 else { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
679 var tooltip = YUD.get("tooltip"); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
680 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
681 if(tooltip) { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
682 tooltip.parentNode.removeChild(tooltip); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
683 } |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
684 previousPoint = null; |
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 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
687 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
688 /** |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
689 * MAIN EXECUTION |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
690 */ |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
691 |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
692 var data = getDataAccordingToRanges(initial_ranges); |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
693 generateCheckboxes(data); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
694 |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
695 //main plot |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
696 var plot = YAHOO.widget.Flot(plotContainer,data,plot_options); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
697 |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
698 //overview |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
699 var overview = YAHOO.widget.Flot(overviewContainer, |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
700 overview_dataset, overview_options); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
701 |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
702 //show initial selection on overview |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
703 overview.setSelection(initial_ranges); |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
704 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
705 plot.subscribe("plotselected", plotselected); |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
706 plot.subscribe("plothover", plothover) |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
707 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
708 overview.subscribe("plotselected", function (ranges) { |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
709 plot.setSelection(ranges); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
710 }); |
1605
df59c0503636
implements #215 Repository view uses a README (text/markdown + rst)
Marcin Kuzminski <marcin@python-works.com>
parents:
1553
diff
changeset
|
711 |
1719
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
712 // user choices on overview |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
713 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
|
714 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
715 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
|
716 </script> |
4a28aff31a15
optimized summary page for disabled stats
Marcin Kuzminski <marcin@python-works.com>
parents:
1605
diff
changeset
|
717 %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
|
718 |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1813
diff
changeset
|
719 </%def> |