Mercurial > kallithea
annotate rhodecode/templates/index_base.html @ 3229:aad51f79d040 beta
added a flag for generating pull-request comments, and force display on pull-requests
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 26 Jan 2013 21:21:11 +0100 |
parents | 8b8edfc25856 |
children | 12f2547cf267 |
rev | line source |
---|---|
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
1 <%page args="parent" /> |
1403
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
2 <div class="box"> |
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
3 <!-- box / title --> |
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
4 <div class="title"> |
1475
aa805ee6ee09
fixes code view issue on chrome
Marcin Kuzminski <marcin@python-works.com>
parents:
1458
diff
changeset
|
5 <h5> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
6 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${parent.breadcrumbs()} <span id="repo_count">0</span> ${_('repositories')} |
1403
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
7 </h5> |
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
8 %if c.rhodecode_user.username != 'default': |
3222
b4daef4cc26d
Group management delegation:
Marcin Kuzminski <marcin@python-works.com>
parents:
3201
diff
changeset
|
9 <ul class="links"> |
1403
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
10 %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
11 <li> |
2130
5242b1619603
#401 repository group is automatically pre-selected when adding repos inside a repository group
Marcin Kuzminski <marcin@python-works.com>
parents:
2121
diff
changeset
|
12 %if c.group: |
3201
663f4f26776a
html: don't hardcode uppercase texts
Mads Kiilerich <madski@unity3d.com>
parents:
3197
diff
changeset
|
13 <span>${h.link_to(_('Add repository'),h.url('admin_settings_create_repository',parent_group=c.group.group_id))}</span> |
2130
5242b1619603
#401 repository group is automatically pre-selected when adding repos inside a repository group
Marcin Kuzminski <marcin@python-works.com>
parents:
2121
diff
changeset
|
14 %else: |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3222
diff
changeset
|
15 <span>${h.link_to(_('Add repository'),h.url('admin_settings_create_repository'))}</span> |
2150
a8c9c0094ddf
White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2133
diff
changeset
|
16 %endif |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
17 </li> |
1403
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
18 %endif |
3222
b4daef4cc26d
Group management delegation:
Marcin Kuzminski <marcin@python-works.com>
parents:
3201
diff
changeset
|
19 %if c.group and h.HasReposGroupPermissionAny('group.admin')(c.group.group_name): |
b4daef4cc26d
Group management delegation:
Marcin Kuzminski <marcin@python-works.com>
parents:
3201
diff
changeset
|
20 <li> |
b4daef4cc26d
Group management delegation:
Marcin Kuzminski <marcin@python-works.com>
parents:
3201
diff
changeset
|
21 <span>${h.link_to(_('Edit group'),h.url('edit_repos_group',group_name=c.group.group_name), title=_('You have admin right to this group, and can edit it'))}</span> |
b4daef4cc26d
Group management delegation:
Marcin Kuzminski <marcin@python-works.com>
parents:
3201
diff
changeset
|
22 </li> |
b4daef4cc26d
Group management delegation:
Marcin Kuzminski <marcin@python-works.com>
parents:
3201
diff
changeset
|
23 %endif |
b4daef4cc26d
Group management delegation:
Marcin Kuzminski <marcin@python-works.com>
parents:
3201
diff
changeset
|
24 </ul> |
1403
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
25 %endif |
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
26 </div> |
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
27 <!-- end box / title --> |
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
28 <div class="table"> |
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
29 % if c.groups: |
1778
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
30 <div id='groups_list_wrap' class="yui-skin-sam"> |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
31 <table id="groups_list"> |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
32 <thead> |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
33 <tr> |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
34 <th class="left"><a href="#">${_('Group name')}</a></th> |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
35 <th class="left"><a href="#">${_('Description')}</a></th> |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
36 ##<th class="left"><a href="#">${_('Number of repositories')}</a></th> |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
37 </tr> |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
38 </thead> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
39 |
1778
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
40 ## REPO GROUPS |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
41 % for gr in c.groups: |
1403
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
42 <tr> |
1778
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
43 <td> |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
44 <div style="white-space: nowrap"> |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
45 <img class="icon" alt="${_('Repositories group')}" src="${h.url('/images/icons/database_link.png')}"/> |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
46 ${h.link_to(gr.name,url('repos_group_home',group_name=gr.group_name))} |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
47 </div> |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
48 </td> |
2674
a221706dab50
merged + fixed pull request #62: Implemented metatags and visualisation options.
Marcin Kuzminski <marcin@python-works.com>
parents:
2548
diff
changeset
|
49 %if c.visual.stylify_metatags: |
2785
f1f01e951008
urlify group description also
Marcin Kuzminski <marcin@python-works.com>
parents:
2686
diff
changeset
|
50 <td>${h.urlify_text(h.desc_stylize(gr.group_description))}</td> |
2674
a221706dab50
merged + fixed pull request #62: Implemented metatags and visualisation options.
Marcin Kuzminski <marcin@python-works.com>
parents:
2548
diff
changeset
|
51 %else: |
a221706dab50
merged + fixed pull request #62: Implemented metatags and visualisation options.
Marcin Kuzminski <marcin@python-works.com>
parents:
2548
diff
changeset
|
52 <td>${gr.group_description}</td> |
a221706dab50
merged + fixed pull request #62: Implemented metatags and visualisation options.
Marcin Kuzminski <marcin@python-works.com>
parents:
2548
diff
changeset
|
53 %endif |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
54 ## this is commented out since for multi nested repos can be HEAVY! |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
55 ## in number of executed queries during traversing uncomment at will |
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
56 ##<td><b>${gr.repositories_recursive_count}</b></td> |
1403
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
57 </tr> |
1778
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
58 % endfor |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
59 </table> |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
60 </div> |
3155
0cb48c083c6b
fixes issues with groups paginator
Marcin Kuzminski <marcin@python-works.com>
parents:
3154
diff
changeset
|
61 <div id="group-user-paginator" style="padding: 0px 0px 0px 0px"></div> |
1403
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
62 <div style="height: 20px"></div> |
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
63 % endif |
1437
7a46d67c263c
added welcome message if no repositories are present in current view
Marcin Kuzminski <marcin@python-works.com>
parents:
1426
diff
changeset
|
64 <div id="welcome" style="display:none;text-align:center"> |
7a46d67c263c
added welcome message if no repositories are present in current view
Marcin Kuzminski <marcin@python-works.com>
parents:
1426
diff
changeset
|
65 <h1><a href="${h.url('home')}">${c.rhodecode_name} ${c.rhodecode_version}</a></h1> |
7a46d67c263c
added welcome message if no repositories are present in current view
Marcin Kuzminski <marcin@python-works.com>
parents:
1426
diff
changeset
|
66 </div> |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
67 <%cnt=0%> |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
68 <%namespace name="dt" file="/data_table/_dt_elements.html"/> |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
69 % if c.visual.lightweight_dashboard is False: |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
70 ## old full detailed version |
1778
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
71 <div id='repos_list_wrap' class="yui-skin-sam"> |
1437
7a46d67c263c
added welcome message if no repositories are present in current view
Marcin Kuzminski <marcin@python-works.com>
parents:
1426
diff
changeset
|
72 <table id="repos_list"> |
1403
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
73 <thead> |
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
74 <tr> |
1423
241a5167c4e0
Added quick menu for each repo in main page.
Marcin Kuzminski <marcin@python-works.com>
parents:
1403
diff
changeset
|
75 <th class="left"></th> |
1482
a39c0e5fca89
removed obsolete sort code
Marcin Kuzminski <marcin@python-works.com>
parents:
1475
diff
changeset
|
76 <th class="left">${_('Name')}</th> |
a39c0e5fca89
removed obsolete sort code
Marcin Kuzminski <marcin@python-works.com>
parents:
1475
diff
changeset
|
77 <th class="left">${_('Description')}</th> |
a39c0e5fca89
removed obsolete sort code
Marcin Kuzminski <marcin@python-works.com>
parents:
1475
diff
changeset
|
78 <th class="left">${_('Last change')}</th> |
a39c0e5fca89
removed obsolete sort code
Marcin Kuzminski <marcin@python-works.com>
parents:
1475
diff
changeset
|
79 <th class="left">${_('Tip')}</th> |
a39c0e5fca89
removed obsolete sort code
Marcin Kuzminski <marcin@python-works.com>
parents:
1475
diff
changeset
|
80 <th class="left">${_('Owner')}</th> |
1403
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
81 <th class="left">${_('RSS')}</th> |
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
82 <th class="left">${_('Atom')}</th> |
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
83 </tr> |
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
84 </thead> |
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
85 <tbody> |
2068 | 86 %for cnt,repo in enumerate(c.repos_list): |
87 <tr class="parity${(cnt+1)%2}"> | |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
88 ##QUICK MENU |
1424
ac0c4e600426
removed obsolete class from quick menu
Marcin Kuzminski <marcin@python-works.com>
parents:
1423
diff
changeset
|
89 <td class="quick_repo_menu"> |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
90 ${dt.quick_menu(repo['name'])} |
1423
241a5167c4e0
Added quick menu for each repo in main page.
Marcin Kuzminski <marcin@python-works.com>
parents:
1403
diff
changeset
|
91 </td> |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
92 ##REPO NAME AND ICONS |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
93 <td class="reponame"> |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
94 ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],h.AttributeDict(repo['dbrepo_fork']),pageargs.get('short_repo_names'))} |
1403
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
95 </td> |
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
96 ##DESCRIPTION |
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
97 <td><span class="tooltip" title="${h.tooltip(repo['description'])}"> |
2674
a221706dab50
merged + fixed pull request #62: Implemented metatags and visualisation options.
Marcin Kuzminski <marcin@python-works.com>
parents:
2548
diff
changeset
|
98 %if c.visual.stylify_metatags: |
a221706dab50
merged + fixed pull request #62: Implemented metatags and visualisation options.
Marcin Kuzminski <marcin@python-works.com>
parents:
2548
diff
changeset
|
99 ${h.urlify_text(h.desc_stylize(h.truncate(repo['description'],60)))}</span> |
a221706dab50
merged + fixed pull request #62: Implemented metatags and visualisation options.
Marcin Kuzminski <marcin@python-works.com>
parents:
2548
diff
changeset
|
100 %else: |
1403
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
101 ${h.truncate(repo['description'],60)}</span> |
2674
a221706dab50
merged + fixed pull request #62: Implemented metatags and visualisation options.
Marcin Kuzminski <marcin@python-works.com>
parents:
2548
diff
changeset
|
102 %endif |
1403
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
103 </td> |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
104 ##LAST CHANGE DATE |
1403
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
105 <td> |
2937
d439d408b415
Update last_change from VCS data on request.
Marcin Kuzminski <marcin@python-works.com>
parents:
2936
diff
changeset
|
106 ${dt.last_change(repo['last_change'])} |
1403
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
107 </td> |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
108 ##LAST REVISION |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
109 <td> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
110 ${dt.revision(repo['name'],repo['rev'],repo['tip'],repo['author'],repo['last_msg'])} |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
111 </td> |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
112 ## |
1403
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
113 <td title="${repo['contact']}">${h.person(repo['contact'])}</td> |
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
114 <td> |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
115 ${dt.rss(repo['name'])} |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
116 </td> |
1403
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
117 <td> |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
118 ${dt.atom(repo['name'])} |
1403
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
119 </td> |
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
120 </tr> |
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
121 %endfor |
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
122 </tbody> |
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
123 </table> |
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
124 </div> |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
125 % else: |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
126 ## lightweight version |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
127 <div class="yui-skin-sam" id="repos_list_wrap"></div> |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
128 <div id="user-paginator" style="padding: 0px 0px 0px 0px"></div> |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
129 % endif |
1778
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
130 </div> |
1403
fc286aed92fe
fixes #209, repos groups and index page now share same common page.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
131 </div> |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
132 % if c.visual.lightweight_dashboard is False: |
1653
b1e1dffd595c
one generic qfilter function.
Marcin Kuzminski <marcin@python-works.com>
parents:
1624
diff
changeset
|
133 <script> |
2454
3bb99e3e0e44
fix issue #458 wrong count when no repos are present
Marcin Kuzminski <marcin@python-works.com>
parents:
2427
diff
changeset
|
134 YUD.get('repo_count').innerHTML = ${cnt+1 if cnt else 0}; |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
135 |
1778
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
136 // groups table sorting |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
137 var myColumnDefs = [ |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
138 {key:"name",label:"${_('Group name')}",sortable:true, |
1778
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
139 sortOptions: { sortFunction: groupNameSort }}, |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
140 {key:"desc",label:"${_('Description')}",sortable:true}, |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
141 ]; |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
142 |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
143 var myDataSource = new YAHOO.util.DataSource(YUD.get("groups_list")); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
144 |
1778
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
145 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
146 myDataSource.responseSchema = { |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
147 fields: [ |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
148 {key:"name"}, |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
149 {key:"desc"}, |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
150 ] |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
151 }; |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
152 |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
153 var myDataTable = new YAHOO.widget.DataTable("groups_list_wrap", myColumnDefs, myDataSource,{ |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
154 sortedBy:{key:"name",dir:"asc"}, |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
155 paginator: new YAHOO.widget.Paginator({ |
3155
0cb48c083c6b
fixes issues with groups paginator
Marcin Kuzminski <marcin@python-works.com>
parents:
3154
diff
changeset
|
156 rowsPerPage: 50, |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
157 alwaysVisible: false, |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
158 template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
159 pageLinks: 5, |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
160 containerClass: 'pagination-wh', |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
161 currentPageClass: 'pager_curpage', |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
162 pageLinkClass: 'pager_link', |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
163 nextPageLinkLabel: '>', |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
164 previousPageLinkLabel: '<', |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
165 firstPageLinkLabel: '<<', |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
166 lastPageLinkLabel: '>>', |
3155
0cb48c083c6b
fixes issues with groups paginator
Marcin Kuzminski <marcin@python-works.com>
parents:
3154
diff
changeset
|
167 containers:['group-user-paginator'] |
2973
9937afa7f093
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
168 }), |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
169 MSG_SORTASC:"${_('Click to sort ascending')}", |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
170 MSG_SORTDESC:"${_('Click to sort descending')}" |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
171 }); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
172 |
1778
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
173 // main table sorting |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
174 var myColumnDefs = [ |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
175 {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
176 {key:"name",label:"${_('Name')}",sortable:true, |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
177 sortOptions: { sortFunction: nameSort }}, |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
178 {key:"desc",label:"${_('Description')}",sortable:true}, |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
179 {key:"last_change",label:"${_('Last Change')}",sortable:true, |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
180 sortOptions: { sortFunction: ageSort }}, |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
181 {key:"tip",label:"${_('Tip')}",sortable:true, |
3197 | 182 sortOptions: { sortFunction: revisionSort }}, |
1778
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
183 {key:"owner",label:"${_('Owner')}",sortable:true}, |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
184 {key:"rss",label:"",sortable:false}, |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
185 {key:"atom",label:"",sortable:false}, |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
186 ]; |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
187 |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
188 var myDataSource = new YAHOO.util.DataSource(YUD.get("repos_list")); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
189 |
1778
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
190 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
191 |
1778
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
192 myDataSource.responseSchema = { |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
193 fields: [ |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
194 {key:"menu"}, |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
195 //{key:"raw_name"}, |
1778
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
196 {key:"name"}, |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
197 {key:"desc"}, |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
198 {key:"last_change"}, |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
199 {key:"tip"}, |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
200 {key:"owner"}, |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
201 {key:"rss"}, |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
202 {key:"atom"}, |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
203 ] |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
204 }; |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
205 |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
206 var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource, |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
207 { |
3197 | 208 sortedBy:{key:"name",dir:"asc"}, |
1778
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
209 MSG_SORTASC:"${_('Click to sort ascending')}", |
1780
b9539c4df92f
Translations fixes for Data table
Marcin Kuzminski <marcin@python-works.com>
parents:
1779
diff
changeset
|
210 MSG_SORTDESC:"${_('Click to sort descending')}", |
b9539c4df92f
Translations fixes for Data table
Marcin Kuzminski <marcin@python-works.com>
parents:
1779
diff
changeset
|
211 MSG_EMPTY:"${_('No records found.')}", |
b9539c4df92f
Translations fixes for Data table
Marcin Kuzminski <marcin@python-works.com>
parents:
1779
diff
changeset
|
212 MSG_ERROR:"${_('Data error.')}", |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
213 MSG_LOADING:"${_('Loading...')}", |
1778
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
214 } |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
215 ); |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
216 myDataTable.subscribe('postRenderEvent',function(oArgs) { |
defcf245f3e9
fixes #229 repo sorting is not working.
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
217 tooltip_activate(); |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1778
diff
changeset
|
218 quick_repo_menu(); |
3154
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
3149
diff
changeset
|
219 var func = function(node){ |
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
3149
diff
changeset
|
220 return node.parentNode.parentNode.parentNode.parentNode; |
3168
2fb94c52e20e
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3155
diff
changeset
|
221 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
222 q_filter('q_filter',YUQ('div.table tr td a.repo_name'),func); |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
223 }); |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
224 |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
225 </script> |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
226 % else: |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
227 <script> |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
228 var data = ${c.data|n}; |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
229 var myDataSource = new YAHOO.util.DataSource(data); |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
230 myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; |
2973
9937afa7f093
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
231 |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
232 myDataSource.responseSchema = { |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
233 resultsList: "records", |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
234 fields: [ |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
235 {key:"menu"}, |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
236 {key:"raw_name"}, |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
237 {key:"name"}, |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
238 {key:"desc"}, |
2937
d439d408b415
Update last_change from VCS data on request.
Marcin Kuzminski <marcin@python-works.com>
parents:
2936
diff
changeset
|
239 {key:"last_change"}, |
3154
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
3149
diff
changeset
|
240 {key:"last_changeset"}, |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
241 {key:"owner"}, |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
242 {key:"rss"}, |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
243 {key:"atom"}, |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
244 ] |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
245 }; |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
246 myDataSource.doBeforeCallback = function(req,raw,res,cb) { |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
247 // This is the filter function |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
248 var data = res.results || [], |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
249 filtered = [], |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
250 i,l; |
2973
9937afa7f093
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
251 |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
252 if (req) { |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
253 req = req.toLowerCase(); |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
254 for (i = 0; i<data.length; i++) { |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
255 var pos = data[i].raw_name.toLowerCase().indexOf(req) |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
256 if (pos != -1) { |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
257 filtered.push(data[i]); |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
258 } |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
259 } |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
260 res.results = filtered; |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
261 } |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
262 YUD.get('repo_count').innerHTML = res.results.length; |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
263 return res; |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
264 } |
2973
9937afa7f093
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
265 |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
266 // main table sorting |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
267 var myColumnDefs = [ |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
268 {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
269 {key:"name",label:"${_('Name')}",sortable:true, |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
270 sortOptions: { sortFunction: nameSort }}, |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
271 {key:"desc",label:"${_('Description')}",sortable:true}, |
2937
d439d408b415
Update last_change from VCS data on request.
Marcin Kuzminski <marcin@python-works.com>
parents:
2936
diff
changeset
|
272 {key:"last_change",label:"${_('Last Change')}",sortable:true, |
d439d408b415
Update last_change from VCS data on request.
Marcin Kuzminski <marcin@python-works.com>
parents:
2936
diff
changeset
|
273 sortOptions: { sortFunction: ageSort }}, |
3154
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
3149
diff
changeset
|
274 {key:"last_changeset",label:"${_('Tip')}",sortable:true, |
3149
68f9c216377d
white space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
3147
diff
changeset
|
275 sortOptions: { sortFunction: revisionSort }}, |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
276 {key:"owner",label:"${_('Owner')}",sortable:true}, |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
277 {key:"rss",label:"",sortable:false}, |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
278 {key:"atom",label:"",sortable:false}, |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
279 ]; |
2973
9937afa7f093
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
280 |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
281 var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{ |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
282 sortedBy:{key:"name",dir:"asc"}, |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
283 paginator: new YAHOO.widget.Paginator({ |
3087
a797ada9d2ad
added option to ini file to define lightweight dashboard items per page before pagination
Marcin Kuzminski <marcin@python-works.com>
parents:
2973
diff
changeset
|
284 rowsPerPage: ${c.visual.lightweight_dashboard_items}, |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
285 alwaysVisible: false, |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
286 template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
287 pageLinks: 5, |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
288 containerClass: 'pagination-wh', |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
289 currentPageClass: 'pager_curpage', |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
290 pageLinkClass: 'pager_link', |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
291 nextPageLinkLabel: '>', |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
292 previousPageLinkLabel: '<', |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
293 firstPageLinkLabel: '<<', |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
294 lastPageLinkLabel: '>>', |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
295 containers:['user-paginator'] |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
296 }), |
2973
9937afa7f093
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
297 |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
298 MSG_SORTASC:"${_('Click to sort ascending')}", |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
299 MSG_SORTDESC:"${_('Click to sort descending')}", |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
300 MSG_EMPTY:"${_('No records found.')}", |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
301 MSG_ERROR:"${_('Data error.')}", |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
302 MSG_LOADING:"${_('Loading...')}", |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
303 } |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
304 ); |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
305 myDataTable.subscribe('postRenderEvent',function(oArgs) { |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
306 tooltip_activate(); |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
307 quick_repo_menu(); |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
308 }); |
2973
9937afa7f093
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
309 |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
310 var filterTimeout = null; |
2973
9937afa7f093
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
311 |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
312 updateFilter = function () { |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
313 // Reset timeout |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
314 filterTimeout = null; |
2973
9937afa7f093
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
315 |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
316 // Reset sort |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
317 var state = myDataTable.getState(); |
3154
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
3149
diff
changeset
|
318 state.sortedBy = {key:'name', dir:YAHOO.widget.DataTable.CLASS_ASC}; |
2973
9937afa7f093
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
319 |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
320 // Get filtered data |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
321 myDataSource.sendRequest(YUD.get('q_filter').value,{ |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
322 success : myDataTable.onDataReturnInitializeTable, |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
323 failure : myDataTable.onDataReturnInitializeTable, |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
324 scope : myDataTable, |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
325 argument: state |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
326 }); |
2973
9937afa7f093
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
327 |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
328 }; |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
329 YUE.on('q_filter','click',function(){ |
3154
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
3149
diff
changeset
|
330 if(!YUD.hasClass('q_filter', 'loaded')){ |
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
3149
diff
changeset
|
331 YUD.get('q_filter').value = ''; |
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
3149
diff
changeset
|
332 //TODO: load here full list later to do search within groups |
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
3149
diff
changeset
|
333 YUD.addClass('q_filter', 'loaded'); |
0226b6d6b2b5
Use common function for generation of grid data
Marcin Kuzminski <marcin@python-works.com>
parents:
3149
diff
changeset
|
334 } |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
335 }); |
2973
9937afa7f093
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2937
diff
changeset
|
336 |
2936
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
337 YUE.on('q_filter','keyup',function (e) { |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
338 clearTimeout(filterTimeout); |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
339 filterTimeout = setTimeout(updateFilter,600); |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
340 }); |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
341 </script> |
62e493c7f436
Added lightweight dashboard option. ref #500
Marcin Kuzminski <marcin@python-works.com>
parents:
2785
diff
changeset
|
342 % endif |