Refactor for views.

- Replace urls with helpers.url and helpers.assets
- Move google-code-prettify to main.scala.html
- Move some CSS styles to gitbucket.css
This commit is contained in:
takezoe
2013-06-27 21:19:41 +09:00
parent 3edf195da8
commit 89c0e52c1d
36 changed files with 265 additions and 240 deletions

View File

@@ -1,9 +1,10 @@
@(label: Option[model.Label], repository: service.RepositoryService.RepositoryInfo)(implicit context: app.Context)
@import context._
@import view.helpers._
@defining((if(label.isEmpty) ("new", 190, 4) else ("edit", 180, 8))){ case (mode, width, margin) =>
<div id="@(mode)LabelArea">
<form method="POST" id="edit-label-form"
action="@path/@repository.owner/@repository.name/issues/label/@{if(mode == "new") "new" else label.get.labelId + "/edit"}"
action="@url(repository)/issues/label/@{if(mode == "new") "new" else label.get.labelId + "/edit"}"
validate="true" @if(mode == "edit"){ style="margin-bottom: 8px;"}>
<span id="error-@(mode)LabelName" class="error"></span>
<input type="text" name="@(mode)LabelName" id="@(mode)LabelName" style="width: @(width)px; margin-left: @(margin)px; margin-bottom: 0px;" value="@label.map(_.labelName)"@if(mode == "new"){ placeholder="New label name"}/>