lib/repos/index.jsView |
---|
208 | 208 … | .replace(/%\{repo\}/g, repoName) |
209 | 209 … | .replace(/%\{author\}/g, authorName) |
210 | 210 … | : authorName + '/' + repoName |
211 | 211 … | var isPublic = self.web.isPublic |
212 | | - var isPrivate = !isPublic |
| 212 … | + var isLocal = !isPublic |
213 | 213 … | cb(null, self.web.serveTemplate(req, title)(cat([ |
214 | 214 … | h('div', {class: 'repo-title'}, [ |
215 | 215 … | h('form', {class: 'right-bar', action: '', method: 'post'}, [ |
216 | | - h('button', |
217 | | - extend({class: 'btn', name: 'action', value: 'vote'}, |
218 | | - (isPublic ? {disabled: 'disabled'} : {type: 'submit'}) |
| 216 … | + h('strong', {class: 'ml2 mr1'}, u.link(digsPath, votes.upvotes)), |
| 217 … | + h('button', |
| 218 … | + extend( |
| 219 … | + {class: 'btn', name: 'action', value: 'vote'}, |
| 220 … | + isPublic ? {disabled: 'disabled'} : {type: 'submit'} |
219 | 221 … | ), [ |
220 | | - h('i', '✌'), |
221 | | - h('span', req._t(!isPublic && upvoted ? 'Undig' : 'Dig')) |
| 222 … | + h('i', '✌ '), |
| 223 … | + h('span', req._t(isLocal && upvoted ? 'Undig' : 'Dig')) |
222 | 224 … | ] |
223 | 225 … | ), |
224 | | - (isPublic |
225 | | - ? once('') |
226 | | - : cat([ |
227 | | - h('input', {type: 'hidden', name: 'value', value: (upvoted ? '0' : '1')}, []), |
228 | | - h('input', {type: 'hidden', name: 'id', value: u.escape(repo.id)}, []) |
| 226 … | + u.when(isLocal, cat([ |
| 227 … | + h('input', {type: 'hidden', name: 'value', value: (upvoted ? '0' : '1')}), |
| 228 … | + h('input', {type: 'hidden', name: 'id', value: u.escape(repo.id)}) |
| 229 … | + ])), |
| 230 … | + h('a', {href: u.encodeLink([repo.id, 'forks']), title: req._t('Forks'), class: 'ml2 mr1'}, '+'), |
| 231 … | + u.when(isLocal, |
| 232 … | + h('button', {class: 'btn', type: 'submit', name: 'action', value: 'fork-prompt'}, [ |
| 233 … | + h('i', '⑂ '), |
| 234 … | + once(req._t('Fork')) |
229 | 235 … | ]) |
230 | | - ), |
231 | | - h('strong', u.link(digsPath, votes.upvotes)), |
232 | | - (isPublic |
233 | | - ? once('') |
234 | | - : h('button', {class: 'btn', type: 'submit', name: 'action', value: 'fork-prompt'}, [ |
235 | | - h('i', '⑂'), |
236 | | - once(req._t('Fork')) |
237 | | - ]) |
238 | | - ), |
239 | | - h('a', {href: u.encodeLink([repo.id, 'forks']), title: req._t('Forks')}, '+') |
| 236 … | + ) |
240 | 237 … | ]), |
241 | | - forms.name(req, !isPublic, repo.id, repoName, 'repo-name', null, req._t('repo.Rename'), |
| 238 … | + forms.name(req, isLocal, repo.id, repoName, 'repo-name', null, req._t('repo.Rename'), |
242 | 239 … | h('h2', {class: 'bgslash'}, `${u.link([repo.feed], authorName)} / ${u.link([repo.id], repoName)}`) |
243 | 240 … | ), |
244 | 241 … | ]), |
245 | 242 … | (!repo.upstream |
471 | 468 … | var commitPath = [repo.id, 'commit', commit.id] |
472 | 469 … | var actor = commit.separateAuthor ? 'author' : 'committer' |
473 | 470 … | var actionKey = actor.slice(0,1).toUpperCase() + actor.slice(1) + 'ReleasedCommit' |
474 | 471 … | cb(null, |
475 | | - '<div class="mt1">' + |
| 472 … | + '<div class="mt2">' + |
476 | 473 … | '<span>' + |
477 | 474 … | req._t(actionKey, { |
478 | 475 … | name: u.escape(commit[actor].name), |
479 | 476 … | commitName: u.link(commitPath, commit.title) |