Mercurial > kallithea
annotate rhodecode/templates/journal/journal.html @ 2031:82a88013a3fd
merge 1.3 into stable
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 26 Feb 2012 17:25:09 +0200 |
parents | bf263968da47 7a7ffe24b82c |
children | dc2584ba5fbc |
rev | line source |
---|---|
734
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
1 ## -*- coding: utf-8 -*- |
995
d14723711d17
fixes for journal, added paging now it's possible to view whole journal
Marcin Kuzminski <marcin@python-works.com>
parents:
994
diff
changeset
|
2 <%inherit file="/base/base.html"/> |
734
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
3 <%def name="title()"> |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
4 ${_('Journal')} - ${c.rhodecode_name} |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
5 </%def> |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
6 <%def name="breadcrumbs()"> |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
7 ${c.rhodecode_name} |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
8 </%def> |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
9 <%def name="page_nav()"> |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
10 ${self.menu('home')} |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
11 </%def> |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
12 <%def name="main()"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
13 |
734
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
14 <div class="box box-left"> |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
15 <!-- box / title --> |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
16 <div class="title"> |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
17 <h5>${_('Journal')}</h5> |
1746
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
18 <ul class="links"> |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
19 <li> |
1748
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1746
diff
changeset
|
20 <span><a id="refresh" href="${h.url('journal')}"><img class="icon" title="${_('Refresh')}" alt="${_('Refresh')}" src="${h.url('/images/icons/arrow_refresh.png')}"/> |
1746
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
21 </a></span> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
22 </li> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
23 </ul> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
24 </div> |
995
d14723711d17
fixes for journal, added paging now it's possible to view whole journal
Marcin Kuzminski <marcin@python-works.com>
parents:
994
diff
changeset
|
25 <div id="journal">${c.journal_data}</div> |
734
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
26 </div> |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
27 <div class="box box-right"> |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
28 <!-- box / title --> |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
29 <div class="title"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
30 <h5> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
31 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> |
1770
184557472f5c
Implements #304
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
32 <a id="show_my" class="link-white" href="#my">${_('My repos')}</a> / <a id="show_watched" class="link-white" href="#watched">${_('Watched')}</a> |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
33 </h5> |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
34 %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
35 <ul class="links"> |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
36 <li> |
1770
184557472f5c
Implements #304
Marcin Kuzminski <marcin@python-works.com>
parents:
1756
diff
changeset
|
37 <span>${h.link_to(_('ADD'),h.url('admin_settings_create_repository'))}</span> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
38 </li> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
39 </ul> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
40 %endif |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
41 </div> |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
42 <!-- end box / title --> |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
43 <div id="my" class="table"> |
1746
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
44 %if c.user_repos: |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
45 <div id='repos_list_wrap' class="yui-skin-sam"> |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
46 <table id="repos_list"> |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
47 <thead> |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
48 <tr> |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
49 <th></th> |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
50 <th class="left">${_('Name')}</th> |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
51 <th class="left">${_('Tip')}</th> |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
52 <th class="left">${_('Action')}</th> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
53 <th class="left">${_('Action')}</th> |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
54 </thead> |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
55 <tbody> |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
56 <%namespace name="dt" file="/_data_table/_dt_elements.html"/> |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
57 %for repo in c.user_repos: |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
58 <tr> |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
59 ##QUICK MENU |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
60 <td class="quick_repo_menu"> |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
61 ${dt.quick_menu(repo['name'])} |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
62 </td> |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
63 ##REPO NAME AND ICONS |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
64 <td class="reponame"> |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
65 ${dt.repo_name(repo['name'],repo['dbrepo']['repo_type'],repo['dbrepo']['private'],repo['dbrepo_fork'].get('repo_name'))} |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
66 </td> |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
67 ##LAST REVISION |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
68 <td> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
69 ${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:
1770
diff
changeset
|
70 </td> |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
71 ## |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
72 <td><a href="${h.url('repo_settings_home',repo_name=repo['name'])}" title="${_('edit')}"><img class="icon" alt="${_('private')}" src="${h.url('/images/icons/application_form_edit.png')}"/></a></td> |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
73 <td> |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
74 ${h.form(url('repo_settings_delete', repo_name=repo['name']),method='delete')} |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
75 ${h.submit('remove_%s' % repo['name'],'',class_="delete_icon action_button",onclick="return confirm('Confirm to delete this repository');")} |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
76 ${h.end_form()} |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
77 </td> |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
78 </tr> |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
79 %endfor |
1746
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
80 </tbody> |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
81 </table> |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
82 </div> |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
83 %else: |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
84 <div style="padding:5px 0px 10px 0px;"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
85 ${_('No repositories yet')} |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
86 %if h.HasPermissionAny('hg.admin','hg.create.repository')(): |
1756 | 87 ${h.link_to(_('create one now'),h.url('admin_settings_create_repository'),class_="ui-btn")} |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
88 %endif |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
89 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
90 %endif |
734
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
91 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
92 |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
93 <div id="watched" class="table" style="display:none"> |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
94 %if c.following: |
1746
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
95 <table> |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
96 <thead> |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
97 <tr> |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
98 <th class="left">${_('Name')}</th> |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
99 </thead> |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
100 <tbody> |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
101 %for entry in c.following: |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
102 <tr> |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
103 <td> |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
104 %if entry.follows_user_id: |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
105 <img title="${_('following user')}" alt="${_('user')}" src="${h.url('/images/icons/user.png')}"/> |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
106 ${entry.follows_user.full_contact} |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
107 %endif |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
108 |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
109 %if entry.follows_repo_id: |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
110 <div style="float:right;padding-right:5px"> |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
111 <span id="follow_toggle_${entry.follows_repository.repo_id}" class="following" title="${_('Stop following this repository')}" |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
112 onclick="javascript:toggleFollowingRepo(this,${entry.follows_repository.repo_id},'${str(h.get_token())}')"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
113 </span> |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
114 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
115 |
1959
7a7ffe24b82c
optimized speed for browsing git changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
116 %if h.is_hg(entry.follows_repository): |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
117 <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/> |
1959
7a7ffe24b82c
optimized speed for browsing git changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
1888
diff
changeset
|
118 %elif h.is_git(entry.follows_repository): |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
119 <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
120 %endif |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
121 |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
122 %if entry.follows_repository.private: |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
123 <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/> |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
124 %else: |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
125 <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/> |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
126 %endif |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
127 <span class="watched_repo"> |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
128 ${h.link_to(entry.follows_repository.repo_name,h.url('summary_home',repo_name=entry.follows_repository.repo_name))} |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
129 </span> |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
130 %endif |
1746
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
131 </td> |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
132 </tr> |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
133 %endfor |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
134 </tbody> |
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
135 </table> |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
136 %else: |
1746
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
137 <div style="padding:5px 0px 10px 0px;"> |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
138 ${_('You are not following any users or repositories')} |
1746
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
139 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
140 %endif |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
141 </div> |
1746
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
142 </div> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
143 |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
144 <script type="text/javascript"> |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
145 |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
146 YUE.on('show_my','click',function(e){ |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
147 YUD.setStyle('watched','display','none'); |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
148 YUD.setStyle('my','display',''); |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
149 var nodes = YUQ('#my tr td a.repo_name'); |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
150 var target = 'q_filter'; |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
151 var func = function(node){ |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
152 return node.parentNode.parentNode.parentNode.parentNode; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
153 } |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
154 q_filter(target,nodes,func); |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
155 YUE.preventDefault(e); |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
156 }) |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
157 YUE.on('show_watched','click',function(e){ |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
158 YUD.setStyle('my','display','none'); |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
159 YUD.setStyle('watched','display',''); |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
160 var nodes = YUQ('#watched .watched_repo a'); |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
161 var target = 'q_filter'; |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
162 var func = function(node){ |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
163 return node.parentNode.parentNode; |
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
164 } |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
165 q_filter(target,nodes,func); |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
166 YUE.preventDefault(e); |
1741
fcbc35ecb024
personal Journal UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1701
diff
changeset
|
167 }) |
1746
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
168 YUE.on('refresh','click',function(e){ |
1748
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1746
diff
changeset
|
169 ypjax(e.currentTarget.href,"journal",function(){show_more_event();tooltip_activate();}); |
1746
753aeb4a5c58
Journal refresh button
Marcin Kuzminski <marcin@python-works.com>
parents:
1741
diff
changeset
|
170 YUE.preventDefault(e); |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
171 }); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
172 |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
173 |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
174 // main table sorting |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
175 var myColumnDefs = [ |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
176 {key:"menu",label:"",sortable:false,className:"quick_repo_menu hidden"}, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
177 {key:"name",label:"${_('Name')}",sortable:true, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
178 sortOptions: { sortFunction: nameSort }}, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
179 {key:"tip",label:"${_('Tip')}",sortable:true, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
180 sortOptions: { sortFunction: revisionSort }}, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
181 {key:"action1",label:"",sortable:false}, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
182 {key:"action2",label:"",sortable:false}, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
183 ]; |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
184 |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
185 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
|
186 |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
187 myDataSource.responseType = YAHOO.util.DataSource.TYPE_HTMLTABLE; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
188 |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
189 myDataSource.responseSchema = { |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
190 fields: [ |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
191 {key:"menu"}, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
192 {key:"name"}, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
193 {key:"tip"}, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
194 {key:"action1"}, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
195 {key:"action2"} |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
196 ] |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
197 }; |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
198 |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
199 var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource, |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
200 { |
1780
b9539c4df92f
Translations fixes for Data table
Marcin Kuzminski <marcin@python-works.com>
parents:
1779
diff
changeset
|
201 sortedBy:{key:"name",dir:"asc"}, |
b9539c4df92f
Translations fixes for Data table
Marcin Kuzminski <marcin@python-works.com>
parents:
1779
diff
changeset
|
202 MSG_SORTASC:"${_('Click to sort ascending')}", |
b9539c4df92f
Translations fixes for Data table
Marcin Kuzminski <marcin@python-works.com>
parents:
1779
diff
changeset
|
203 MSG_SORTDESC:"${_('Click to sort descending')}", |
b9539c4df92f
Translations fixes for Data table
Marcin Kuzminski <marcin@python-works.com>
parents:
1779
diff
changeset
|
204 MSG_EMPTY:"${_('No records found.')}", |
b9539c4df92f
Translations fixes for Data table
Marcin Kuzminski <marcin@python-works.com>
parents:
1779
diff
changeset
|
205 MSG_ERROR:"${_('Data error.')}", |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
206 MSG_LOADING:"${_('Loading...')}", |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
207 } |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
208 ); |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
209 myDataTable.subscribe('postRenderEvent',function(oArgs) { |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
210 tooltip_activate(); |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
211 quick_repo_menu(); |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
212 var func = function(node){ |
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
213 return node.parentNode.parentNode.parentNode.parentNode; |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
214 } |
1779
9edd6ac132f0
Added sorting into journal and admin pages
Marcin Kuzminski <marcin@python-works.com>
parents:
1770
diff
changeset
|
215 q_filter('q_filter',YUQ('#my tr td a.repo_name'),func); |
1888
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
216 }); |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
217 |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
218 |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
219 </script> |
f91d3f9b7230
White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
1780
diff
changeset
|
220 </%def> |