Skip to content

Commit dc1b139

Browse files
committed
Merged in aksinhanerd/auth/client_management (pull request nerdapplabs#8)
Localization + Client Management
2 parents ec38ac1 + 6d5be7e commit dc1b139

File tree

68 files changed

+4148
-248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+4148
-248
lines changed
Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,7 @@
11
{% extends 'base.html.twig' %}
2-
{% block body %}
3-
<div>
4-
{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
5-
{{ 'layout.logged_in_as'|trans({'%username%': app.user.username}, 'FOSUserBundle') }} |
6-
<a href="{{ path('fos_user_security_logout') }}">
7-
{{ 'layout.logout'|trans({}, 'FOSUserBundle') }}
8-
</a>
9-
{% else %}
10-
<a href="{{ path('fos_user_security_login') }}">{{ 'layout.login'|trans({}, 'FOSUserBundle') }}</a>
11-
{% endif %}
12-
</div>
13-
14-
{% for type, messages in app.session.flashBag.all %}
15-
{% for message in messages %}
16-
<div class="{{ type }}">
17-
{{ message|trans({}, 'FOSUserBundle') }}
18-
</div>
19-
{% endfor %}
20-
{% endfor %}
21-
2+
{% block main %}
223
<div>
234
{% block fos_user_content %}
245
{% endblock fos_user_content %}
256
</div>
26-
27-
{% endblock %}
7+
{% endblock %}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{#
2+
This is a template fragment designed to be included in other templates
3+
See http://symfony.com/doc/current/book/templating.html#including-other-templates
4+
5+
A common practice to better distinguish between templates and fragments is to
6+
prefix fragments with an underscore. That's why this template is called
7+
'_flash_messages.html.twig' instead of 'flash_messages.html.twig'
8+
#}
9+
10+
{% if app.session.started and app.session.flashBag.peekAll is not empty %}
11+
<div class="messages">
12+
{% for type, messages in app.session.flashBag.all %}
13+
{% for message in messages %}
14+
{# Bootstrap alert, see http://getbootstrap.com/components/#alerts #}
15+
<div class="alert alert-dismissible alert-{{ type }}" role="alert">
16+
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
17+
<span aria-hidden="true">&times;</span>
18+
</button>
19+
20+
{{ message|trans }}
21+
</div>
22+
{% endfor %}
23+
{% endfor %}
24+
</div>
25+
{% endif %}

app/Resources/views/base.html.twig

Lines changed: 7 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,7 @@
1-
<!DOCTYPE html>
2-
<html>
3-
<head>
4-
<!-- Basic Page Needs
5-
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
6-
<meta charset="UTF-8" />
7-
<title>{% block title %}Welcome!{% endblock %}</title>
8-
<meta name="description" content="">
9-
<meta name="author" content="">
10-
11-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
12-
<!-- Mobile Specific Metas
13-
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
14-
<meta name="viewport" content="width=device-width, initial-scale=1">
15-
16-
<!-- FONT
17-
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
18-
<link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css">
19-
20-
<!-- CSS
21-
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
22-
{% block stylesheets %}
23-
{% stylesheets '@ApiBundle/Resources/public/skeleton/css/*' filter='cssrewrite' %}
24-
<link rel="stylesheet" href="{{ asset_url }}" />
25-
{% endstylesheets %}
26-
{% endblock %}
27-
<!-- Favicon
28-
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
29-
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
30-
</head>
31-
<body>
32-
33-
34-
<!-- Primary Page Layout
35-
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
36-
{% include "nav.html.twig" %}
37-
<div class="container">
38-
<div class="row">
39-
{% block body %}{% endblock %}
40-
</div>
41-
</div>
42-
43-
<!-- End Document
44-
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
45-
46-
{% block javascripts %}{% endblock %}
47-
</body>
48-
</html>
49-
50-
51-
52-
53-
54-
1+
{#
2+
This is the base template of the all backend pages. The layout is inherited
3+
from the desired front end theme. Currently the available options are
4+
bootstrap, material and skeleton. Just change the below line to select the other desired
5+
theme.
6+
#}
7+
{% extends 'base_bootstrap.html.twig' %}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<!DOCTYPE html>
2+
<html lang="{{ app.request.locale }}">
3+
<head>
4+
<!-- Basic Page Needs
5+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
6+
<meta charset="UTF-8" />
7+
<title>{% block title %}{{ 'welcome_title'|trans }}{% endblock %}</title>
8+
<meta name="description" content="">
9+
<meta name="author" content="">
10+
11+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
12+
<!-- Mobile Specific Metas
13+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
14+
<meta name="viewport" content="width=device-width, initial-scale=1">
15+
16+
<!-- FONT
17+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
18+
<link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css">
19+
20+
<!-- CSS
21+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
22+
{% block stylesheets %}
23+
{% stylesheets '@ApiBundle/Resources/public/bootstrap/css/*' filter='cssrewrite' %}
24+
<link rel="stylesheet" href="{{ asset_url }}"/>
25+
{% endstylesheets %}
26+
{% endblock %}
27+
<!-- Favicon
28+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
29+
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
30+
</head>
31+
<body>
32+
33+
34+
<!-- Primary Page Layout
35+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
36+
37+
<div class="container body-container">
38+
{% include "nav_bootstrap.html.twig" %}
39+
{% block body %}
40+
<div class="row">
41+
<div id="main" class="col-sm-9">
42+
{{ include('_flash_messages.html.twig') }}
43+
44+
{% block main %}{% endblock %}
45+
</div>
46+
47+
<div id="sidebar" class="col-sm-3">
48+
{% block sidebar %}{% endblock %}
49+
</div>
50+
</div>
51+
{% endblock %}
52+
</div>
53+
<!-- End Document
54+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
55+
{# Maintain this order of loading of js #}
56+
{% block javascripts %}
57+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
58+
{% javascripts
59+
'@ApiBundle/Resources/public/bootstrap/js/bootstrap.min.js'
60+
'@ApiBundle/Resources/public/bootstrap/js/main.js' %}
61+
<script src="{{ asset_url }}"></script>
62+
{% endjavascripts %}
63+
{% endblock %}
64+
</body>
65+
</html>
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<!DOCTYPE html>
2+
<html lang="{{ app.request.locale }}">
3+
<head>
4+
<!-- Basic Page Needs
5+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
6+
<meta charset="UTF-8" />
7+
<title>{% block title %}{{ 'welcome_title'|trans }}{% endblock %}</title>
8+
<meta name="description" content="">
9+
<meta name="author" content="">
10+
11+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
12+
<!-- Mobile Specific Metas
13+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
14+
<meta name="viewport" content="width=device-width, initial-scale=1">
15+
16+
<!-- FONT
17+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
18+
<link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css">
19+
20+
<!-- CSS
21+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
22+
{% block stylesheets %}
23+
{% stylesheets '@ApiBundle/Resources/public/materialize/css/*' filter='cssrewrite' %}
24+
<link rel="stylesheet" href="{{ asset_url }}"/>
25+
{% endstylesheets %}
26+
{% endblock %}
27+
<!-- Favicon
28+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
29+
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
30+
</head>
31+
<body>
32+
33+
34+
<!-- Primary Page Layout
35+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
36+
37+
<div class="container">
38+
{% include "nav_materialize.html.twig" %}
39+
{% block body %}
40+
<div class="row">
41+
<div id="main" class="col s9">
42+
{{ include('_flash_messages.html.twig') }}
43+
44+
{% block main %}{% endblock %}
45+
</div>
46+
47+
<div id="sidebar" class="col s3">
48+
{% block sidebar %}{% endblock %}
49+
</div>
50+
</div>
51+
{% endblock %}
52+
</div>
53+
<!-- End Document
54+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
55+
{% block javascripts %}
56+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
57+
{% javascripts '@ApiBundle/Resources/public/materialize/js/*' %}
58+
<script src="{{ asset_url }}"></script>
59+
{% endjavascripts %}
60+
{% endblock %}
61+
</body>
62+
</html>
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<!DOCTYPE html>
2+
<html lang="{{ app.request.locale }}">
3+
<head>
4+
<!-- Basic Page Needs
5+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
6+
<meta charset="UTF-8" />
7+
<title>{% block title %}{{ 'welcome_title'|trans }}{% endblock %}</title>
8+
<meta name="description" content="">
9+
<meta name="author" content="">
10+
11+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
12+
<!-- Mobile Specific Metas
13+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
14+
<meta name="viewport" content="width=device-width, initial-scale=1">
15+
16+
<!-- FONT
17+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
18+
<link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css">
19+
20+
<!-- CSS
21+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
22+
{% block stylesheets %}
23+
{% stylesheets '@ApiBundle/Resources/public/skeleton/css/*' filter='cssrewrite' %}
24+
<link rel="stylesheet" href="{{ asset_url }}" />
25+
{% endstylesheets %}
26+
{% endblock %}
27+
<!-- Favicon
28+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
29+
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
30+
</head>
31+
<body>
32+
33+
34+
<!-- Primary Page Layout
35+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
36+
<div>
37+
{% include "nav_skeleton.html.twig" %}
38+
{% block body %}
39+
<div id="main">
40+
{{ include('_flash_messages.html.twig') }}
41+
42+
{% block main %}{% endblock %}
43+
</div>
44+
45+
<div id="sidebar">
46+
{% block sidebar %}{% endblock %}
47+
</div>
48+
{% endblock %}
49+
</div>
50+
<!-- End Document
51+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
52+
53+
{% block javascripts %}{% endblock %}
54+
</body>
55+
</html>

app/Resources/views/default/index.html.twig

Lines changed: 0 additions & 12 deletions
This file was deleted.

app/Resources/views/nav.html.twig

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)