annotate pylons_app/templates/summary/summary.html @ 390:6a506a7acd1a

some small changes to commit activity graph
author Marcin Kuzminski <marcin@python-works.com>
date Fri, 06 Aug 2010 00:15:06 +0200
parents 86a25ad59766
children 7eba3d1e4227
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
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
8
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
9 <%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
10 ${h.link_to(u'Home',h.url('/'))}
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 ${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
13 &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
14 ${_('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
15 </%def>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
16
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 name="page_nav()">
189
410101210923 removed search field from templates
Marcin Kuzminski <marcin@python-works.com>
parents: 183
diff changeset
18 ${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
19 </%def>
219
64e1125fc479 html + css changes, added icons and etc.
Marcin Kuzminski <marcin@python-works.com>
parents: 210
diff changeset
20
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
21 <%def name="main()">
219
64e1125fc479 html + css changes, added icons and etc.
Marcin Kuzminski <marcin@python-works.com>
parents: 210
diff changeset
22 <script type="text/javascript">
64e1125fc479 html + css changes, added icons and etc.
Marcin Kuzminski <marcin@python-works.com>
parents: 210
diff changeset
23 var E = YAHOO.util.Event;
64e1125fc479 html + css changes, added icons and etc.
Marcin Kuzminski <marcin@python-works.com>
parents: 210
diff changeset
24 var D = YAHOO.util.Dom;
64e1125fc479 html + css changes, added icons and etc.
Marcin Kuzminski <marcin@python-works.com>
parents: 210
diff changeset
25
64e1125fc479 html + css changes, added icons and etc.
Marcin Kuzminski <marcin@python-works.com>
parents: 210
diff changeset
26 E.onDOMReady(function(e){
64e1125fc479 html + css changes, added icons and etc.
Marcin Kuzminski <marcin@python-works.com>
parents: 210
diff changeset
27 id = 'clone_url';
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
28 E.addListener(id,'click',function(e){
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
29 D.get('clone_url').select();
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
30 })
219
64e1125fc479 html + css changes, added icons and etc.
Marcin Kuzminski <marcin@python-works.com>
parents: 210
diff changeset
31 })
64e1125fc479 html + css changes, added icons and etc.
Marcin Kuzminski <marcin@python-works.com>
parents: 210
diff changeset
32 </script>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
33 <div class="box box-left">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
34 <!-- box / title -->
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
35 <div class="title">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
36 ${self.breadcrumbs()}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
37 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
38 <!-- end box / title -->
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
39 <div class="form">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
40 <div class="fields">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
41
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
42 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
43 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
44 <label>${_('Name')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
45 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
46 <div class="input-short">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
47 ${c.repo_info.name}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
48 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
49 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
50
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
51
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
52 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
53 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
54 <label>${_('Description')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
55 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
56 <div class="input-short">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
57 ${c.repo_info.description}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
58 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
59 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
60
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
61
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
62 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
63 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
64 <label>${_('Contact')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
65 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
66 <div class="input-short">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
67 ${c.repo_info.contact}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
68 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
69 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
70
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
71 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
72 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
73 <label>${_('Last change')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
74 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
75 <div class="input-short">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
76 ${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
77 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
78 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
79
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
80 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
81 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
82 <label>${_('Clone url')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
83 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
84 <div class="input-short">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
85 <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
86 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
87 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
88
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
89 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
90 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
91 <label>${_('Download')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
92 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
93 <div class="input-short">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
94 %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
95 %if cnt >=1:
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
96 |
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
97 %endif
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
98 ${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
99 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
100 revision='tip',fileformat=archive['extension']),class_="archive_icon")}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
101 %endfor
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
102 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
103 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
104
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
105 <div class="field">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
106 <div class="label">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
107 <label>${_('Feeds')}:</label>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
108 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
109 <div class="input-short">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
110 ${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
111 ${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
112 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
113 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
114 </div>
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
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
118 <div class="box box-right">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
119 <!-- box / title -->
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
120 <div class="title">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
121 <h5>${_('Last month commit activity')}</h5>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
122 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
123
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
124 <div class="table">
379
86a25ad59766 fixed min width set.
Marcin Kuzminski <marcin@python-works.com>
parents: 372
diff changeset
125 <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
126 <div id="legend_data">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
127 <div id="legend_container"></div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
128 <div id="legend_choices">
379
86a25ad59766 fixed min width set.
Marcin Kuzminski <marcin@python-works.com>
parents: 372
diff changeset
129 <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
130 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
131 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
132 <script type="text/javascript">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
133
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
134 (function () {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
135 var datasets = {${c.commit_data|n}};
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
136 var i = 0;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
137 var choiceContainer = YAHOO.util.Dom.get("legend_choices");
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
138 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
139 for(var key in datasets) {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
140 datasets[key].color = i;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
141 i++;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
142 choiceContainerTable.innerHTML += '<tr>'+
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
143 '<td>'+
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
144 '<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
145 '</td>'+
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
146 '</tr>';
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
147 };
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
148
219
64e1125fc479 html + css changes, added icons and etc.
Marcin Kuzminski <marcin@python-works.com>
parents: 210
diff changeset
149
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
150 function plotAccordingToChoices() {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
151 var data = [];
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
152
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
153 var inputs = choiceContainer.getElementsByTagName("input");
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
154 for(var i=0; i<inputs.length; i++) {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
155 if(!inputs[i].checked)
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
156 continue;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
157
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
158 var key = inputs[i].name;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
159 if (key && datasets[key])
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
160 data.push(datasets[key]);
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
161 };
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
162
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
163 if (data.length > 0){
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
164 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
165 { bars: { show: true, align:'center',lineWidth:4 },
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
166 points: { show: true, radius:0,fill:true },
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
167 legend:{show:true, container:"legend_container"},
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
168 selection: { mode: "xy" },
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
169 yaxis:{tickSize:[1]},
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
170 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
171 grid: { hoverable: true, clickable: true,autoHighlight:true },
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
172 });
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
173
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
174 function showTooltip(x, y, contents) {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
175 var div=document.getElementById('tooltip');
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
176 if(!div) {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
177 div = document.createElement('div');
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
178 div.id="tooltip";
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
179 div.style.position="absolute";
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
180 div.style.border='1px solid #fdd';
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
181 div.style.padding='2px';
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
182 div.style.backgroundColor='#fee';
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
183 document.body.appendChild(div);
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
184 }
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
185 YAHOO.util.Dom.setStyle(div, 'opacity', 0);
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
186 div.innerHTML = contents;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
187 div.style.top=(y + 5) + "px";
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
188 div.style.left=(x + 5) + "px";
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
189
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
190 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
191 anim.animate();
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
192 }
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
193
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
194 var previousPoint = null;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
195 plot.subscribe("plothover", function (o) {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
196 var pos = o.pos;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
197 var item = o.item;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
198
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
199 //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
200 //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
201 if (item) {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
202 if (previousPoint != item.datapoint) {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
203 previousPoint = item.datapoint;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
204
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
205 var tooltip = YAHOO.util.Dom.get("tooltip");
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
206 if(tooltip) {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
207 tooltip.parentNode.removeChild(tooltip);
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
208 }
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
209 var x = item.datapoint.x.toFixed(2);
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
210 var y = item.datapoint.y.toFixed(2);
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 if (!item.series.label){
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
213 item.series.label = 'commits';
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 var d = new Date(x*1000);
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
216 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
217 var nr_commits = parseInt(y);
372
1fa58ca0a77e fixed plural messages about commits in graph
Marcin Kuzminski <marcin@python-works.com>
parents: 362
diff changeset
218 var suffix = '';
1fa58ca0a77e fixed plural messages about commits in graph
Marcin Kuzminski <marcin@python-works.com>
parents: 362
diff changeset
219 if(nr_commits > 1){
1fa58ca0a77e fixed plural messages about commits in graph
Marcin Kuzminski <marcin@python-works.com>
parents: 362
diff changeset
220 var suffix = 's';
1fa58ca0a77e fixed plural messages about commits in graph
Marcin Kuzminski <marcin@python-works.com>
parents: 362
diff changeset
221 }
1fa58ca0a77e fixed plural messages about commits in graph
Marcin Kuzminski <marcin@python-works.com>
parents: 362
diff changeset
222 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
223 }
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
224 }
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
225 else {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
226 var tooltip = YAHOO.util.Dom.get("tooltip");
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 if(tooltip) {
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
229 tooltip.parentNode.removeChild(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 previousPoint = null;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
232 }
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
233 });
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
234
362
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 }
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
237
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
238 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
239
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
240 plotAccordingToChoices();
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
241 })();
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
242 </script>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
243
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
244 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
245 </div>
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 class="box">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
248 <div class="title">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
249 <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
250 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
251 <div class="table">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
252 <%include file='../shortlog/shortlog_data.html'/>
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>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
255 <div class="box">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
256 <div class="title">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
257 <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
258 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
259 <div class="table">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
260 <%include file='../tags/tags_data.html'/>
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>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
263 <div class="box">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
264 <div class="title">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
265 <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
266 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
267 <div class="table">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
268 <%include file='../branches/branches_data.html'/>
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>
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
271
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
272 </%def>