diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-06-26 18:20:39 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-06-27 09:33:27 +0200 |
commit | e9860c89ca30f40f4b1b92b0c698643e7ddaa38f (patch) | |
tree | b47667e1db67372518764fbbaf8cf5c795f48c07 /core/src | |
parent | afb86ef4f5f7a0d032addb33b99be97f206503e6 (diff) | |
download | nextcloud-server-e9860c89ca30f40f4b1b92b0c698643e7ddaa38f.tar.gz nextcloud-server-e9860c89ca30f40f4b1b92b0c698643e7ddaa38f.zip |
Show contacts app mgmt link in contacts menu
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/OC/contactsmenu.js | 7 | ||||
-rw-r--r-- | core/src/OC/contactsmenu/list.handlebars | 6 |
2 files changed, 10 insertions, 3 deletions
diff --git a/core/src/OC/contactsmenu.js b/core/src/OC/contactsmenu.js index ff3553a61ed..0af4bad412d 100644 --- a/core/src/OC/contactsmenu.js +++ b/core/src/OC/contactsmenu.js @@ -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) ); }, @@ -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); }, diff --git a/core/src/OC/contactsmenu/list.handlebars b/core/src/OC/contactsmenu/list.handlebars index 07699204db0..0bcff7d1a85 100644 --- a/core/src/OC/contactsmenu/list.handlebars +++ b/core/src/OC/contactsmenu/list.handlebars @@ -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}} |