Skip to content

Commit

Permalink
Show contacts app mgmt link in contacts menu (#16104)
Browse files Browse the repository at this point in the history
Show contacts app mgmt link in contacts menu
  • Loading branch information
skjnldsv authored Jun 27, 2019
2 parents 690406d + e9860c8 commit 26d3a2d
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 16 deletions.
12 changes: 6 additions & 6 deletions core/js/dist/login.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/js/dist/login.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions core/js/dist/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/js/dist/main.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions core/js/dist/maintenance.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/js/dist/maintenance.js.map

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions core/src/OC/contactsmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@ const ContactsMenuView = View.extend({
return this.templates.list(
_.extend({
noContactsFoundText: t('core', 'No contacts found'),
showAllContactsText: t('core', 'Show all contacts …')
showAllContactsText: t('core', 'Show all contacts …'),
contactsAppMgmtText: t('core', 'Install the Contacts app')
}, data)
);
},
Expand Down Expand Up @@ -353,7 +354,9 @@ const ContactsMenuView = View.extend({
contacts: viewData.contacts,
searchTerm: searchTerm,
contactsAppEnabled: viewData.contactsAppEnabled,
contactsAppURL: OC.generateUrl('/apps/contacts')
contactsAppURL: OC.generateUrl('/apps/contacts'),
canInstallApp: OC.isUserAdmin(),
contactsAppMgmtURL: OC.generateUrl('/settings/apps/social/contacts')
}));
this.$('#contactsmenu-contacts').html(list.$el);
},
Expand Down
6 changes: 5 additions & 1 deletion core/src/OC/contactsmenu/list.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@
</div>
{{/unless}}
<div id="contactsmenu-contacts"></div>
{{#if contactsAppEnabled}}<div class="footer"><a href="{{contactsAppURL}}">{{showAllContactsText}}</a></div>{{/if}}
{{#if contactsAppEnabled}}
<div class="footer"><a href="{{contactsAppURL}}">{{showAllContactsText}}</a></div>
{{else if canInstallApp}}
<div class="footer"><a href="{{contactsAppMgmtURL}}">{{contactsAppMgmtText}}</a></div>
{{/if}}

0 comments on commit 26d3a2d

Please sign in to comment.