Skip to content

Commit 74a9f3e

Browse files
committed
MOBILE-2178 database: Allow managing own entries
1 parent 9283f82 commit 74a9f3e

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

www/addons/mod/data/lang/en.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
"recorddeleted": "Entry deleted",
3434
"recorddisapproved": "Entry unapproved",
3535
"resetsettings": "Reset filters",
36-
"restore": "Restore",
3736
"search": "Search",
3837
"selectedrequired": "All selected required",
3938
"timeadded": "Time added",

www/addons/mod/data/services/helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ angular.module('mm.addons.mod_data')
101101
replacements.timeadded = true;
102102
replacements.timemodified = true;
103103

104-
replacements.edit = accessInfo.canmanageentries || (accessInfo.inreadonlyperiod && record.canmanageentry);
104+
replacements.edit = record.canmanageentry; // This already checks capabilities and readonly period.
105105
replacements.delete = replacements.edit;
106106
replacements.approve = database.approval && accessInfo.canapprove && !record.approved;
107107
replacements.disapprove = database.approval && accessInfo.canapprove && record.approved;

www/addons/mod/data/templates/action.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<a ng-if="action == 'more'" class="button button-icon icon ion-ios-search-strong" ng-href="{{url}}/mod/data/view.php?d={{entry.dataid}}&rid={{entry.id}}" mm-link capture-link="true" title="{{ 'mma.mod_data.more' | translate }}"></a>
22
<a ng-if="action == 'edit'" class="button button-icon icon ion-gear-b" ng-href="{{url}}/mod/data/edit.php?d={{entry.dataid}}&rid={{entry.id}}" mm-link capture-link="true" title="{{ 'mm.core.edit' | translate }}"></a>
33
<a ng-if="action == 'delete' && !entry.deleted" class="button button-icon icon ion-trash-a" ng-href="{{url}}/mod/data/view.php?d={{entry.dataid}}&delete={{entry.id}}" mm-link capture-link="true" title="{{ 'mm.core.delete' | translate }}"></a>
4-
<a ng-if="action == 'delete' && entry.deleted" class="button button-icon icon ion-reply" ng-click="undoDelete()" mm-link capture-link="true" title="{{ 'mma.mod_data.restore' | translate }}"></a>
4+
<a ng-if="action == 'delete' && entry.deleted" class="button button-icon icon ion-reply" ng-click="undoDelete()" mm-link capture-link="true" title="{{ 'mm.core.restore' | translate }}"></a>
55
<a ng-if="action == 'approve'" class="button button-icon icon ion-thumbsup" ng-href="{{url}}/mod/data/view.php?d={{entry.dataid}}&approve={{entry.id}}" mm-link capture-link="true" title="{{ 'mma.mod_data.approve' | translate }}"></a>
66
<a ng-if="action == 'disapprove'" class="button button-icon icon ion-minus-circled" ng-href="{{url}}/mod/data/view.php?d={{entry.dataid}}&disapprove={{entry.id}}" mm-link capture-link="true" title="{{ 'mma.mod_data.disapprove' | translate }}"></a>
77

www/core/lang/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@
163163
"refresh": "Refresh",
164164
"required": "Required",
165165
"requireduserdatamissing": "This user lacks some required profile data. Please, fill this data in your Moodle and try again.<br>{{$a}}",
166+
"restore": "Restore",
166167
"retry": "Retry",
167168
"save": "Save",
168169
"search": " Search...",

0 commit comments

Comments
 (0)