source: trunk/grails-app/views/taskDetailed/_showTaskControlButtons.gsp @ 861

Last change on this file since 861 was 861, checked in by gav, 9 years ago

Refactor task show control buttons to a template.

File size: 2.4 KB
Line 
1
2    <g:form>
3        <input type="hidden" name="id" value="${taskInstance?.id}" />
4
5        <g:if test="${taskInstance.trash}" >
6            <span class="button"><g:actionSubmit class="restore" onclick="return confirm('Are you sure?');" value="Restore"/></span>
7        </g:if>
8        <g:else>
9
10            <g:if test="${taskInstance.taskStatus.id != 3}" >
11
12                <g:if test="${taskInstance.attentionFlag}" >
13                    <span class="button"><g:actionSubmit class="flag" value="Clear" action="clearAttentionFlag"/></span>
14                </g:if>
15                <g:else>
16                    <span class="button"><g:actionSubmit class="flag" value="Unresolved" action="setAttentionFlag"/></span>
17                    <g:helpBalloon class="helpballoon" code="task.status.unresolved" />
18                </g:else>
19
20                <span class="button">
21                    <g:if test="${taskInstance.attentionFlag}" >
22                        <g:actionSubmit class="complete"
23                                                value="Resolved"
24                                                onclick="return confirm('${message(code:'task.clear.attention.flag.on.completion.confirm')}');"
25                                                action="complete"/>
26                    </g:if>
27                    <g:else>
28                        <g:actionSubmit class="complete" value="Resolved" action="complete"/>
29                    </g:else>
30                </span>
31                <g:helpBalloon class="helpballoon" code="task.status.resolved" />
32
33                <g:if test="${taskInstance.approved}" >
34                    <span class="button"><g:actionSubmit class="renegeApproval" value="Renege Approval" action="renegeApproval" /></span>
35                </g:if>
36                <g:else>
37                    <span class="button"><g:actionSubmit class="approve" value="Approve" /></span>
38                </g:else>
39
40                <span class="button"><g:actionSubmit class="edit" value="Edit" /></span>
41                <span class="button">
42                    <g:actionSubmit class="trash"
43                                                onclick="return confirm('${message(code:'task.trash.confirm')}');"
44                                                value="Trash" />
45                </span>
46
47            </g:if>
48            <g:else>
49                <span class="button"><g:actionSubmit class="reopen" value="Reopen" /></span>
50            </g:else>
51
52        </g:else>
53    </g:form>
Note: See TracBrowser for help on using the repository browser.