Archived
1
0
Fork 0

app/views/user/settings.volt: adding social sign-in section

This commit is contained in:
Henrik Hautakoski 2018-06-10 10:24:45 +02:00
parent 0db9f91a3e
commit 9ded2f36ad
2 changed files with 42 additions and 0 deletions

View file

@ -33,6 +33,7 @@ class UserController extends ControllerBase
}
}
$this->view->user = $user;
$this->view->form = $form;
}

View file

@ -37,9 +37,50 @@
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<h4>Social sign-in</h4>
<hr />
<div class="col-sm-2 text-center">
<div>{{ icon('brand/github', [ '3x' ]) }}</div>
{% if user.getGithubId() > 0 %}
<a href="{{ url(['for': 'oauth-disconnect', 'provider': 'github']) }}">Disconnect</a>
{% else %}
<a href="{{ url(['for': 'oauth-connect', 'provider': 'github']) }}">Connect</a>
{% endif %}
</div>
<div class="col-sm-2 text-center">
<div class="text-gitlab">{{ icon('brand/gitlab', [ '3x' ]) }}</div>
{% if user.getGitlabId() > 0 %}
<a href="{{ url(['for': 'oauth-disconnect', 'provider': 'gitlab', 'mode': 'unlink' ]) }}">Disconnect</a>
{% else %}
<a href="{{ url(['for': 'oauth-connect', 'provider': 'gitlab']) }}">Connect</a>
{% endif %}
</div>
<div class="col-sm-2 text-center">
<div class="text-google">{{ icon('brand/google', [ '3x' ]) }}</div>
{% if user.getGoogleId() > 0 %}
<a href="{{ url(['for': 'oauth-disconnect', 'provider': 'google']) }}">Connect</a>
{% else %}
<a href="{{url(['for': 'oauth-connect', 'provider': 'google']) }}">Connect</a>
{% endif %}
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<hr />
{{ form.render('Save') }}
</div>
</div>
</form>
</div>