Skip to content

Commit

Permalink
subtask: Show options for subtask editing
Browse files Browse the repository at this point in the history
  • Loading branch information
doortts committed Mar 13, 2017
1 parent b629b98 commit 4082ca5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions app/assets/stylesheets/less/_common.less
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ input[type=number]::-webkit-outer-spin-button {
display: none !important;
visibility: hidden !important;
}

.cb { clear:both; }
.blind {
overflow:hidden;
Expand Down
3 changes: 3 additions & 0 deletions app/assets/stylesheets/less/_page.less
Original file line number Diff line number Diff line change
Expand Up @@ -6704,6 +6704,9 @@ div.diff-body[data-outdated="true"] tr:hover .icon-comment {

.subtask-wrap {
display: none;
&.show {
display: block;
}
}

.infos, .parent-issue {
Expand Down
4 changes: 2 additions & 2 deletions app/views/issue/create.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
</div>
}
@if(StringUtils.isNotEmpty(parentIssueId)) {
@partial_select_subtask(project, Long.parseLong(parentIssueId))
@partial_select_subtask(project, Long.parseLong(parentIssueId), false)
} else {
@partial_select_subtask(project, null)
@partial_select_subtask(project, null, false)
}
}
</dd>
Expand Down
3 changes: 2 additions & 1 deletion app/views/issue/edit.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* https://yona.io
**@
@import play.data.Form
@import org.apache.commons.lang3.StringUtils
@(title:String, issueForm: Form[Issue], issue:Issue, project:Project)
@import helper._
@import scala.collection.mutable.Map
Expand Down Expand Up @@ -50,7 +51,7 @@
}
</div>
}
@partial_select_subtask(project, parentIssueId)
@partial_select_subtask(project, parentIssueId, parentIssueId != null)
}
</dd>
</dl>
Expand Down
8 changes: 4 additions & 4 deletions app/views/issue/partial_select_subtask.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
* Copyright Yona & Yobi Authors & NAVER Corp.
* https://yona.io
**@
@(project:Project, parentIssueId:Long)
@(project:Project, parentIssueId:Long, showOption:Boolean = false)

@import utils.TemplateHelper._

<div class="subtask-wrap">
<div class="subtask-wrap @if(showOption){show}">
<div class="span3">
<select id="targetProjectId" name="targetProjectId" data-format="projects" data-placeholder="@Messages("organization.choose.projects")" data-toggle="select2" data-container-css-class="fullsize" disabled>
<select id="targetProjectId" name="targetProjectId" data-format="projects" data-placeholder="@Messages("organization.choose.projects")" data-toggle="select2" data-container-css-class="fullsize" @if(!showOption){disabled}>
<option value="@project.id" data-avatar-url="@urlToProjectLogo(project)">@project.name</option>
@for(project <- UserApp.currentUser().myProjects("")) {
<option value="@project.id" data-avatar-url="@urlToProjectLogo(project)">@project.name</option>
}
</select>
</div>
<div class="span6">
<select id="parentId" name="parentIssueId" data-format="issues" data-placeholder="@Messages("organization.choose.projects")" data-toggle="select2" data-container-css-class="fullsize" disabled>
<select id="parentId" name="parentIssueId" data-format="issues" data-placeholder="@Messages("organization.choose.projects")" data-toggle="select2" data-container-css-class="fullsize" @if(!showOption){disabled}>
<option value="" selected> -- select a parent issue -- </option>
@if(Option(parentIssueId).isDefined){
@defining(Issue.finder.byId(parentIssueId)) { issue =>
Expand Down

0 comments on commit 4082ca5

Please sign in to comment.