Show contacts app mgmt link in contacts menu

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2019-06-26 18:20:39 +02:00 committed by Julius Härtl
parent afb86ef4f5
commit e9860c89ca
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
8 changed files with 23 additions and 16 deletions

12
core/js/dist/login.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -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);
},

View File

@ -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}}