MDL-52062 tool_lp: Add some elements of plans pages depending on caps

This commit is contained in:
Frederic Massart
2016-04-18 10:58:45 +08:00
parent 5c7383fd08
commit 71f6c80c50
2 changed files with 17 additions and 13 deletions
+12 -10
View File
@@ -27,7 +27,9 @@
{{^iscompleted}}
<th scope="col">{{#str}}state, tool_lp{{/str}}</th>
{{/iscompleted}}
<th scope="col">{{#str}}actions, tool_lp{{/str}}</th>
{{#canmanage}}
<th scope="col">{{#str}}actions, tool_lp{{/str}}</th>
{{/canmanage}}
</tr>
</thead>
<tbody class="drag-parentnode">
@@ -50,15 +52,15 @@
<td>{{usercompetency.proficiencyname}}</td>
<td>{{usercompetency.statusname}}</td>
{{/iscompleted}}
<td>
{{#canmanage}}
{{#canbeedited}}
<div class="pull-left">
<a href="#" data-action="delete-competency-link" data-id="{{id}}">{{#pix}}t/delete, core, {{#str}}delete{{/str}}{{/pix}}</a>
</div>
{{/canbeedited}}
{{/canmanage}}
</td>
{{#canmanage}}
<td>
{{#canbeedited}}
<div class="pull-left">
<a href="#" data-action="delete-competency-link" data-id="{{id}}">{{#pix}}t/delete, core, {{#str}}delete{{/str}}{{/pix}}</a>
</div>
{{/canbeedited}}
</td>
{{/canmanage}}
</tr>
{{/competencies}}
</tbody>
+5 -3
View File
@@ -40,7 +40,9 @@
<tr>
<th scope="col">{{#str}}planname, tool_lp{{/str}}</th>
<th scope="col">{{#str}}status, tool_lp{{/str}}</th>
{{#usercanupdate}}
<th scope="col">{{#str}}actions, tool_lp{{/str}}</th>
{{/usercanupdate}}
</tr>
</thead>
<tbody>
@@ -50,8 +52,8 @@
<span><a href="{{pluginbaseurl}}/plan.php?id={{id}}">{{name}}</a></span>
</td>
<td>{{statusname}}</td>
{{#usercanupdate}}
<td>
{{#usercanupdate}}
<div style="display: inline-block;">
<ul title="{{#str}}edit{{/str}}" class="planactions">
<li>
@@ -59,7 +61,7 @@
<ul class="dropdown-menu">
<li {{^canbeedited}} class="disabled" {{/canbeedited}}>
<a href="{{#canbeedited}}
{{pluginbaseurl}}/editplan.php?id={{id}}&userid={{userid}}
{{pluginbaseurl}}/editplan.php?id={{id}}&amp;userid={{userid}}
{{/canbeedited}}
{{^canbeedited}}
#
@@ -89,8 +91,8 @@
</li>
</ul>
</ul>
{{/usercanupdate}}
</div>
{{/usercanupdate}}
</td>
</tr>
{{/plans}}