[Notice] Announcing the End of Demo Server [Read me]
milestone: Fix milestone UI for mobile screen
@bec7d722def809ec0d5de213cede572154b69688
--- app/assets/stylesheets/less/_page.less
+++ app/assets/stylesheets/less/_page.less
... | ... | @@ -2296,8 +2296,6 @@ |
2296 | 2296 |
|
2297 | 2297 |
.inner { |
2298 | 2298 |
&.left { |
2299 |
- margin-right:290px; |
|
2300 |
- |
|
2301 | 2299 |
.title-wrap { |
2302 | 2300 |
label { |
2303 | 2301 |
font-weight:bold; |
--- app/controllers/MilestoneApp.java
+++ app/controllers/MilestoneApp.java
... | ... | @@ -139,7 +139,7 @@ |
139 | 139 |
Milestone milestone = Milestone.findById(milestoneId); |
140 | 140 |
|
141 | 141 |
Form<Milestone> editForm = new Form<>(Milestone.class).fill(milestone); |
142 |
- return ok(edit.render("title.editMilestone", editForm, milestoneId, project)); |
|
142 |
+ return ok(edit.render("title.editMilestone", editForm, milestone, project)); |
|
143 | 143 |
} |
144 | 144 |
|
145 | 145 |
/** |
... | ... | @@ -157,7 +157,7 @@ |
157 | 157 |
} |
158 | 158 |
validateDueDate(milestoneForm); |
159 | 159 |
if (milestoneForm.hasErrors()) { |
160 |
- return ok(edit.render("title.editMilestone", milestoneForm, milestoneId, project)); |
|
160 |
+ return ok(edit.render("title.editMilestone", milestoneForm, original, project)); |
|
161 | 161 |
} else { |
162 | 162 |
Milestone existingMilestone = Milestone.findById(milestoneId); |
163 | 163 |
Milestone milestone = milestoneForm.get(); |
--- app/views/milestone/create.scala.html
+++ app/views/milestone/create.scala.html
... | ... | @@ -18,59 +18,85 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(title:String, form: play.data.Form[Milestone], project: Project) |
|
21 |
+@(title:String, milestoneForm: play.data.Form[Milestone], project: Project) |
|
22 | 22 |
|
23 |
+@import helper._ |
|
23 | 24 |
@import utils.TemplateHelper._ |
24 | 25 |
@import models.enumeration._ |
25 | 26 |
@import scala.collection.Map |
26 | 27 |
|
27 | 28 |
@projectLayout(title, project, utils.MenuType.MILESTONE) { |
28 | 29 |
@projectMenu(project, utils.MenuType.MILESTONE, "") |
29 |
-<div class="page-wrap-outer"> |
|
30 |
+ |
|
30 | 31 |
<div class="page-wrap-outer"> |
31 | 32 |
<div class="project-page-wrap"> |
32 |
- <div class="form-wrap milestone frm-wrap"> |
|
33 |
- <form class="nm" action="@routes.MilestoneApp.newMilestone(project.owner, project.name)" method="post"> |
|
34 |
- <div class="inner left"> |
|
35 |
- <div class="title-wrap"> |
|
36 |
- <label for="title">@Messages("milestone.form.title")</label> |
|
37 |
- <input type="text" name="title" id="title" placeholder="" value="@form.data().get("title")"> |
|
33 |
+ <div class="content-wrap frm-wrap"> |
|
34 |
+ @form(action = routes.MilestoneApp.newMilestone(project.owner, project.name), 'id -> "milestone-form") { |
|
35 |
+ <div class="row-fluid"> |
|
36 |
+ <div class="span12"> |
|
37 |
+ <dl> |
|
38 |
+ <dd> |
|
39 |
+ @defining(milestoneForm.errors().get("title")) { errors => |
|
40 |
+ <input type="text" id="title" name="title" value="@milestoneForm.data().get("title")" class="zen-mode text title @if(errors != null) {error}" maxlength="250" tabindex="1" placeholder="@Messages("title.text")"> |
|
41 |
+ @if(errors != null) { |
|
42 |
+ <div class="message"> |
|
43 |
+ @for(error <- errors) { |
|
44 |
+ <div>@Messages(error.message)</div> |
|
45 |
+ } |
|
46 |
+ </div> |
|
47 |
+ } |
|
48 |
+ } |
|
49 |
+ </dd> |
|
50 |
+ </dl> |
|
38 | 51 |
</div> |
39 |
- <div class="content-wrap"> |
|
40 |
- <label for="contents">@Messages("milestone.form.content")</label> |
|
41 |
- <div style="position: relative;"> |
|
42 |
- @common.editor("contents", form.data().get("contents")) |
|
52 |
+ |
|
53 |
+ <div class="row-fluid"> |
|
54 |
+ <div class="span9 span-left-pane"> |
|
55 |
+ <dl> |
|
56 |
+ <dd style="position: relative;"> |
|
57 |
+ @common.editor("contents", milestoneForm.data().get("contents"), "tabindex=2", "content-body") |
|
58 |
+ </dd> |
|
59 |
+ </dl> |
|
60 |
+ |
|
61 |
+ @** fileUploader **@ |
|
62 |
+ @if(!UserApp.currentUser.isAnonymous) { |
|
63 |
+ @common.fileUploader(ResourceType.MILESTONE, null) |
|
64 |
+ } |
|
65 |
+ @** end of fileUploader **@ |
|
66 |
+ |
|
67 |
+ <div class=" actrow right-txt"> |
|
68 |
+ <button type="submit" class="ybtn ybtn-info">@Messages("button.save")</button><!-- |
|
69 |
+ --><a href="@routes.MilestoneApp.milestones(project.owner, project.name)" class="ybtn">@Messages("button.cancel")</a> |
|
70 |
+ </div> |
|
71 |
+ </div> |
|
72 |
+ <div class="span3 span-hard-wrap"> |
|
73 |
+ <dl class="issue-option"> |
|
74 |
+ <dt>@Messages("milestone.form.state")</dt> |
|
75 |
+ <dd> |
|
76 |
+ <div> |
|
77 |
+ <input type="radio" name="state" value="@State.OPEN" id="milestone-open" class="radio-btn" checked="checked"><label for="milestone-open" class="bold">@Messages("milestone.state.open")</label> |
|
78 |
+ <input type="radio" name="state" value="@State.CLOSED" id="milestone-close" class="radio-btn" ><label for="milestone-close" class="bold">@Messages("milestone.state.closed")</label> |
|
79 |
+ </div> |
|
80 |
+ </dd> |
|
81 |
+ </dl> |
|
82 |
+ <dl class="issue-option"> |
|
83 |
+ <dt>@Messages("milestone.form.dueDate")</dt> |
|
84 |
+ <dd> |
|
85 |
+ <div> |
|
86 |
+ <label for="dueDate"> |
|
87 |
+ <input type="text" name="dueDate" id="dueDate" class="validate due-date" value="@milestoneForm.data().get("dueDate")"> |
|
88 |
+ </label> |
|
89 |
+ <div id="datepicker" class="date-picker"></div> |
|
90 |
+ </div> |
|
91 |
+ </dd> |
|
92 |
+ </dl> |
|
43 | 93 |
</div> |
44 | 94 |
</div> |
45 |
- |
|
46 |
- @common.fileUploader(ResourceType.MILESTONE, null) |
|
47 |
- |
|
48 |
- <div class="actions mt20"> |
|
49 |
- <button type="submit" class="ybtn ybtn-success">@Messages("button.save")</button> |
|
50 |
- <a href="@routes.MilestoneApp.milestones(project.owner, project.name)" class="ybtn">@Messages("button.cancel")</a> |
|
51 |
- </div> |
|
52 | 95 |
</div> |
53 |
- |
|
54 |
- <div class="inner right bubble-wrap gray"> |
|
55 |
- <p>@Messages("milestone.form.state")</p> |
|
56 |
- <div> |
|
57 |
- <input type="radio" name="state" value="@State.OPEN" id="milestone-open" class="radio-btn" checked="checked"><label for="milestone-open" class="bold">@Messages("milestone.state.open")</label> |
|
58 |
- |
|
59 |
- <input type="radio" name="state" value="@State.CLOSED" id="milestone-close" class="radio-btn"><label for="milestone-close" class="bold">@Messages("milestone.state.closed")</label> |
|
60 |
- </div> |
|
61 |
- <hr/> |
|
62 |
- <p>@Messages("milestone.form.dueDate")</p> |
|
63 |
- <label for="dueDate"> |
|
64 |
- <input type="text" name="dueDate" id="dueDate" class="validate due-date" value="@form.data().get("dueDate")"> |
|
65 |
- </label> |
|
66 |
- <div id="datepicker" class="date-picker"></div> |
|
67 |
- |
|
68 |
- </div> |
|
69 |
- </form> |
|
96 |
+ } @** end of form **@ |
|
70 | 97 |
</div> |
71 | 98 |
</div> |
72 | 99 |
</div> |
73 |
-</div> |
|
74 | 100 |
@common.markdown(project) |
75 | 101 |
|
76 | 102 |
<link rel="stylesheet" type="text/css" media="screen" href="@routes.Assets.at("javascripts/lib/atjs/jquery.atwho.css")"> |
--- app/views/milestone/edit.scala.html
+++ app/views/milestone/edit.scala.html
... | ... | @@ -18,8 +18,9 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(title: String, form: play.data.Form[Milestone], milestoneId: Long, project: Project) |
|
21 |
+@(title: String, milestoneForm: play.data.Form[Milestone], milestone: Milestone, project: Project) |
|
22 | 22 |
|
23 |
+@import helper._ |
|
23 | 24 |
@import utils.TemplateHelper._ |
24 | 25 |
@import models.enumeration._ |
25 | 26 |
@import scala.collection.Map |
... | ... | @@ -30,48 +31,72 @@ |
30 | 31 |
@projectMenu(project, utils.MenuType.MILESTONE, "") |
31 | 32 |
<div class="page-wrap-outer"> |
32 | 33 |
<div class="project-page-wrap"> |
33 |
- <div class="form-wrap milestone frm-wrap"> |
|
34 |
- <form class="nm" action="@routes.MilestoneApp.editMilestone(project.owner, project.name, milestoneId)" method="post"> |
|
35 |
- <div class="inner left"> |
|
36 |
- <div class="title-wrap"> |
|
37 |
- <label for="title">@Messages("milestone.form.title")</label> |
|
38 |
- @helper.input(form("title")){(id, name, value, args) => |
|
39 |
- <input type="text" name="@name" id="@id" placeholder="" value="@value"> |
|
40 |
- } |
|
41 |
- </div> |
|
42 |
- <div class="content-wrap"> |
|
43 |
- <label for="contents">@Messages("milestone.form.content")</label> |
|
44 |
- @helper.input(form("contents")){(id, name, value, args) => |
|
45 |
- <div style="position: relative;"> |
|
46 |
- @common.editor("contents", value.getOrElse("")) |
|
34 |
+ <div class="content-wrap frm-wrap"> |
|
35 |
+ @form(action = routes.MilestoneApp.editMilestone(project.owner, project.name, milestone.id), 'id -> "milestone-form") { |
|
36 |
+ <div class="row-fluid"> |
|
37 |
+ <div class="span12"> |
|
38 |
+ <dl> |
|
39 |
+ <dd> |
|
40 |
+ @defining(milestoneForm.errors().get("title")) { errors => |
|
41 |
+ <input type="text" id="title" name="title" value="@milestone.title" class="zen-mode text title @if(errors != null) {error}" maxlength="250" tabindex="1" placeholder="@Messages("title.text")"> |
|
42 |
+ @if(errors != null) { |
|
43 |
+ <div class="message"> |
|
44 |
+ @for(error <- errors) { |
|
45 |
+ <div>@Messages(error.message)</div> |
|
46 |
+ } |
|
47 |
+ </div> |
|
48 |
+ } |
|
49 |
+ } |
|
50 |
+ </dd> |
|
51 |
+ </dl> |
|
47 | 52 |
</div> |
48 |
- } |
|
49 |
- </div> |
|
50 | 53 |
|
51 |
- @common.fileUploader(ResourceType.MILESTONE, milestoneId) |
|
54 |
+ <div class="row-fluid"> |
|
55 |
+ <div class="span9 span-left-pane"> |
|
56 |
+ <dl> |
|
57 |
+ <dd style="position: relative;"> |
|
58 |
+ @common.editor("contents", milestone.contents, "tabindex=2", "content-body") |
|
59 |
+ </dd> |
|
60 |
+ </dl> |
|
52 | 61 |
|
53 |
- <div class="actions mt20"> |
|
54 |
- <button type="submit" class="ybtn ybtn-info">@Messages("button.save")</button> |
|
55 |
- <a href="@routes.MilestoneApp.milestones(project.owner, project.name)" class="ybtn">@Messages("button.cancel")</a> |
|
56 |
- </div> |
|
62 |
+ @** fileUploader **@ |
|
63 |
+ @if(!UserApp.currentUser.isAnonymous) { |
|
64 |
+ @common.fileUploader(ResourceType.MILESTONE, milestone.id) |
|
65 |
+ } |
|
66 |
+ @** end of fileUploader **@ |
|
67 |
+ |
|
68 |
+ <div class=" actrow right-txt"> |
|
69 |
+ <button type="submit" class="ybtn ybtn-info">@Messages("button.save")</button><!-- |
|
70 |
+ --><a href="@routes.MilestoneApp.milestones(project.owner, project.name)" class="ybtn">@Messages("button.cancel")</a> |
|
71 |
+ </div> |
|
72 |
+ </div> |
|
73 |
+ <div class="span3 span-hard-wrap"> |
|
74 |
+ <dl class="issue-option"> |
|
75 |
+ <dt>@Messages("milestone.form.state")</dt> |
|
76 |
+ <dd> |
|
77 |
+ <div> |
|
78 |
+ <input type="radio" name="state" value="@State.OPEN" id="milestone-open" class="radio-btn" @if(milestoneForm("state").value.equals(State.OPEN.name)) { checked="checked" }><label for="milestone-open" class="bold">@Messages("milestone.state.open")</label> |
|
79 |
+ <input type="radio" name="state" value="@State.CLOSED" id="milestone-close" class="radio-btn" @if(milestoneForm("state").value.equals(State.CLOSED.name)) { checked="checked" }><label for="milestone-close" class="bold">@Messages("milestone.state.closed")</label> |
|
80 |
+ </div> |
|
81 |
+ </dd> |
|
82 |
+ </dl> |
|
83 |
+ <dl class="issue-option"> |
|
84 |
+ <dt>@Messages("milestone.form.dueDate")</dt> |
|
85 |
+ <dd> |
|
86 |
+ <div> |
|
87 |
+ <label for="dueDate"> |
|
88 |
+ @helper.input(milestoneForm("dueDate")){(id, name, value, args) => |
|
89 |
+ <input type="text" name="@name" id="@id" class="validate due-date" value="@value"> |
|
90 |
+ } |
|
91 |
+ </label> |
|
92 |
+ <div id="datepicker" class="date-picker"></div> |
|
93 |
+ </div> |
|
94 |
+ </dd> |
|
95 |
+ </dl> |
|
96 |
+ </div> |
|
97 |
+ </div> |
|
57 | 98 |
</div> |
58 |
- |
|
59 |
- <div class="inner right bubble-wrap gray"> |
|
60 |
- <p>@Messages("milestone.form.state")</p> |
|
61 |
- <div> |
|
62 |
- <input type="radio" name="state" value="@State.OPEN" id="milestone-open" class="radio-btn" @if(form("state").value.equals(State.OPEN.name)) { checked="checked" }><label for="milestone-open" class="bold">@Messages("milestone.state.open")</label> |
|
63 |
- <input type="radio" name="state" value="@State.CLOSED" id="milestone-close" class="radio-btn" @if(form("state").value.equals(State.CLOSED.name)) { checked="checked" }><label for="milestone-close" class="bold">@Messages("milestone.state.closed")</label> |
|
64 |
- </div> |
|
65 |
- <hr/> |
|
66 |
- <p>@Messages("milestone.form.dueDate")</p> |
|
67 |
- <label for="dueDate"> |
|
68 |
- @helper.input(form("dueDate")){(id, name, value, args) => |
|
69 |
- <input type="text" name="@name" id="@id" class="validate due-date" value="@value"> |
|
70 |
- } |
|
71 |
- </label> |
|
72 |
- <div id="datepicker" class="date-picker"></div> |
|
73 |
- </div> |
|
74 |
- </form> |
|
99 |
+ } @** end of form **@ |
|
75 | 100 |
</div> |
76 | 101 |
</div> |
77 | 102 |
</div> |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?