Show website information related to each domain.
This commit is contained in:
parent
81fa9b57fd
commit
b277b9a2e4
|
@ -43,11 +43,15 @@
|
|||
<strong>{{ domain.name }}</strong>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{% with domain.websites.0 as website %}
|
||||
{% with website.contents.0 as content %}
|
||||
<button type="button" class="btn text-secondary" data-toggle="modal" data-target="#configDetailsModal"
|
||||
data-domain="{{ domain.name }}" data-username="john" data-password="s3cre3t" data-root="/domainname/"
|
||||
data-domain="{{ domain.name }}" data-website="{{ website|yesno:'true,false' }}" data-webapp-type="{{ content.webapp.type }}" data-root-path="{{ content.path }}"
|
||||
data-url="{% url 'musician:domain-detail' domain.id %}">
|
||||
{% trans "view configuration" %} <strong class="fas fa-tools"></strong>
|
||||
</button>
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
<div class="col-md text-right">
|
||||
{% comment "@slamora: orchestra doesn't have this information [won't fix] See issue #2" %}
|
||||
|
@ -117,13 +121,22 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h6 class="pl-4 mb-4">{% trans "FTP access:" %}</h6>
|
||||
<div class="">
|
||||
<p>
|
||||
<label>{% trans "Username" %}:</label> <span id="config-username" class="font-weight-bold">username</span><br/>
|
||||
<label>{% trans "Password:" %}</label> <span id="config-password" class="font-weight-bold">password</span>
|
||||
</p>
|
||||
<p class="border-top pt-3"><label>Root directory:</label> <span id="config-root" class="font-weight-bold">root directory</span></p>
|
||||
<div class="domain-ftp pb-3 border-bottom">
|
||||
<h6 class="pl-4 mb-4">{% trans "FTP access:" %}</h6>
|
||||
{# Translators: domain configuration detail modal #}
|
||||
<p>{% trans "Contact with the support team to get details concerning FTP access." %}</p>
|
||||
{% comment %}
|
||||
<!-- hidden until API provides FTP information -->
|
||||
<label>{% trans "Username" %}:</label> <span id="config-username" class="font-weight-bold">username</span><br/>
|
||||
<label>{% trans "Password:" %}</label> <span id="config-password" class="font-weight-bold">password</span>
|
||||
{% endcomment %}
|
||||
</div>
|
||||
<div class="domain-website pt-4">
|
||||
<div id="no-website"><h6 class="pl-4">{% trans "No website configured." %}</h6></div>
|
||||
<div id="config-website">
|
||||
<label>Root directory:</label> <span id="config-root-path" class="font-weight-bold">root directory</span>
|
||||
<label>Type:</label><span id="config-webapp-type" class="font-weight-bold">type</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
@ -141,10 +154,19 @@ $('#configDetailsModal').on('show.bs.modal', function (event) {
|
|||
|
||||
// Extract info from data-* attributes
|
||||
modal.find('.modal-title').text(button.data('domain'));
|
||||
modal.find('.modal-body #config-username').text(button.data('username'));
|
||||
modal.find('.modal-body #config-password').text(button.data('password'));
|
||||
modal.find('.modal-body #config-root').text(button.data('root'));
|
||||
modal.find('.modal-body #config-webapp-type').text(button.data('webapp-type'));
|
||||
modal.find('.modal-body #config-root-path').text(button.data('root-path'));
|
||||
modal.find('.modal-footer .btn').attr('href', button.data('url'));
|
||||
|
||||
var nowebsite = modal.find('.modal-body #no-website');
|
||||
var websitecfg = modal.find('.modal-body #config-website');
|
||||
if(button.data('website')) {
|
||||
nowebsite.hide();
|
||||
websitecfg.show();
|
||||
} else {
|
||||
nowebsite.show();
|
||||
websitecfg.hide();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue