##// END OF EJS Templates
Repo summary box changes
Liviu -
r3620:5c632f5f new-ui
parent child Browse files
Show More
@@ -88,7 +88,6 b' div.readme_box pre {'
88 88 font-size: 13px !important;
89 89 overflow: visible !important;
90 90 line-height: 140% !important;
91 background-color: @grey7;
92 91 }
93 92
94 93 div.readme_box img {
@@ -156,10 +155,10 b' div.readme_box code {'
156 155 }
157 156
158 157 div.readme_box pre {
159 border: @border-thickness solid @grey5;
158 border: @border-thickness solid #CBDBEB;
160 159 overflow: auto;
161 160 padding: .5em;
162 background-color: @grey7;
161 background-color: #FCFEFF;
163 162 }
164 163
165 164 div.readme_box pre > code {
@@ -3,11 +3,16 b''
3 3 // Used for headers and file detail summary screens.
4 4
5 5 .summary {
6 float: left;
6 clear: both;
7 float: none;
7 8 position: relative;
8 9 width: 100%;
9 10 margin: 0;
10 11 padding: 0;
12 background: #FCFCFC;
13 border: 1px solid #EAEAEA;
14 border-radius: @border-radius;
15 margin-bottom: 20px;
11 16
12 17 .summary-detail-header {
13 18 float: left;
@@ -42,10 +47,10 b''
42 47 }
43 48
44 49 .summary-detail {
45 float: left;
50 float: none;
46 51 position: relative;
47 width: 73%;
48 margin: 0 3% @space 0;
52 width: 100%;
53 margin: 0;
49 54 padding: 0;
50 55
51 56 .file_diff_buttons {
@@ -62,19 +67,37 b''
62 67 height: 30px;
63 68 margin: 0;
64 69 padding: 0;
65 width: 150px;
70 width: 100px;
66 71 font-weight: @text-semibold-weight;
67 72 font-family: @text-semibold;
68 73 }
74 .left-clone select {
75 width: 100px;
76 margin-right: 0;
77 background-color: @grey7;
78 border-color: @grey4;
79 color: #5C5C5C;
80 border-top-right-radius: 0;
81 border-bottom-right-radius: 0;
82 }
69 83
70 84 .right-clone {
71 float: right;
85 float: left;
72 86 width: ~"calc(100% - 150px)";
87
88 .clipboard-action {
89 margin-left: -30px;
90 }
73 91 }
74 92
75 93 .clone_url_input {
76 width: ~"calc(100% - 35px)";
77 padding: 6px 5px;
94 width: ~"calc(100% - 70px)";
95 padding: 6px 30px 6px 10px;
96 height: 14px;
97 box-shadow: 0 1px 1px 0 rgba(0,0,0,0.07);
98 border-top-left-radius: 0;
99 border-bottom-left-radius: 0;
100 margin-left: -1px;
78 101 }
79 102
80 103 &.directory {
@@ -124,18 +147,32 b''
124 147 border: @border-thickness solid @border-default-color;
125 148 .border-radius(@border-radius);
126 149 }
150
151 .btn-collapse {
152 clear: both;
153 float: none;
154 background: #F7F7F7;
155 text-align: center;
156 color: #949494;
157 font-size: 11px;
158
159 &:hover {
160 background: #f1f1f1;
161 color: #2B2B2D;
162 }
163 }
127 164 }
128 165
129 166 // this is used outside of just the summary
130 167 .fieldset, // similar to form fieldset
131 168 .summary .sidebar-right-content { // these have to match
132 169 clear: both;
133 float: left;
170 float: none;
134 171 position: relative;
135 172 display:block;
136 173 width: 100%;
137 174 min-height: 1em;
138 margin-bottom: @textmargin;
175 margin-bottom: 10px;
139 176 padding: 0;
140 177 line-height: 1.2em;
141 178
@@ -158,9 +195,7 b''
158 195 .fieldset {
159 196
160 197 .left-label { // similar to form legend
161 float: left;
162 198 display: block;
163 width: 25%;
164 199 margin: 0;
165 200 padding: 0;
166 201 font-weight: @text-semibold-weight;
@@ -168,16 +203,27 b''
168 203 }
169 204
170 205 .left-label-summary {
171 .left-label;
172 width: 150px;
206 padding-left: 20px;
207 margin-bottom: 5px;
208
209 p {
210 margin-bottom: 5px;
211 color: @grey1;
212 }
213 }
214
215 .left-content {
216 width: ~"calc(50% - 20px)";
217 float: left;
218 margin: 15px 0 15px 20px;
173 219 }
174 220
175 221 .right-content { // similar to form fields
176 222 float: left;
177 223 display: block;
178 width: 75%;
179 margin: 0 0 0 -15%;
180 padding: 0 0 0 15%;
224 width: ~"calc(50% - 20px)";
225 text-align: right;
226 margin: 15px 20px 15px 0;
181 227
182 228 .truncate-wrap,
183 229 .truncate {
@@ -188,6 +234,22 b''
188 234 .commit-long {
189 235 overflow-x: auto;
190 236 }
237
238 .commit-info {
239 margin-top: 7px;
240 }
241
242 .tag, .tagtag, .branchtag, .booktag, .metatag, .perm_tag {
243 background:transparent;
244 border: none;
245 box-shadow: none;
246 margin-left: 10px;
247 font-size: 13px;
248 }
249
250 .tag span, .tag i {
251 color: @grey1;
252 }
191 253 }
192 254 .commit.truncate-wrap {
193 255 overflow:hidden;
@@ -223,11 +285,38 b''
223 285 }
224 286
225 287 // Quick Start section
288
289 .empty-repo {
290 border: 1px solid #EAEAEA;
291 border-bottom: 0;
292 border-radius: @border-radius;
293 padding: 0 20px;
294 }
295
296 .empty-repo h3, .quick_start p {
297 margin-bottom: 10px;
298 }
299
300 .quick_start pre {
301 background: #FCFEFF;
302 border: 1px solid #CBDBEB;
303 box-shadow: @button-shadow;
304 padding: 10px 15px;
305 border-radius: 4px;
306 color: @grey2;
307 }
308
309 .clearfix {
310 clear: both;
311 }
312
226 313 .quick_start {
227 float: left;
228 314 display: block;
229 315 position: relative;
230 width: 100%;
316 border: 1px solid #EAEAEA;
317 border-top: 0;
318 border-radius: @border-radius;
319 padding: 0 20px;
231 320
232 321 // adds some space to make copy and paste easier
233 322 .left-label,
@@ -236,6 +325,7 b''
236 325 }
237 326 }
238 327
328
239 329 .submodule {
240 330 .summary-detail {
241 331 width: 100%;
@@ -290,3 +380,26 b''
290 380
291 381 }
292 382
383 .rctable.repo_summary {
384 border: 1px solid #eaeaea;
385 border-radius: 2px;
386 border-collapse: inherit;
387 border-bottom: 0;
388
389 th {
390 background: @grey7;
391 border-bottom: 0;
392 }
393
394 td {
395 border-color: #eaeaea;
396 }
397
398 td.td-status {
399 padding-left: 10px;
400 }
401 }
402
403
404
405
@@ -1,29 +1,49 b''
1 1 <%def name="refs_counters(branches, closed_branches, tags, bookmarks)">
2 2 <span class="branchtag tag">
3 3 <a href="${h.route_path('branches_home',repo_name=c.repo_name)}" class="childs">
4 <i class="icon-branch"></i>${_ungettext(
5 '%(num)s Branch','%(num)s Branches', len(branches)) % {'num': len(branches)}}</a>
4 <i class="icon-branch"></i>
5 % if len(branches) == 1:
6 <span>${len(branches)}</span> ${_('Branch')}
7 % else:
8 <span>${len(branches)}</span> ${_('Branches')}
9 % endif
10 </a>
6 11 </span>
7 12
8 13 %if closed_branches:
9 14 <span class="branchtag tag">
10 15 <a href="${h.route_path('branches_home',repo_name=c.repo_name)}" class="childs">
11 <i class="icon-branch"></i>${_ungettext(
12 '%(num)s Closed Branch', '%(num)s Closed Branches', len(closed_branches)) % {'num': len(closed_branches)}}</a>
16 <i class="icon-branch"></i>
17 % if len(closed_branches) == 1:
18 <span>${len(closed_branches)}</span> ${_('Closed Branch')}
19 % else:
20 <span>${len(closed_branches)}</span> ${_('Closed Branches')}
21 % endif
22 </a>
13 23 </span>
14 24 %endif
15 25
16 26 <span class="tagtag tag">
17 27 <a href="${h.route_path('tags_home',repo_name=c.repo_name)}" class="childs">
18 <i class="icon-tag"></i>${_ungettext(
19 '%(num)s Tag', '%(num)s Tags', len(tags)) % {'num': len(tags)}}</a>
28 <i class="icon-tag"></i>
29 % if len(tags) == 1:
30 <span>${len(tags)}</span> ${_('Tag')}
31 % else:
32 <span>${len(tags)}</span> ${_('Tags')}
33 % endif
34 </a>
20 35 </span>
21 36
22 37 %if bookmarks:
23 38 <span class="booktag tag">
24 39 <a href="${h.route_path('bookmarks_home',repo_name=c.repo_name)}" class="childs">
25 <i class="icon-bookmark"></i>${_ungettext(
26 '%(num)s Bookmark', '%(num)s Bookmarks', len(bookmarks)) % {'num': len(bookmarks)}}</a>
40 <i class="icon-bookmark"></i>
41 % if len(bookmarks) == 1:
42 <span>${len(bookmarks)}</span> ${_('Bookmark')}
43 % else:
44 <span>${len(bookmarks)}</span> ${_('Bookmarks')}
45 % endif
46 </a>
27 47 </span>
28 48 %endif
29 49 </%def>
@@ -32,19 +52,8 b''
32 52 <% summary = lambda n:{False:'summary-short'}.get(n) %>
33 53
34 54 <div id="summary-menu-stats" class="summary-detail">
35 <div class="summary-detail-header">
36 <div class="breadcrumbs files_location">
37 <h4>
38 ${breadcrumbs_links}
39 </h4>
40 </div>
41 <div id="summary_details_expand" class="btn-collapse" data-toggle="summary-details">
42 ${_('Show More')}
43 </div>
44 </div>
45
46 55 <div class="fieldset">
47
56 <div class="left-content">
48 57 <div class="left-clone">
49 58 <select id="clone_option" name="clone_option">
50 59 <option value="http" selected="selected">HTTP</option>
@@ -54,6 +63,7 b''
54 63 % endif
55 64 </select>
56 65 </div>
66
57 67 <div class="right-clone">
58 68 <%
59 69 maybe_disabled = ''
@@ -79,14 +89,9 b''
79 89 % if maybe_disabled:
80 90 <p class="help-block">${_('SVN Protocol is disabled. To enable it, see the')} <a href="${h.route_url('enterprise_svn_setup')}" target="_blank">${_('documentation here')}</a>.</p>
81 91 % endif
82
83 92 </div>
84 </div>
93 </div>
85 94
86 <div class="fieldset">
87 <div class="left-label-summary">
88 &nbsp;
89 </div>
90 95 <div class="right-content">
91 96 <div class="commit-info">
92 97 <div class="tags">
@@ -105,29 +110,39 b''
105 110 ## commits
106 111 <span class="tag">
107 112 % if commit_rev == -1:
108 ${_ungettext('%(num)s Commit', '%(num)s Commits', 0) % {'num': 0}}
113 <i class="icon-tag"></i>
114 % if commit_rev == -1:
115 <span>0</span> ${_('Commit')}
116 % else:
117 <span>0</span> ${_('Commits')}
118 % endif
109 119 % else:
110 120 <a href="${h.route_path('repo_changelog', repo_name=c.repo_name)}">
111 ${_ungettext('%(num)s Commit', '%(num)s Commits', commit_rev) % {'num': commit_rev}}</a>
121 <i class="icon-tag"></i>
122 % if commit_rev == 1:
123 <span>${commit_rev}</span> ${_('Commit')}
124 % else:
125 <span>${commit_rev}</span> ${_('Commits')}
126 % endif
127 </a>
112 128 % endif
113 129 </span>
114 130
115 131 ## forks
116 132 <span class="tag">
117 133 <a title="${_('Number of Repository Forks')}" href="${h.route_path('repo_forks_show_all', repo_name=c.repo_name)}">
118 ${c.repository_forks} ${_ungettext('Fork', 'Forks', c.repository_forks)}</a>
134 <i class="icon-code-fork"></i>
135 <span>${c.repository_forks}</span> ${_ungettext('Fork', 'Forks', c.repository_forks)}</a>
119 136 </span>
120
121 137 </div>
122 138 </div>
123 </div>
124 139 </div>
140 </div>
125 141
126 142 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;">
127 143 <div class="left-label-summary">
128 ${_('Repository size')}:
129 </div>
130 <div class="right-content">
144 <p>${_('Repository size')}</p>
145
131 146 <div class="commit-info">
132 147 <div class="tags">
133 148 ## repo size
@@ -148,9 +163,8 b''
148 163
149 164 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;">
150 165 <div class="left-label-summary">
151 ${_('Description')}:
152 </div>
153 <div class="right-content">
166 <p>${_('Description')}</p>
167
154 168 <div class="input ${summary(c.show_stats)}">
155 169 <%namespace name="dt" file="/data_table/_dt_elements.mako"/>
156 170 ${dt.repo_desc(c.rhodecode_db_repo.description_safe, c.visual.stylify_metatags)}
@@ -161,9 +175,8 b''
161 175 % if show_downloads:
162 176 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;">
163 177 <div class="left-label-summary">
164 ${_('Downloads')}:
165 </div>
166 <div class="right-content">
178 <p>${_('Downloads')}</p>
179
167 180 <div class="input ${summary(c.show_stats)} downloads">
168 181 % if c.rhodecode_repo and len(c.rhodecode_repo.commit_ids) == 0:
169 182 <span class="disabled">
@@ -193,9 +206,8 b''
193 206 ## Statistics
194 207 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;">
195 208 <div class="left-label-summary">
196 ${_('Statistics')}:
197 </div>
198 <div class="right-content">
209 <p>${_('Statistics')}</p>
210
199 211 <div class="input ${summary(c.show_stats)} statistics">
200 212 % if c.show_stats:
201 213 <div id="lang_stats" class="enabled">
@@ -214,18 +226,34 b''
214 226 </div>
215 227 </div>
216 228
229 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;">
230 <div class="left-label-summary">
231 <p>${_('Owner')}</p>
232
233
234 </div>
235 </div>
236
237 ## Context Action
238 <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;">
239 <div class="left-label-summary">
240 %if c.rhodecode_user.username != h.DEFAULT_USER:
241 <a href="${h.route_path('atom_feed_home', repo_name=c.rhodecode_db_repo.repo_name, _query=dict(auth_token=c.rhodecode_user.feed_token))}" title="${_('RSS Feed')}" class="btn btn-sm"><i class="icon-rss-sign"></i>RSS</a>
242 %else:
243 <a href="${h.route_path('atom_feed_home', repo_name=c.rhodecode_db_repo.repo_name)}" title="${_('RSS Feed')}" class="btn btn-sm"><i class="icon-rss-sign"></i>RSS</a>
244 %endif
245 </div>
246 </div>
247
217 248 </div><!--end summary-detail-->
249
250 <div id="summary_details_expand" class="btn-collapse" data-toggle="summary-details">
251 ${_('Show More')}
252 </div>
218 253 </%def>
219 254
220 255 <%def name="summary_stats(gravatar_function)">
221 <div class="sidebar-right">
222 <div class="summary-detail-header">
223 <h4 class="item">
224 ${_('Owner')}
225 </h4>
226 </div>
227 <div class="sidebar-right-content">
228 ${gravatar_function(c.rhodecode_db_repo.user.email, 16)}
229 </div>
230 </div><!--end sidebar-right-->
256 <div class="">
257 ${gravatar_function(c.rhodecode_db_repo.user.email, 16)}
258 </div>
231 259 </%def>
@@ -9,43 +9,31 b''
9 9
10 10 <%def name="main()">
11 11
12 <div class="title">
13 ## Context Action
14 <div>
15 <ul class="links icon-only-links block-right">
16 <li>
17 %if c.rhodecode_user.username != h.DEFAULT_USER:
18 <a href="${h.route_path('atom_feed_home', repo_name=c.rhodecode_db_repo.repo_name, _query=dict(auth_token=c.rhodecode_user.feed_token))}" title="${_('RSS Feed')}" class="btn btn-sm"><i class="icon-rss-sign"></i>RSS</a>
19 %else:
20 <a href="${h.route_path('atom_feed_home', repo_name=c.rhodecode_db_repo.repo_name)}" title="${_('RSS Feed')}" class="btn btn-sm"><i class="icon-rss-sign"></i>RSS</a>
21 %endif
22 </li>
23 </ul>
24 </div>
25 </div>
26
27 12 <div id="repo-summary" class="summary">
28 13 ${components.summary_detail(breadcrumbs_links=self.breadcrumbs_links(), show_downloads=True)}
29 14 ${components.summary_stats(gravatar_function=self.gravatar_with_user)}
30 15 </div><!--end repo-summary-->
31 16
32 17
33 <div class="box" >
34 %if not c.repo_commits:
35 <div class="title">
36 <h3>${_('Quick start')}</h3>
18 <div class="box">
19 %if not c.repo_commits:
20 <div class="empty-repo">
21 <div class="title">
22 <h3>${_('Quick start')}</h3>
23 </div>
24 <div class="clearfix"></div>
25 </div>
26 %endif
27 <div class="table">
28 <div id="shortlog_data">
29 <%include file='summary_commits.mako'/>
30 </div>
37 31 </div>
38 %endif
39 <div class="table">
40 <div id="shortlog_data">
41 <%include file='summary_commits.mako'/>
42 </div>
43 </div>
44 32 </div>
45 33
46 34 %if c.readme_data:
47 35 <div id="readme" class="anchor">
48 <div class="box" >
36 <div class="box">
49 37 <div class="title" title="${h.tooltip(_('Readme file from commit %s:%s') % (c.rhodecode_db_repo.landing_rev[0], c.rhodecode_db_repo.landing_rev[1]))}">
50 38 <h3 class="breadcrumbs">
51 39 <a href="${h.route_path('repo_files',repo_name=c.repo_name,commit_id=c.rhodecode_db_repo.landing_rev[1],f_path=c.readme_file)}">${c.readme_file}</a>
@@ -106,30 +106,26 b''
106 106 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
107 107 <div class="quick_start">
108 108 <div class="fieldset">
109 <div class="left-label">${_('Add or upload files directly via RhodeCode:')}</div>
110 <div class="right-content">
111 <div id="add_node_id" class="add_node">
112 <a href="${h.route_path('repo_files_add_file',repo_name=c.repo_name,commit_id=0, f_path='', _anchor='edit')}" class="btn btn-default">${_('Add New File')}</a>
113 </div>
109 <p><b>${_('Add or upload files directly via RhodeCode:')}</b></p>
110 <div id="add_node_id" class="add_node">
111 <a href="${h.route_path('repo_files_add_file',repo_name=c.repo_name,commit_id=0, f_path='', _anchor='edit')}" class="btn btn-default">${_('Add New File')}</a>
114 112 </div>
115 113 %endif
116 114 </div>
117 115
118 116 %if not h.is_svn(c.rhodecode_repo):
119 117 <div class="fieldset">
120 <div class="left-label">${_('Push new repo:')}</div>
121 <div class="right-content">
118 <p><b>${_('Push new repo:')}</b></p>
122 119 <pre>
123 120 ${c.rhodecode_repo.alias} clone ${c.clone_repo_url}
124 121 ${c.rhodecode_repo.alias} add README # add first file
125 122 ${c.rhodecode_repo.alias} commit -m "Initial" # commit with message
126 123 ${c.rhodecode_repo.alias} push ${'origin master' if h.is_git(c.rhodecode_repo) else ''} # push changes back
127 </pre>
128 </div>
124 </pre>
129 125 </div>
126
130 127 <div class="fieldset">
131 <div class="left-label">${_('Existing repository?')}</div>
132 <div class="right-content">
128 <p><b>${_('Existing repository?')}</b></p>
133 129 <pre>
134 130 %if h.is_git(c.rhodecode_repo):
135 131 git remote add origin ${c.clone_repo_url}
@@ -137,8 +133,7 b' git push -u origin master'
137 133 %else:
138 134 hg push ${c.clone_repo_url}
139 135 %endif
140 </pre>
141 </div>
136 </pre>
142 137 </div>
143 138 %endif
144 139 </div>
General Comments 0
You need to be logged in to leave comments. Login now