##// END OF EJS Templates
added forking into quick menu on main page
marcink -
r1738:1a2f10b3 beta
parent child Browse files
Show More
@@ -1,167 +1,175 b''
1 1 <%page args="parent" />
2 2 <div class="box">
3 3 <!-- box / title -->
4 4 <div class="title">
5 5 <h5>
6 6 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${parent.breadcrumbs()} <span id="repo_count">${len(c.repos_list)}</span> ${_('repositories')}
7 7 </h5>
8 8 %if c.rhodecode_user.username != 'default':
9 9 %if h.HasPermissionAny('hg.admin','hg.create.repository')():
10 10 <ul class="links">
11 11 <li>
12 12 <span>${h.link_to(_('ADD NEW REPOSITORY'),h.url('admin_settings_create_repository'))}</span>
13 13 </li>
14 14 </ul>
15 15 %endif
16 16 %endif
17 17 </div>
18 18 <!-- end box / title -->
19 19 <div class="table">
20 20 % if c.groups:
21 21 <table>
22 22 <thead>
23 23 <tr>
24 24 <th class="left"><a href="#">${_('Group name')}</a></th>
25 25 <th class="left"><a href="#">${_('Description')}</a></th>
26 26 ##<th class="left"><a href="#">${_('Number of repositories')}</a></th>
27 27 </tr>
28 28 </thead>
29 29
30 30 ## REPO GROUPS
31 31
32 32 % for gr in c.groups:
33 33 <tr>
34 34 <td>
35 35 <div style="white-space: nowrap">
36 36 <img class="icon" alt="${_('Repositories group')}" src="${h.url('/images/icons/database_link.png')}"/>
37 37 ${h.link_to(gr.name,url('repos_group_home',group_name=gr.group_name))}
38 38 </div>
39 39 </td>
40 40 <td>${gr.group_description}</td>
41 41 ##<td><b>${gr.repositories.count()}</b></td>
42 42 </tr>
43 43 % endfor
44 44
45 45 </table>
46 46 <div style="height: 20px"></div>
47 47 % endif
48 48 <div id="welcome" style="display:none;text-align:center">
49 49 <h1><a href="${h.url('home')}">${c.rhodecode_name} ${c.rhodecode_version}</a></h1>
50 50 </div>
51 51 <table id="repos_list">
52 52 <thead>
53 53 <tr>
54 54 <th class="left"></th>
55 55 <th class="left">${_('Name')}</th>
56 56 <th class="left">${_('Description')}</th>
57 57 <th class="left">${_('Last change')}</th>
58 58 <th class="left">${_('Tip')}</th>
59 59 <th class="left">${_('Owner')}</th>
60 60 <th class="left">${_('RSS')}</th>
61 61 <th class="left">${_('Atom')}</th>
62 62 </tr>
63 63 </thead>
64 64 <tbody>
65 65 %for cnt,repo in enumerate(c.repos_list):
66 66 <tr class="parity${cnt%2}">
67 67 <td class="quick_repo_menu">
68 68 <ul class="menu_items hidden">
69 69 <li style="border-top:1px solid #003367;margin-left:18px;padding-left:-99px"></li>
70 70 <li>
71 71 <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=repo['name'])}">
72 72 <span class="icon">
73 73 <img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" />
74 74 </span>
75 75 <span>${_('Summary')}</span>
76 76 </a>
77 77 </li>
78 78 <li>
79 79 <a title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=repo['name'])}">
80 80 <span class="icon">
81 81 <img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" />
82 82 </span>
83 83 <span>${_('Changelog')}</span>
84 84 </a>
85 85 </li>
86 86 <li>
87 87 <a title="${_('Files')}" href="${h.url('files_home',repo_name=repo['name'])}">
88 88 <span class="icon">
89 89 <img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" />
90 90 </span>
91 91 <span>${_('Files')}</span>
92 92 </a>
93 </li>
93 </li>
94 <li>
95 <a title="${_('Fork')}" href="${h.url('repo_fork_home',repo_name=repo['name'])}">
96 <span class="icon">
97 <img src="${h.url('/images/icons/arrow_divide.png')}" alt="${_('Fork')}" />
98 </span>
99 <span>${_('Fork')}</span>
100 </a>
101 </li>
94 102 </ul>
95 103 </td>
96 104 <td>
97 105 ## TYPE OF REPO
98 106 <div style="white-space: nowrap">
99 107 %if repo['dbrepo']['repo_type'] =='hg':
100 108 <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/>
101 109 %elif repo['dbrepo']['repo_type'] =='git':
102 110 <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/>
103 111 %endif
104 112
105 113 ##PRIVATE/PUBLIC
106 114 %if repo['dbrepo']['private']:
107 115 <img class="icon" title="${_('private repository')}" alt="${_('private repository')}" src="${h.url('/images/icons/lock.png')}"/>
108 116 %else:
109 117 <img class="icon" title="${_('public repository')}" alt="${_('public repository')}" src="${h.url('/images/icons/lock_open.png')}"/>
110 118 %endif
111 119
112 120 ##NAME
113 121 ${h.link_to(repo['name'],
114 122 h.url('summary_home',repo_name=repo['name']),class_="repo_name")}
115 123 %if repo['dbrepo_fork']:
116 124 <a href="${h.url('summary_home',repo_name=repo['dbrepo_fork']['repo_name'])}">
117 125 <img class="icon" alt="${_('fork')}"
118 126 title="${_('Fork of')} ${repo['dbrepo_fork']['repo_name']}"
119 127 src="${h.url('/images/icons/arrow_divide.png')}"/></a>
120 128 %endif
121 129 </div>
122 130 </td>
123 131 ##DESCRIPTION
124 132 <td><span class="tooltip" title="${h.tooltip(repo['description'])}">
125 133 ${h.truncate(repo['description'],60)}</span>
126 134 </td>
127 135 ##LAST CHANGE
128 136 <td>
129 137 <span class="tooltip" title="${repo['last_change']}">
130 138 ${h.age(repo['last_change'])}</span>
131 139 </td>
132 140 <td>
133 141 %if repo['rev']>=0:
134 142 <a title="${h.tooltip('%s\n%s' % (repo['author'],repo['last_msg']))}" class="tooltip" href="${h.url('changeset_home',repo_name=repo['name'],revision=repo['tip'])}">${'r%s:%s' % (repo['rev'],h.short_id(repo['tip']))}</a>
135 143 %else:
136 144 ${_('No changesets yet')}
137 145 %endif
138 146 </td>
139 147 <td title="${repo['contact']}">${h.person(repo['contact'])}</td>
140 148 <td>
141 149 %if c.rhodecode_user.username != 'default':
142 150 <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>
143 151 %else:
144 152 <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'])}"></a>
145 153 %endif:
146 154 </td>
147 155 <td>
148 156 %if c.rhodecode_user.username != 'default':
149 157 <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>
150 158 %else:
151 159 <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=repo['name'])}"></a>
152 160 %endif:
153 161 </td>
154 162 </tr>
155 163 %endfor
156 164 </tbody>
157 165 </table>
158 166 </div>
159 167 </div>
160 168 <script>
161 169 var nodes = YUQ('div.table tr td a.repo_name');
162 170 var target = 'q_filter';
163 171 var func = function(node){
164 172 return node.parentNode.parentNode.parentNode;
165 173 }
166 174 q_filter(target,nodes,func);
167 175 </script> No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now