annotate pylons_app/templates/summary/summary.html @ 400:7eba3d1e4227

webhelpers import bugfix for gravatar +some css fixes, and added gravatar for summary.
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 08 Aug 2010 02:09:32 +0200
parents 6a506a7acd1a
children bec06654d67b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
127
20dc7a5eb748 Html changes and cleanups, made folders for html templates, implemented tags and branches pages
Marcin Kuzminski <marcin@python-works.com>
parents: 126
diff changeset
1 <%inherit file="/base/base.html"/>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
2
74
cdf4fda66dd9 Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
3 <%def name="title()">
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
4 ${_('Mercurial Repository Overview')}
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()">
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
8 ${h.link_to(u'Home',h.url('/'))}
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
9 &raquo;
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
10 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
11 &raquo;
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()">
189
410101210923 removed search field from templates
Marcin Kuzminski <marcin@python-works.com>
parents: 183
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
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
19 <%def name="main()">
219
64e1125fc479 html + css changes, added icons and etc.
Marcin Kuzminski <marcin@python-works.com>
parents: 210
diff changeset
20 <script type="text/javascript">
64e1125fc479 html + css changes, added icons and etc.
Marcin Kuzminski <marcin@python-works.com>
parents: 210
diff changeset
21 var E = YAHOO.util.Event;
64e1125fc479 html + css changes, added icons and etc.
Marcin Kuzminski <marcin@python-works.com>
parents: 210
diff changeset
22 var D = YAHOO.util.Dom;
64e1125fc479 html + css changes, added icons and etc.
Marcin Kuzminski <marcin@python-works.com>
parents: 210
diff changeset
23
64e1125fc479 html + css changes, added icons and etc.
Marcin Kuzminski <marcin@python-works.com>
parents: 210
diff changeset
24 E.onDOMReady(function(e){
64e1125fc479 html + css changes, added icons and etc.
Marcin Kuzminski <marcin@python-works.com>
parents: 210
diff changeset
25 id = 'clone_url';
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
26 E.addListener(id,'click',function(e){
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
27 D.get('clone_url').select();
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
28 })
219
64e1125fc479 html + css changes, added icons and etc.
Marcin Kuzminski <marcin@python-works.com>
parents: 210
diff changeset
29 })
64e1125fc479 html + css changes, added icons and etc.
Marcin Kuzminski <marcin@python-works.com>
parents: 210
diff changeset
30 </script>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
31 <div class="box box-left">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
32 <!-- box / title -->
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
33 <div class="title">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
34 ${self.breadcrumbs()}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
35 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
36 <!-- end box / title -->
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
37 <div class="form">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
38 <div class="fields">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
39
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
40 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
41 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
42 <label>${_('Name')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
43 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
44 <div class="input-short">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
45 ${c.repo_info.name}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
46 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
47 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
48
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
49
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
50 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
51 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
52 <label>${_('Description')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
53 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
54 <div class="input-short">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
55 ${c.repo_info.description}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
56 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
57 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
58
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
59
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
60 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
61 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
62 <label>${_('Contact')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
63 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
64 <div class="input-short">
400
7eba3d1e4227 webhelpers import bugfix for gravatar
Marcin Kuzminski <marcin@python-works.com>
parents: 390
diff changeset
65 <div class="gravatar">
7eba3d1e4227 webhelpers import bugfix for gravatar
Marcin Kuzminski <marcin@python-works.com>
parents: 390
diff changeset
66 <img alt="gravatar" src="${h.gravatar_url(c.repo_info.dbrepo.user.email)}"/>
7eba3d1e4227 webhelpers import bugfix for gravatar
Marcin Kuzminski <marcin@python-works.com>
parents: 390
diff changeset
67 </div>
7eba3d1e4227 webhelpers import bugfix for gravatar
Marcin Kuzminski <marcin@python-works.com>
parents: 390
diff changeset
68 ${_('Username')}: ${c.repo_info.dbrepo.user.username}<br/>
7eba3d1e4227 webhelpers import bugfix for gravatar
Marcin Kuzminski <marcin@python-works.com>
parents: 390
diff changeset
69 ${_('Name')}: ${c.repo_info.dbrepo.user.name} ${c.repo_info.dbrepo.user.lastname}<br/>
7eba3d1e4227 webhelpers import bugfix for gravatar
Marcin Kuzminski <marcin@python-works.com>
parents: 390
diff changeset
70 ${_('Email')}: <a href="mailto:${c.repo_info.dbrepo.user.email}">${c.repo_info.dbrepo.user.email}</a>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
71 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
72 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
73
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
74 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
75 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
76 <label>${_('Last change')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
77 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
78 <div class="input-short">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
79 ${h.age(c.repo_info.last_change)} - ${h.rfc822date(c.repo_info.last_change)}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
80 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
81 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
82
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
83 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
84 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
85 <label>${_('Clone url')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
86 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
87 <div class="input-short">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
88 <input type="text" id="clone_url" readonly="readonly" value="hg clone ${c.clone_repo_url}" size="70"/>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
89 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
90 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
91
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
92 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
93 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
94 <label>${_('Download')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
95 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
96 <div class="input-short">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
97 %for cnt,archive in enumerate(c.repo_info._get_archives()):
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
98 %if cnt >=1:
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
99 |
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
100 %endif
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
101 ${h.link_to(c.repo_info.name+'.'+archive['type'],
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
102 h.url('files_archive_home',repo_name=c.repo_info.name,
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
103 revision='tip',fileformat=archive['extension']),class_="archive_icon")}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
104 %endfor
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
105 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
106 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
107
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
108 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
109 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
110 <label>${_('Feeds')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
111 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
112 <div class="input-short">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
113 ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.repo_info.name),class_='rss_icon')}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
114 ${h.link_to(_('Atom'),h.url('atom_feed_home',repo_name=c.repo_info.name),class_='atom_icon')}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
115 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
116 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
117 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
118 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
119 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
120
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
121 <div class="box box-right">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
122 <!-- box / title -->
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
123 <div class="title">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
124 <h5>${_('Last month commit activity')}</h5>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
125 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
126
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
127 <div class="table">
379
86a25ad59766 fixed min width set.
Marcin Kuzminski <marcin@python-works.com>
parents: 372
diff changeset
128 <div id="commit_history" style="width:460px;height:370px;float:left"></div>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
129 <div id="legend_data">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
130 <div id="legend_container"></div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
131 <div id="legend_choices">
379
86a25ad59766 fixed min width set.
Marcin Kuzminski <marcin@python-works.com>
parents: 372
diff changeset
132 <table id="legend_choices_tables" style="font-size:smaller;color:#545454"></table>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
133 </div>
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 <script type="text/javascript">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
136
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
137 (function () {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
138 var datasets = {${c.commit_data|n}};
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
139 var i = 0;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
140 var choiceContainer = YAHOO.util.Dom.get("legend_choices");
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
141 var choiceContainerTable = YAHOO.util.Dom.get("legend_choices_tables");
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
142 for(var key in datasets) {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
143 datasets[key].color = i;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
144 i++;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
145 choiceContainerTable.innerHTML += '<tr>'+
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
146 '<td>'+
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
147 '<input type="checkbox" name="' + key +'" checked="checked" />'+datasets[key].label+
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
148 '</td>'+
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
149 '</tr>';
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
150 };
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
151
219
64e1125fc479 html + css changes, added icons and etc.
Marcin Kuzminski <marcin@python-works.com>
parents: 210
diff changeset
152
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
153 function plotAccordingToChoices() {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
154 var data = [];
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
155
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
156 var inputs = choiceContainer.getElementsByTagName("input");
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
157 for(var i=0; i<inputs.length; i++) {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
158 if(!inputs[i].checked)
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
159 continue;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
160
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
161 var key = inputs[i].name;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
162 if (key && datasets[key])
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
163 data.push(datasets[key]);
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
164 };
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
165
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
166 if (data.length > 0){
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
167 var plot = YAHOO.widget.Flot("commit_history", data,
390
6a506a7acd1a some small changes to commit activity graph
Marcin Kuzminski <marcin@python-works.com>
parents: 379
diff changeset
168 { bars: { show: true, align:'center',lineWidth:4 },
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
169 points: { show: true, radius:0,fill:true },
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
170 legend:{show:true, container:"legend_container"},
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
171 selection: { mode: "xy" },
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
172 yaxis:{tickSize:[1]},
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
173 xaxis: { mode: "time", timeformat: "%d",tickSize:[1, "day"],min:${c.ts_min},max:${c.ts_max} },
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
174 grid: { hoverable: true, clickable: true,autoHighlight:true },
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
175 });
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
176
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
177 function showTooltip(x, y, contents) {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
178 var div=document.getElementById('tooltip');
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
179 if(!div) {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
180 div = document.createElement('div');
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
181 div.id="tooltip";
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
182 div.style.position="absolute";
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
183 div.style.border='1px solid #fdd';
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
184 div.style.padding='2px';
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
185 div.style.backgroundColor='#fee';
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
186 document.body.appendChild(div);
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
187 }
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
188 YAHOO.util.Dom.setStyle(div, 'opacity', 0);
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
189 div.innerHTML = contents;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
190 div.style.top=(y + 5) + "px";
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
191 div.style.left=(x + 5) + "px";
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
192
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
193 var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2);
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
194 anim.animate();
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
195 }
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
196
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
197 var previousPoint = null;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
198 plot.subscribe("plothover", function (o) {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
199 var pos = o.pos;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
200 var item = o.item;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
201
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
202 //YAHOO.util.Dom.get("x").innerHTML = pos.x.toFixed(2);
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
203 //YAHOO.util.Dom.get("y").innerHTML = pos.y.toFixed(2);
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
204 if (item) {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
205 if (previousPoint != item.datapoint) {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
206 previousPoint = item.datapoint;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
207
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
208 var tooltip = YAHOO.util.Dom.get("tooltip");
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
209 if(tooltip) {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
210 tooltip.parentNode.removeChild(tooltip);
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
211 }
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
212 var x = item.datapoint.x.toFixed(2);
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
213 var y = item.datapoint.y.toFixed(2);
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
214
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
215 if (!item.series.label){
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
216 item.series.label = 'commits';
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
217 }
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
218 var d = new Date(x*1000);
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
219 var fd = d.getFullYear()+'-'+(d.getMonth()+1)+'-'+d.getDate();
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
220 var nr_commits = parseInt(y);
372
1fa58ca0a77e fixed plural messages about commits in graph
Marcin Kuzminski <marcin@python-works.com>
parents: 362
diff changeset
221 var suffix = '';
1fa58ca0a77e fixed plural messages about commits in graph
Marcin Kuzminski <marcin@python-works.com>
parents: 362
diff changeset
222 if(nr_commits > 1){
1fa58ca0a77e fixed plural messages about commits in graph
Marcin Kuzminski <marcin@python-works.com>
parents: 362
diff changeset
223 var suffix = 's';
1fa58ca0a77e fixed plural messages about commits in graph
Marcin Kuzminski <marcin@python-works.com>
parents: 362
diff changeset
224 }
1fa58ca0a77e fixed plural messages about commits in graph
Marcin Kuzminski <marcin@python-works.com>
parents: 362
diff changeset
225 showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd + ": " + nr_commits+" commit" + suffix);
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
226 }
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
227 }
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
228 else {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
229 var tooltip = YAHOO.util.Dom.get("tooltip");
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
230
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
231 if(tooltip) {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
232 tooltip.parentNode.removeChild(tooltip);
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
233 }
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
234 previousPoint = null;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
235 }
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
236 });
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
237
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
238 }
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
239 }
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
240
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
241 YAHOO.util.Event.on(choiceContainer.getElementsByTagName("input"), "click", plotAccordingToChoices);
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
242
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
243 plotAccordingToChoices();
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
244 })();
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
245 </script>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
246
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
247 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
248 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
249
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
250 <div class="box">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
251 <div class="title">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
252 <div class="breadcrumbs">${h.link_to(_('Last ten changes'),h.url('changelog_home',repo_name=c.repo_name))}</div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
253 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
254 <div class="table">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
255 <%include file='../shortlog/shortlog_data.html'/>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
256 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
257 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
258 <div class="box">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
259 <div class="title">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
260 <div class="breadcrumbs">${h.link_to(_('Last ten tags'),h.url('tags_home',repo_name=c.repo_name))}</div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
261 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
262 <div class="table">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
263 <%include file='../tags/tags_data.html'/>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
264 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
265 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
266 <div class="box">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
267 <div class="title">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
268 <div class="breadcrumbs">${h.link_to(_('Last ten branches'),h.url('branches_home',repo_name=c.repo_name))}</div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
269 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
270 <div class="table">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
271 <%include file='../branches/branches_data.html'/>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
272 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
273 </div>
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
274
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
275 </%def>