OSDN Git Service

Refactoring
[open-pdm-light/PartList.git] / PartsList / PartsList / .target / views / notifylist.scala.html
index 46f5077..7690729 100644 (file)
@@ -1,4 +1,4 @@
-@(notifies: scala.collection.mutable.ArrayBuffer[beans.NotifyBean], maxColumn: Int, partId: Long, partName: String, page: Int, notifyType: Long, state: Long)(implicit lang: Lang)
+@(notifies: scala.collection.immutable.Seq[beans.NotifyBean], maxColumn: Int, partId: Long, designChangeId: Long, partName: String, page: Int, notifyType: Long, state: Long)(implicit lang: Lang)
 @import helper._
 @*******************************************
 * Helper generating navigation links *
@@ -9,7 +9,8 @@
 
 @main("Notify Lists by Play 2.1") {
        <h3>@partName&nbsp@Messages("notify.type"+notifyType)@Messages("title15")</h3>
-       <div id="action">
+       @if(partId != 0) {
+               <div id="action">
                @form(action=routes.NotifyController.listRecursion(page, partId, notifyType, state)) {
                        <input type="hidden" name="page" value=0>
                        <input type="hidden" name="partId" value=@partId>
                        </select>
                }
        </div>
+       }
+       @if(partId == 0) {
+       <div id="action">
+               @form(action=routes.NotifyController.designChangeListRecursion(page, designChangeId, notifyType, state)) {
+                       <input type="hidden" name="page" value=0>
+                       <input type="hidden" name="designChangeId" value=@designChangeId>
+                       <input type="hidden" name="notifyType" value=@notifyType>
+                       @Messages("list.header9")
+                       <select name="state" onchange="submit(this.form)" >
+                               <option value="0" @if(state==0){selected}>@Messages("notify.state0")</option>
+                               <option value="1" @if(state==1){selected}>@Messages("notify.state1")</option>
+                               <option value="9" @if(state==9){selected}>@Messages("notify.state10")</option>
+                       </select>
+               }
+       </div>
+       }
        <table class="computers zebra-stripes">
                <thead>
                        <tr>
@@ -32,7 +49,7 @@
                        @for(notify <- notifies) {
                                <tr><td>
                                @if(notify.notifyLevel==0) {
-                                       @if(notifyType==0) {
+                                       @if(notifyType==0 || notifyType==3) {
                                                @Messages("notify.type0")
                                        } else {
                                                @Messages("notify.type1")
@@ -43,9 +60,9 @@
                                </td>
                                <td>
                                @if(notify.notifyLevel==0) {
-                                       <a href="/notifyShow?id=@notify.id&partId=@partId&notifyType=@notifyType&state=@state">
+                                       <a href="/notifyShow?id=@notify.id&partId=@partId&designChangeId=@designChangeId&notifyType=@notifyType&state=@state">
                                } else {
-                                       <a href="/replyShow?id=@notify.id&partId=@partId&notifyType=@notifyType&replyType=1&state=@state">
+                                       <a href="/replyShow?id=@notify.id&partId=@partId&designChangeId=@designChangeId&notifyType=@notifyType&replyType=1&state=@state">
                                }
                                @notify.message</a></td>
                                <td>
@@ -76,6 +93,9 @@
                </ul>
        </div>
        <br />
-       <a href="/partModify?id=@partId">@Messages("list.link6")</a>
-       
+       @if(partId != 0) {
+               <a href="/partModify?id=@partId">@Messages("list.link6")</a>
+       } else {
+               <a href="/designChangeCoverModify?designChangeId=@designChangeId&dcSeq=0&message=">@Messages("title22")</a>
+       }
 }