Commit 12ab3abb authored by Hugo LEVY-FALK's avatar Hugo LEVY-FALK Committed by root

Fix Service usage in machine templates.

parent 99c69a5d
...@@ -30,7 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -30,7 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block content %} {% block content %}
<h2>Liste des services</h2> <h2>Liste des services</h2>
{% can_create Service %} {% can_create machines.Service %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-service' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un service</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-service' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un service</a>
{% acl_end %} {% acl_end %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-service' %}"><i class="glyphicon glyphicon-trash"></i> Supprimer un ou plusieurs service</a> <a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-service' %}"><i class="glyphicon glyphicon-trash"></i> Supprimer un ou plusieurs service</a>
......
...@@ -62,7 +62,7 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -62,7 +62,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
Gestion des nas Gestion des nas
</a> </a>
{% acl_end %} {% acl_end %}
{% can_view_all Service %} {% can_view_all machines.Service %}
<a class="list-group-item list-group-item-info" href="{% url "machines:index-service" %}"> <a class="list-group-item list-group-item-info" href="{% url "machines:index-service" %}">
<i class="glyphicon glyphicon-list"></i> <i class="glyphicon glyphicon-list"></i>
Services (dhcp, dns...) Services (dhcp, dns...)
...@@ -72,6 +72,6 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -72,6 +72,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<a class="list-group-item list-group-item-info" href="{% url "machines:index-portlist" %}"> <a class="list-group-item list-group-item-info" href="{% url "machines:index-portlist" %}">
<i class="glyphicon glyphicon-list"></i> <i class="glyphicon glyphicon-list"></i>
Ouverture de ports Ouverture de ports
</a> </a>
{% acl_end %} {% acl_end %}
{% endblock %} {% endblock %}
...@@ -179,7 +179,7 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -179,7 +179,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</tr> </tr>
</table> </table>
<h2>Liste des services page d'accueil</h2> <h2>Liste des services page d'accueil</h2>
{% can_create Service%} {% can_create preferences.Service%}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:add-service' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un service</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:add-service' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un service</a>
{% acl_end %} {% acl_end %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'preferences:del-services' %}"><i class="glyphicon glyphicon-trash"></i> Supprimer un ou plusieurs service</a> <a class="btn btn-danger btn-sm" role="button" href="{% url 'preferences:del-services' %}"><i class="glyphicon glyphicon-trash"></i> Supprimer un ou plusieurs service</a>
......
...@@ -106,7 +106,7 @@ MODEL_NAME = { ...@@ -106,7 +106,7 @@ MODEL_NAME = {
'Interface' : machines.models.Interface, 'Interface' : machines.models.Interface,
'Domain' : machines.models.Domain, 'Domain' : machines.models.Domain,
'IpList' : machines.models.IpList, 'IpList' : machines.models.IpList,
'Service' : machines.models.Service, 'machines.Service' : machines.models.Service,
'Service_link' : machines.models.Service_link, 'Service_link' : machines.models.Service_link,
'OuverturePortList' : machines.models.OuverturePortList, 'OuverturePortList' : machines.models.OuverturePortList,
'OuverturePort' : machines.models.OuverturePort, 'OuverturePort' : machines.models.OuverturePort,
...@@ -115,7 +115,7 @@ MODEL_NAME = { ...@@ -115,7 +115,7 @@ MODEL_NAME = {
'OptionalMachine': preferences.models.OptionalMachine, 'OptionalMachine': preferences.models.OptionalMachine,
'OptionalTopologie': preferences.models.OptionalTopologie, 'OptionalTopologie': preferences.models.OptionalTopologie,
'GeneralOption': preferences.models.GeneralOption, 'GeneralOption': preferences.models.GeneralOption,
'Service': preferences.models.Service, 'preferences.Service': preferences.models.Service,
'AssoOption': preferences.models.AssoOption, 'AssoOption': preferences.models.AssoOption,
'MailMessageOption': preferences.models.MailMessageOption, 'MailMessageOption': preferences.models.MailMessageOption,
# topologie # topologie
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment