Commit 8202e2b3 authored by Robert Czechowski's avatar Robert Czechowski
Browse files

Add quickstart buttons to profile page to make account creation more straightforward

parent f9fff401
Pipeline #353 failed with stages
in 5 minutes and 36 seconds
......@@ -503,7 +503,8 @@ fn login_code_post<C>(req: &mut Request) -> IronResult<Response>
req.session().set(SessionToken { token: sessionkey }).unwrap();
//Ok(Response::with((status::Found, Redirect(url_for!(req, "profile")))))
Ok(Response::with((status::Found,
Redirect(iron::Url::parse(&format!("{}?status=firstlogin",&url_for!(req, "profile"))).unwrap()))))
Redirect(iron::Url::parse(&format!("{}?status=firstlogin",
&url_for!(req, "profile"))).unwrap()))))
}
// Login failed
Err((template, data)) => {
......
......@@ -136,6 +136,34 @@
</div>
</div>
{{#if ownprofile}}
<div class="columns">
<div class="column is-8 is-offset-2">
<div style="font-weight:bold">
<p>
{{#if NothingChanged}}
<a href="/" class="button is-warning">Zurück zur Startseite!</a>
<a href="/contest/open/" class="button is-success">Zum Training!</a>
<a href="/contest/current/" class="button is-info">Zu den Wettbewerben!</a>
{{/if}}
{{#if DataChanged}}
<a href="/" class="button is-warning">Zurück zur Startseite!</a>
<a href="/contest/open/" class="button is-success">Zum Training!</a>
<a href="/contest/current/" class="button is-info">Zu den Wettbewerben!</a>
{{/if}}
{{#if PasswordChanged}}
<a href="/" class="button is-primary">Zurück zur Startseite!</a>
<a href="/contest/open/" class="button is-success">Zum Training!</a>
<a href="/contest/current/" class="button is-info">Zu den Wettbewerben!</a>
{{/if}}
</p>
</div>
</div>
</div>
{{/if}}
{{/inline}}
{{~> (parent)~}}
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