Include link to SaaS service manager.

This commit is contained in:
Santiago Lamora 2020-01-23 16:13:23 +01:00
parent 4da403c4aa
commit d05c61deff
2 changed files with 12 additions and 1 deletions

View File

@ -267,6 +267,17 @@ class SaasService(OrchestraModel):
}
@property
def manager_url(self):
URLS = {
'gitlab': musician_settings.URL_SAAS_GITLAB,
'owncloud': musician_settings.URL_SAAS_OWNCLOUD,
'wordpress': musician_settings.URL_SAAS_WORDPRESS,
}
return URLS.get(self.service, '#none')
class WebSite(OrchestraModel):
api_name = 'website'
param_defaults = {

View File

@ -34,7 +34,7 @@
</div>
<div class="col-md-5 text-right">
<div class="service-manager-link">
<a class="btn btn-primary" href="#open-service">{% trans "Open service admin panel" %} <i class="fas fa-external-link-alt"></i></a>
<a class="btn btn-primary" href="{{ saas.manager_url }}" target="_blank" rel="noopener noreferrer">{% trans "Open service admin panel" %} <i class="fas fa-external-link-alt"></i></a>
</div>
</div>
</div>