clone of github.com/decent-newsroom/newsroom
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

28 lines
1017 B

<div {{ attributes.defaults(stimulus_controller('login')) }}>
{% if app.user %}
<p>Hello, {{ app.user.displayName }}</p>
{% if is_granted('ROLE_ADMIN') %}
<ul>
<li>
<a href="{{ path('admin_roles') }}">{{ 'heading.roles'|trans }}</a>
</li>
</ul>
{% endif %}
<ul>
<li>
<a href="{{ path('author-profile', {npub: app.user.npub }) }}">Profile</a>
</li>
<li>
<a href="{{ path('editor-create') }}">Write an article</a>
</li>
<li>
<a href="{{ path('nzine_index') }}">{{ 'heading.createNzine'|trans }}</a>
</li>
<li>
<a href="/logout" data-action="live#$render">{{ 'heading.logout'|trans }}</a>
</li>
</ul>
{% else %}
<twig:Atoms:Button {{ ...stimulus_action('login', 'loginAct') }}>{{ 'heading.logIn'|trans }}</twig:Atoms:Button>
{% endif %}
</div>