mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 21:45:50 +01:00
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:
@@ -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"}/>
|
||||
|
||||
Reference in New Issue
Block a user