Add menu access to site credentials CRUD

This commit is contained in:
Jeremy Benoist
2017-05-01 22:13:35 +02:00
parent 5a9bc00726
commit b8427f22f0
22 changed files with 258 additions and 14 deletions

View File

@ -49,7 +49,7 @@
<button onclick="return confirm('{{ 'site_credential.form.delete_confirm'|trans|escape('js') }}')" type="submit" class="btn waves-effect waves-light red">{{ 'site_credential.form.delete'|trans }}</button>
{{ form_end(delete_form) }}
</p>
<p><a class="waves-effect waves-light btn blue-grey" href="{{ path('site_credential_index') }}">{{ 'site_credential.form.back_to_list'|trans }}</a></p>
<p><a class="waves-effect waves-light btn blue-grey" href="{{ path('site_credentials_index') }}">{{ 'site_credential.form.back_to_list'|trans }}</a></p>
</div>
</div>
</div>

View File

@ -25,7 +25,7 @@
<td>{{ credential.host }}</td>
<td>{{ credential.username }}</td>
<td>
<a href="{{ path('site_credential_edit', { 'id': credential.id }) }}">{{ 'site_credential.list.edit_action'|trans }}</a>
<a href="{{ path('site_credentials_edit', { 'id': credential.id }) }}">{{ 'site_credential.list.edit_action'|trans }}</a>
</td>
</tr>
{% endfor %}
@ -33,7 +33,7 @@
</table>
<br />
<p>
<a href="{{ path('site_credential_new') }}" class="waves-effect waves-light btn">{{ 'site_credential.list.create_new_one'|trans }}</a>
<a href="{{ path('site_credentials_new') }}" class="waves-effect waves-light btn">{{ 'site_credential.list.create_new_one'|trans }}</a>
</p>
</div>
</div>

View File

@ -42,7 +42,7 @@
{{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
{{ form_rest(form) }}
</form>
<p><a class="waves-effect waves-light btn blue-grey" href="{{ path('site_credential_index') }}">{{ 'site_credential.form.back_to_list'|trans }}</a></p>
<p><a class="waves-effect waves-light btn blue-grey" href="{{ path('site_credentials_index') }}">{{ 'site_credential.form.back_to_list'|trans }}</a></p>
</div>
</div>
</div>

View File

@ -38,6 +38,9 @@
{{ render(controller("WallabagCoreBundle:Entry:searchForm", {'currentRoute': app.request.attributes.get('_route')})) }}
</div>
</li>
{% if craue_setting('restricted_access') %}
<li class="menu site_credentials"><a href="{{ path('site_credentials_index') }}">{{ 'menu.left.site_credentials'|trans }}</a></li>
{% endif %}
<li class="menu config"><a href="{{ path('config') }}">{{ 'menu.left.config'|trans }}</a></li>
{% if is_granted('ROLE_SUPER_ADMIN') %}
<li class="menu users"><a href="{{ path('user_index') }}">{{ 'menu.left.users_management'|trans }}</a></li>

View File

@ -66,6 +66,11 @@
<li class="bold {% if currentRoute == 'config' %}active{% endif %}">
<a class="waves-effect" href="{{ path('config') }}">{{ 'menu.left.config'|trans }}</a>
</li>
{% if craue_setting('restricted_access') %}
<li class="bold {% if currentRoute starts with 'site_credentials_' %}active{% endif %}">
<a class="waves-effect" href="{{ path('site_credentials_index') }}">{{ 'menu.left.site_credentials'|trans }}</a>
</li>
{% endif %}
{% if is_granted('ROLE_SUPER_ADMIN') %}
<li class="bold {% if currentRoute starts with 'user_' %}active{% endif %}">
<a class="waves-effect" href="{{ path('user_index') }}">{{ 'menu.left.users_management'|trans }}</a>