Mercurial > kallithea
annotate rhodecode/templates/index.html @ 1202:eef9e273347a beta
added focus to login register password reminder forms
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 03 Apr 2011 12:43:29 +0200 |
parents | 7d2c16725be6 |
children | d87997ed6ef1 |
rev | line source |
---|---|
55
e00dccb6f211
Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents:
0
diff
changeset
|
1 ## -*- coding: utf-8 -*- |
e00dccb6f211
Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents:
0
diff
changeset
|
2 <%inherit file="base/base.html"/> |
e00dccb6f211
Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents:
0
diff
changeset
|
3 <%def name="title()"> |
619
a1ec653f5f95
#38 updated RhodeCode titles
Marcin Kuzminski <marcin@python-works.com>
parents:
579
diff
changeset
|
4 ${_('Dashboard')} - ${c.rhodecode_name} |
55
e00dccb6f211
Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents:
0
diff
changeset
|
5 </%def> |
e00dccb6f211
Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents:
0
diff
changeset
|
6 <%def name="breadcrumbs()"> |
548
b75b77ef649d
renamed hg_app to rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
7 ${c.rhodecode_name} |
55
e00dccb6f211
Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents:
0
diff
changeset
|
8 </%def> |
e00dccb6f211
Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents:
0
diff
changeset
|
9 <%def name="page_nav()"> |
186
556473ba0399
fixed menu in home page, and added login html with forms that validates username and password.
Marcin Kuzminski <marcin@python-works.com>
parents:
157
diff
changeset
|
10 ${self.menu('home')} |
0 | 11 </%def> |
55
e00dccb6f211
Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents:
0
diff
changeset
|
12 <%def name="main()"> |
e00dccb6f211
Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents:
0
diff
changeset
|
13 <%def name="get_sort(name)"> |
57
e96bc5a01490
Implemented main page sorting
Marcin Kuzminski <marcin@python-blog.com>
parents:
56
diff
changeset
|
14 <%name_slug = name.lower().replace(' ','_') %> |
447
70c2750531d3
rewrote sorting on main page, to clickable headers.
Marcin Kuzminski <marcin@python-works.com>
parents:
417
diff
changeset
|
15 |
70c2750531d3
rewrote sorting on main page, to clickable headers.
Marcin Kuzminski <marcin@python-works.com>
parents:
417
diff
changeset
|
16 %if name_slug == c.sort_slug: |
70c2750531d3
rewrote sorting on main page, to clickable headers.
Marcin Kuzminski <marcin@python-works.com>
parents:
417
diff
changeset
|
17 %if c.sort_by.startswith('-'): |
70c2750531d3
rewrote sorting on main page, to clickable headers.
Marcin Kuzminski <marcin@python-works.com>
parents:
417
diff
changeset
|
18 <a href="?sort=${name_slug}">${name}↑</a> |
70c2750531d3
rewrote sorting on main page, to clickable headers.
Marcin Kuzminski <marcin@python-works.com>
parents:
417
diff
changeset
|
19 %else: |
70c2750531d3
rewrote sorting on main page, to clickable headers.
Marcin Kuzminski <marcin@python-works.com>
parents:
417
diff
changeset
|
20 <a href="?sort=-${name_slug}">${name}↓</a> |
70c2750531d3
rewrote sorting on main page, to clickable headers.
Marcin Kuzminski <marcin@python-works.com>
parents:
417
diff
changeset
|
21 %endif: |
57
e96bc5a01490
Implemented main page sorting
Marcin Kuzminski <marcin@python-blog.com>
parents:
56
diff
changeset
|
22 %else: |
447
70c2750531d3
rewrote sorting on main page, to clickable headers.
Marcin Kuzminski <marcin@python-works.com>
parents:
417
diff
changeset
|
23 <a href="?sort=${name_slug}">${name}</a> |
56
bf1b64046c79
Added last change translation to 'time ago', added generation of enabled zip archives
Marcin Kuzminski <marcin@python-blog.com>
parents:
55
diff
changeset
|
24 %endif |
55
e00dccb6f211
Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents:
0
diff
changeset
|
25 </%def> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
350
diff
changeset
|
26 |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
350
diff
changeset
|
27 <div class="box"> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
350
diff
changeset
|
28 <!-- box / title --> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
350
diff
changeset
|
29 <div class="title"> |
1192
01fe71db71f6
added repo count to dashboard
Marcin Kuzminski <marcin@python-works.com>
parents:
1122
diff
changeset
|
30 <h5><input class="top-right-rounded-corner top-left-rounded-corner |
01fe71db71f6
added repo count to dashboard
Marcin Kuzminski <marcin@python-works.com>
parents:
1122
diff
changeset
|
31 bottom-left-rounded-corner bottom-right-rounded-corner" |
01fe71db71f6
added repo count to dashboard
Marcin Kuzminski <marcin@python-works.com>
parents:
1122
diff
changeset
|
32 id="q_filter" size="15" type="text" name="filter" |
01fe71db71f6
added repo count to dashboard
Marcin Kuzminski <marcin@python-works.com>
parents:
1122
diff
changeset
|
33 value="${_('quick filter...')}"/> |
01fe71db71f6
added repo count to dashboard
Marcin Kuzminski <marcin@python-works.com>
parents:
1122
diff
changeset
|
34 |
1201
7d2c16725be6
quick filter will update repo count
Marcin Kuzminski <marcin@python-works.com>
parents:
1192
diff
changeset
|
35 ${_('Dashboard')} - <span id="repo_count">${c.repo_cnt}</span> ${_('repositories')} |
646
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
36 </h5> |
797
81c173490971
fixed remeber passwords css, and hide add new repository for anonymous users
Marcin Kuzminski <marcin@python-works.com>
parents:
668
diff
changeset
|
37 %if c.rhodecode_user.username != 'default': |
81c173490971
fixed remeber passwords css, and hide add new repository for anonymous users
Marcin Kuzminski <marcin@python-works.com>
parents:
668
diff
changeset
|
38 %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
81c173490971
fixed remeber passwords css, and hide add new repository for anonymous users
Marcin Kuzminski <marcin@python-works.com>
parents:
668
diff
changeset
|
39 <ul class="links"> |
81c173490971
fixed remeber passwords css, and hide add new repository for anonymous users
Marcin Kuzminski <marcin@python-works.com>
parents:
668
diff
changeset
|
40 <li> |
81c173490971
fixed remeber passwords css, and hide add new repository for anonymous users
Marcin Kuzminski <marcin@python-works.com>
parents:
668
diff
changeset
|
41 <span>${h.link_to(_('ADD NEW REPOSITORY'),h.url('admin_settings_create_repository'))}</span> |
81c173490971
fixed remeber passwords css, and hide add new repository for anonymous users
Marcin Kuzminski <marcin@python-works.com>
parents:
668
diff
changeset
|
42 </li> |
81c173490971
fixed remeber passwords css, and hide add new repository for anonymous users
Marcin Kuzminski <marcin@python-works.com>
parents:
668
diff
changeset
|
43 </ul> |
81c173490971
fixed remeber passwords css, and hide add new repository for anonymous users
Marcin Kuzminski <marcin@python-works.com>
parents:
668
diff
changeset
|
44 %endif |
81c173490971
fixed remeber passwords css, and hide add new repository for anonymous users
Marcin Kuzminski <marcin@python-works.com>
parents:
668
diff
changeset
|
45 %endif |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
350
diff
changeset
|
46 </div> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
350
diff
changeset
|
47 <!-- end box / title --> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
350
diff
changeset
|
48 <div class="table"> |
646
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
49 <table> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
350
diff
changeset
|
50 <thead> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
350
diff
changeset
|
51 <tr> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
350
diff
changeset
|
52 <th class="left">${get_sort(_('Name'))}</th> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
350
diff
changeset
|
53 <th class="left">${get_sort(_('Description'))}</th> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
350
diff
changeset
|
54 <th class="left">${get_sort(_('Last change'))}</th> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
350
diff
changeset
|
55 <th class="left">${get_sort(_('Tip'))}</th> |
633
fcf599cd3404
Move changes for git implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
619
diff
changeset
|
56 <th class="left">${get_sort(_('Owner'))}</th> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
350
diff
changeset
|
57 <th class="left">${_('RSS')}</th> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
350
diff
changeset
|
58 <th class="left">${_('Atom')}</th> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
350
diff
changeset
|
59 </tr> |
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
350
diff
changeset
|
60 </thead> |
646
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
61 <tbody> |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
62 %for cnt,repo in enumerate(c.repos_list): |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
63 <tr class="parity${cnt%2}"> |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
64 <td> |
668
dff6d5cb8bba
fixed deletion of repository on filesystem, works based on scm type for git and hg.
Marcin Kuzminski <marcin@python-works.com>
parents:
647
diff
changeset
|
65 <div style="white-space: nowrap"> |
647
5e209dcd3821
Added quickfilter into my account.
Marcin Kuzminski <marcin@python-works.com>
parents:
646
diff
changeset
|
66 ## TYPE OF REPO |
1045
3fc9183e05dd
another major codes rewrite:
Marcin Kuzminski <marcin@python-works.com>
parents:
1038
diff
changeset
|
67 %if repo['dbrepo']['repo_type'] =='hg': |
1051
90eadff2c2a8
changed all urls for IMAGES files to use pylons url function
Marcin Kuzminski <marcin@python-works.com>
parents:
1045
diff
changeset
|
68 <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url("/images/icons/hgicon.png")}"/> |
1045
3fc9183e05dd
another major codes rewrite:
Marcin Kuzminski <marcin@python-works.com>
parents:
1038
diff
changeset
|
69 %elif repo['dbrepo']['repo_type'] =='git': |
1051
90eadff2c2a8
changed all urls for IMAGES files to use pylons url function
Marcin Kuzminski <marcin@python-works.com>
parents:
1045
diff
changeset
|
70 <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url("/images/icons/giticon.png")}"/> |
646
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
71 %else: |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
72 |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
73 %endif |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
74 |
647
5e209dcd3821
Added quickfilter into my account.
Marcin Kuzminski <marcin@python-works.com>
parents:
646
diff
changeset
|
75 ##PRIVATE/PUBLIC |
1045
3fc9183e05dd
another major codes rewrite:
Marcin Kuzminski <marcin@python-works.com>
parents:
1038
diff
changeset
|
76 %if repo['dbrepo']['private']: |
1051
90eadff2c2a8
changed all urls for IMAGES files to use pylons url function
Marcin Kuzminski <marcin@python-works.com>
parents:
1045
diff
changeset
|
77 <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url("/images/icons/lock.png")}"/> |
646
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
78 %else: |
1051
90eadff2c2a8
changed all urls for IMAGES files to use pylons url function
Marcin Kuzminski <marcin@python-works.com>
parents:
1045
diff
changeset
|
79 <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url("/images/icons/lock_open.png")}"/> |
647
5e209dcd3821
Added quickfilter into my account.
Marcin Kuzminski <marcin@python-works.com>
parents:
646
diff
changeset
|
80 %endif |
5e209dcd3821
Added quickfilter into my account.
Marcin Kuzminski <marcin@python-works.com>
parents:
646
diff
changeset
|
81 |
5e209dcd3821
Added quickfilter into my account.
Marcin Kuzminski <marcin@python-works.com>
parents:
646
diff
changeset
|
82 ##NAME |
646
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
83 ${h.link_to(repo['name'], |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
84 h.url('summary_home',repo_name=repo['name']),class_="repo_name")} |
1045
3fc9183e05dd
another major codes rewrite:
Marcin Kuzminski <marcin@python-works.com>
parents:
1038
diff
changeset
|
85 %if repo['dbrepo_fork']: |
3fc9183e05dd
another major codes rewrite:
Marcin Kuzminski <marcin@python-works.com>
parents:
1038
diff
changeset
|
86 <a href="${h.url('summary_home',repo_name=repo['dbrepo_fork']['repo_name'])}"> |
646
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
87 <img class="icon" alt="${_('fork')}" |
1045
3fc9183e05dd
another major codes rewrite:
Marcin Kuzminski <marcin@python-works.com>
parents:
1038
diff
changeset
|
88 title="${_('Fork of')} ${repo['dbrepo_fork']['repo_name']}" |
1051
90eadff2c2a8
changed all urls for IMAGES files to use pylons url function
Marcin Kuzminski <marcin@python-works.com>
parents:
1045
diff
changeset
|
89 src="${h.url("/images/icons/arrow_divide.png")}"/></a> |
646
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
90 %endif |
668
dff6d5cb8bba
fixed deletion of repository on filesystem, works based on scm type for git and hg.
Marcin Kuzminski <marcin@python-works.com>
parents:
647
diff
changeset
|
91 </div> |
646
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
92 </td> |
647
5e209dcd3821
Added quickfilter into my account.
Marcin Kuzminski <marcin@python-works.com>
parents:
646
diff
changeset
|
93 ##DESCRIPTION |
905
1294f2baf2bc
added wrapping of long tooltips in index page
Marcin Kuzminski <marcin@python-works.com>
parents:
904
diff
changeset
|
94 <td><span class="tooltip" title="${h.tooltip(repo['description'])}"> |
646
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
95 ${h.truncate(repo['description'],60)}</span> |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
96 </td> |
647
5e209dcd3821
Added quickfilter into my account.
Marcin Kuzminski <marcin@python-works.com>
parents:
646
diff
changeset
|
97 ##LAST CHANGE |
5e209dcd3821
Added quickfilter into my account.
Marcin Kuzminski <marcin@python-works.com>
parents:
646
diff
changeset
|
98 <td> |
904
82aaf4e71817
reimplemented tooltip, refactored tooltip_title into title for proper html,
Marcin Kuzminski <marcin@python-works.com>
parents:
799
diff
changeset
|
99 <span class="tooltip" title="${repo['last_change']}"> |
799
6d37fe113da0
fixes to #85, some other small changes for summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
797
diff
changeset
|
100 ${h.age(repo['last_change'])}</span> |
646
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
101 </td> |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
102 <td> |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
103 %if repo['rev']>=0: |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
104 ${h.link_to('r%s:%s' % (repo['rev'],h.short_id(repo['tip'])), |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
105 h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']), |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
106 class_="tooltip", |
904
82aaf4e71817
reimplemented tooltip, refactored tooltip_title into title for proper html,
Marcin Kuzminski <marcin@python-works.com>
parents:
799
diff
changeset
|
107 title=h.tooltip(repo['last_msg']))} |
646
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
108 %else: |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
109 ${_('No changesets yet')} |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
110 %endif |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
111 </td> |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
112 <td title="${repo['contact']}">${h.person(repo['contact'])}</td> |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
113 <td> |
1122
31e82d872631
disabled api key for anonymous users, and added api_key to rss/atom links for other users
Marcin Kuzminski <marcin@python-works.com>
parents:
1051
diff
changeset
|
114 %if c.rhodecode_user.username != 'default': |
31e82d872631
disabled api key for anonymous users, and added api_key to rss/atom links for other users
Marcin Kuzminski <marcin@python-works.com>
parents:
1051
diff
changeset
|
115 <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'],api_key=c.rhodecode_user.api_key)}"></a> |
31e82d872631
disabled api key for anonymous users, and added api_key to rss/atom links for other users
Marcin Kuzminski <marcin@python-works.com>
parents:
1051
diff
changeset
|
116 %else: |
31e82d872631
disabled api key for anonymous users, and added api_key to rss/atom links for other users
Marcin Kuzminski <marcin@python-works.com>
parents:
1051
diff
changeset
|
117 <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'])}"></a> |
31e82d872631
disabled api key for anonymous users, and added api_key to rss/atom links for other users
Marcin Kuzminski <marcin@python-works.com>
parents:
1051
diff
changeset
|
118 %endif: |
646
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
119 </td> |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
120 <td> |
1122
31e82d872631
disabled api key for anonymous users, and added api_key to rss/atom links for other users
Marcin Kuzminski <marcin@python-works.com>
parents:
1051
diff
changeset
|
121 %if c.rhodecode_user.username != 'default': |
31e82d872631
disabled api key for anonymous users, and added api_key to rss/atom links for other users
Marcin Kuzminski <marcin@python-works.com>
parents:
1051
diff
changeset
|
122 <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=repo['name'],api_key=c.rhodecode_user.api_key)}"></a> |
31e82d872631
disabled api key for anonymous users, and added api_key to rss/atom links for other users
Marcin Kuzminski <marcin@python-works.com>
parents:
1051
diff
changeset
|
123 %else: |
646
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
124 <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=repo['name'])}"></a> |
1122
31e82d872631
disabled api key for anonymous users, and added api_key to rss/atom links for other users
Marcin Kuzminski <marcin@python-works.com>
parents:
1051
diff
changeset
|
125 %endif: |
646
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
126 </td> |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
127 </tr> |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
128 %endfor |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
129 </tbody> |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
130 </table> |
362
558eb7c5028f
version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents:
350
diff
changeset
|
131 </div> |
646
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
132 </div> |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
133 |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
134 |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
135 <script type="text/javascript"> |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
136 var D = YAHOO.util.Dom; |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
137 var E = YAHOO.util.Event; |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
138 var S = YAHOO.util.Selector; |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
139 |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
140 var q_filter = D.get('q_filter'); |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
141 var F = YAHOO.namespace('q_filter'); |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
142 |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
143 E.on(q_filter,'click',function(){ |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
144 q_filter.value = ''; |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
145 }); |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
146 |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
147 F.filterTimeout = null; |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
148 |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
149 F.updateFilter = function() { |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
150 // Reset timeout |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
151 F.filterTimeout = null; |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
152 |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
153 var obsolete = []; |
668
dff6d5cb8bba
fixed deletion of repository on filesystem, works based on scm type for git and hg.
Marcin Kuzminski <marcin@python-works.com>
parents:
647
diff
changeset
|
154 var nodes = S.query('div.table tr td div a.repo_name'); |
646
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
155 var req = D.get('q_filter').value; |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
156 for (n in nodes){ |
668
dff6d5cb8bba
fixed deletion of repository on filesystem, works based on scm type for git and hg.
Marcin Kuzminski <marcin@python-works.com>
parents:
647
diff
changeset
|
157 D.setStyle(nodes[n].parentNode.parentNode.parentNode,'display','') |
646
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
158 } |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
159 if (req){ |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
160 for (n in nodes){ |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
161 if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) { |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
162 obsolete.push(nodes[n]); |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
163 } |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
164 } |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
165 if(obsolete){ |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
166 for (n in obsolete){ |
668
dff6d5cb8bba
fixed deletion of repository on filesystem, works based on scm type for git and hg.
Marcin Kuzminski <marcin@python-works.com>
parents:
647
diff
changeset
|
167 D.setStyle(obsolete[n].parentNode.parentNode.parentNode,'display','none'); |
646
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
168 } |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
169 } |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
170 } |
1201
7d2c16725be6
quick filter will update repo count
Marcin Kuzminski <marcin@python-works.com>
parents:
1192
diff
changeset
|
171 // set new count into dashboard |
7d2c16725be6
quick filter will update repo count
Marcin Kuzminski <marcin@python-works.com>
parents:
1192
diff
changeset
|
172 YUD.get('repo_count').innerHTML = nodes.length - obsolete.length; |
646
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
173 } |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
174 |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
175 E.on(q_filter,'keyup',function(e){ |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
176 clearTimeout(F.filterTimeout); |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
177 setTimeout(F.updateFilter,600); |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
178 }); |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
179 |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
180 </script> |
fdb984a94d5b
#43 main page quick filter
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
181 |
55
e00dccb6f211
Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents:
0
diff
changeset
|
182 </%def> |