Skip to content
This repository
Browse code

Merge branch 'master' of github.com:LogTweets/logtweets

  • Loading branch information...
commit 922626c0a24ff3b915fe5ba32e5d55f4bb5227ed 2 parents 214885f + 6276f1f
David Werner thedave80 authored
3  .gitignore
@@ -10,4 +10,5 @@ web/js/
10 10 install-composer.php
11 11 .idea
12 12 web/.htaccess
13   -app/config/parameters.yml
  13 +app/config/parameters.yml
  14 +composer.lock
2  composer.lock
@@ -134,7 +134,7 @@
134 134 {
135 135 "package": "twig/twig",
136 136 "version": "dev-master",
137   - "source-reference": "fa0b0985c3b3b62281ea938f01eadf04cdbeaa3f",
  137 + "source-reference": "07a953e01622bf2d3f57ac4fcfa4724fa2143075",
138 138 "alias": "1.7.9999999.9999999-dev"
139 139 },
140 140 {
4 src/LogTweets/Bundle/LayoutBundle/LogTweetsLayoutBundle.php
@@ -5,4 +5,8 @@
5 5
6 6 class LogTweetsLayoutBundle extends Bundle
7 7 {
  8 + public function getParent()
  9 + {
  10 + return 'FOSUserBundle';
  11 + }
8 12 }
21 src/LogTweets/Bundle/LayoutBundle/Resources/views/Layout/base.html.twig
@@ -20,12 +20,29 @@
20 20 <span class="icon-bar"></span>
21 21 <span class="icon-bar"></span>
22 22 </a>
23   - <a class="brand" href="/">LogTweets</a>
  23 + <a class="brand" href="{{ url('_organisation_home') }}">LogTweets</a>
24 24 <div class="nav-collapse">
25 25 <ul class="nav">
26   - <li class="active"><a href="/">Home</a></li>
  26 + <li class="active"><a href="{{ url('_organisation_home') }}">Home</a></li>
27 27 <li><a href="/"></a></li>
28 28 </ul>
  29 + <ul class="nav pull-right">
  30 + {% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
  31 + <li class="dropdown">
  32 + <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  33 + <b class="caret"></b> {{ app.user.username }}
  34 + </a>
  35 + <ul class="dropdown-menu">
  36 + <li><a href="{{ path('fos_user_security_logout') }}">Logout</a></li>
  37 + </ul>
  38 + </li>
  39 + {% else %}
  40 + <li>
  41 + <a href="{{ path('fos_user_security_login') }}">Login</a>
  42 + </li>
  43 + {% endif %}
  44 +
  45 + </ul>
29 46 </div><!--/.nav-collapse -->
30 47 </div>
31 48 </div>
43 src/LogTweets/Bundle/LayoutBundle/Resources/views/Security/login.html.twig
... ... @@ -0,0 +1,43 @@
  1 +{% extends 'LogTweetsLayoutBundle:Layout:base.html.twig' %}
  2 +
  3 +{% block headline %}Login{% endblock headline%}
  4 +
  5 +{% block content %}
  6 +{% block fos_user_content %}
  7 + {% if error %}
  8 + <div>{{ error }}</div>
  9 + {% endif %}
  10 +
  11 + <form action="{{ path("fos_user_security_check") }}" method="post" class="form-horizontal">
  12 +
  13 + <input type="hidden" name="_csrf_token" value="{{ csrf_token }}" />
  14 +
  15 + <div class="control-group">
  16 + <label class="control-label" for="username">Username</label>
  17 + <div class="controls">
  18 + <input class="input-xlarge" type="text" id="username" name="_username" value="{{ last_username }}" />
  19 + </div>
  20 + </div>
  21 +
  22 + <div class="control-group">
  23 + <label class="control-label" for="password">Password</label>
  24 + <div class="controls">
  25 + <input class="input-xlarge" type="password" id="password" name="_password" />
  26 + </div>
  27 + </div>
  28 +
  29 + <div class="control-group">
  30 + <label class="control-label" for="remember_me">Remember me</label>
  31 + <div class="controls">
  32 + <input type="checkbox" id="remember_me" name="_remember_me" value="on" />
  33 + </div>
  34 + </div>
  35 +
  36 + <div class="form-actions">
  37 + <input class="btn btn-primary" type="submit" id="_submit" name="_submit" value="Submit" />
  38 + </div>
  39 +
  40 + </form>
  41 + {% endblock fos_user_content %}
  42 +
  43 +{% endblock content %}
9 src/LogTweets/Bundle/OrganisationBundle/Resources/views/Start/index.html.twig
@@ -15,7 +15,14 @@
15 15 keep track of who changed what on which system — without wasting anyones
16 16 time.
17 17 </p>
18   - <p><a class="btn btn-primary btn-large pull-right js-registration-trigger">Register now</a></p>
  18 + {% if not is_granted("IS_AUTHENTICATED_REMEMBERED") %}
  19 + <p>
  20 + <a class="btn btn-primary btn-large pull-right js-registration-trigger">Register now</a>
  21 + </p>
  22 + {% else %}
  23 + <p class="pull-right">You're logged in</p>
  24 + {% endif %}
  25 +
19 26 </div>
20 27
21 28 <div class="modal js-registration-form is-hidden">

0 comments on commit 922626c

Please sign in to comment.
Something went wrong with that request. Please try again.