diff options
author | Christian Hofmaier | 2018-01-02 16:37:40 +0100 |
---|---|---|
committer | Christian Hofmaier | 2018-01-02 16:37:40 +0100 |
commit | 4a20d8b28d6f24f604634f75f95b19dff33f8e0a (patch) | |
tree | fbfb2ef034a6dbb332ce8daf7216808a7bdd4510 /modules-available/exams/templates/page-exams.html | |
parent | [statistics] added permissions to view client statistics, delete clients and ... (diff) | |
download | slx-admin-4a20d8b28d6f24f604634f75f95b19dff33f8e0a.tar.gz slx-admin-4a20d8b28d6f24f604634f75f95b19dff33f8e0a.tar.xz slx-admin-4a20d8b28d6f24f604634f75f95b19dff33f8e0a.zip |
[exams] reworked permission system from "click and you get error" to "button is disabled due to lack of permission". you now can only add/delete/edit based on locations you have permission for. you need permission for all locations of an exam to edit/delete it, but you can see it if you have at least permission for one of the locations.
Diffstat (limited to 'modules-available/exams/templates/page-exams.html')
-rw-r--r-- | modules-available/exams/templates/page-exams.html | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/modules-available/exams/templates/page-exams.html b/modules-available/exams/templates/page-exams.html index 29b8c319..bb6cbd0a 100644 --- a/modules-available/exams/templates/page-exams.html +++ b/modules-available/exams/templates/page-exams.html @@ -43,10 +43,9 @@ {{^liesInPast}} <a onclick="slxShow({{starttime}}, {{endtime}})" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-eye-open"></span></a> {{/liesInPast}} - <a href="?do=exams&action=edit&examid={{examid}}" class="btn btn-default btn-sm" >{{lang_edit}}</a> - <input type="hidden" name="token" value="{{token}}"> + <a href="?do=exams&action=edit&examid={{examid}}" class="btn btn-default btn-sm {{^allowedEdit}}disabled{{/allowedEdit}}"><span class="glyphicon glyphicon-edit"></span></a> <input type="hidden" name="token" value="{{token}}"> <input type="hidden" name="examid" value="{{examid}}"> - <button class="btn {{btnClass}} btn-sm">{{lang_delete}}</button> + <button {{^allowedDelete}}disabled{{/allowedDelete}} class="btn {{btnClass}} btn-sm"><span class="glyphicon glyphicon-trash"></span></button> </form> </td> </tr> @@ -56,7 +55,7 @@ </div> <div class="text-right"> <div class="btn-group" role="group"> - <a href="?do=exams&action=add" class="btn btn-success"><span class="glyphicon glyphicon-plus-sign"></span> {{lang_addExam}}</a> + <a href="?do=exams&action=add" class="btn btn-success {{^allowedToAdd}}disabled{{/allowedToAdd}}"><span class="glyphicon glyphicon-plus-sign"></span> {{lang_addExam}}</a> </div> </div> </div> |