nodefony 6.9.1 → 6.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6834 -6591
- package/README.md +2 -5
- package/autoloader.es6 +4 -3
- package/cli/builder/bundles/users-bundle/Command/usersCommand.js +1 -1
- package/cli/builder/bundles/users-bundle/Entity/sequelize/userEntity.js +22 -6
- package/cli/builder/bundles/users-bundle/Fixtures/users.js +1 -1
- package/cli/builder/bundles/users-bundle/Resources/config/webpack.config.js +12 -1
- package/cli/builder/bundles/users-bundle/Resources/graphiql/graphiql.jsx +40 -4
- package/cli/builder/bundles/users-bundle/Resources/scss/users.scss +9 -10
- package/cli/builder/bundles/users-bundle/Resources/swagger/config.js +2 -2
- package/cli/builder/bundles/users-bundle/Resources/swagger/swagger.js +10 -3
- package/cli/builder/bundles/users-bundle/Resources/translations/login.en_en.yml +3 -1
- package/cli/builder/bundles/users-bundle/Resources/translations/login.fr_fr.yml +2 -0
- package/cli/builder/bundles/users-bundle/Resources/views/documentation/base.html.twig +1 -2
- package/cli/builder/bundles/users-bundle/Resources/views/footer.html.twig +2 -4
- package/cli/builder/bundles/users-bundle/Resources/views/graphiql/index.html.twig +4 -9
- package/cli/builder/bundles/users-bundle/Resources/views/header.html.twig +63 -66
- package/cli/builder/bundles/users-bundle/Resources/views/swagger/index.html.twig +4 -12
- package/cli/builder/bundles/users-bundle/controller/api/graphql/graphqlController.js +2 -0
- package/cli/builder/bundles/users-bundle/controller/usersController.js +1 -1
- package/cli/builder/bundles/users-bundle/package.json +27 -25
- package/cli/builder/microService/skeletons/config/pm2.config.js +1 -1
- package/cli/builder/microService/skeletons/config/webpack/webpack.config.dev.js +1 -6
- package/cli/builder/microService/skeletons/config/webpack/webpack.config.prod.js +1 -6
- package/cli/builder/microService/skeletons/config/webpack.config.js +40 -34
- package/cli/builder/microService/skeletons/package.json +41 -36
- package/cli/builder/microService/skeletons/src/browser/index.css +1 -1
- package/cli/builder/microService/skeletons/src/browser/index.js +1 -3
- package/cli/builder/microService/skeletons/src/browser/socketio.js +46 -0
- package/cli/builder/microService/skeletons/src/node/examples/index.js +12 -52
- package/cli/builder/microService/skeletons/src/node/index.js +18 -18
- package/cli/builder/microService/skeletons/src/node/services/servers/http.js +9 -1
- package/cli/builder/microService/skeletons/src/node/services/servers/https.js +9 -1
- package/cli/builder/microService/skeletons/src/node/services/socketio/socketio.js +15 -12
- package/cli/builder/microService/skeletons/src/templates/base.html +12 -0
- package/cli/builder/microService/skeletons/src/templates/socket.html +23 -0
- package/cli/builder/project/skeletons/README.md +2 -5
- package/cli/builder/project/skeletons/package.json.skeleton +8 -8
- package/cli/builder/react/reactBuilder.js +2 -2
- package/cli/builder/sandbox/skeletons/Resources/js/entry.js +2 -2
- package/cli/builder/sandbox/skeletons/Resources/views/base.html.twig +2 -2
- package/cli/builder/skeletons/config/nodefony/http-bundle.js +5 -3
- package/cli/builder/skeletons/config/nodefony/redis-bundle.js +16 -11
- package/cli/builder/skeletons/config/webpack.config.js +4 -4
- package/cli/builder/skeletons/package.json +21 -18
- package/cli/builder/vue/vueBuilder.js +3 -1
- package/cli/install/install.js +2 -1
- package/cli/start.js +1 -1
- package/cli.es6 +24 -14
- package/error.es6 +2 -1
- package/kernel/api/graphqlApi.es6 +17 -7
- package/kernel/bundle.es6 +1 -1
- package/kernel/cliKernel.es6 +1 -1
- package/kernel/controllers/controller.es6 +4 -0
- package/kernel/kernel.es6 +1 -1
- package/kernel/reader.es6 +1 -0
- package/kernel/security/secureArea.es6 +3 -1
- package/kernel/security/user.es6 +14 -1
- package/kernel/services/cron/cronService.es6 +5 -27
- package/nodefony.es6 +1 -1
- package/package.json +38 -38
- package/syslog/syslog.es6 +3 -0
- package/cli/builder/bundles/users-bundle/Resources/views/index.html.twig +0 -19
package/README.md
CHANGED
|
@@ -11,9 +11,6 @@ Nodefony is Node.js full-stack web framework.
|
|
|
11
11
|
|
|
12
12
|
Nodefony can be used to develop a complete solution to create a Fullstack Web Application, Secure Api, or Microservices.
|
|
13
13
|
|
|
14
|
-
The Nodefony project is inspired by the PHP Symfony framework, a developer can find most of the concepts, configurations and patterns of Symfony framework.
|
|
15
|
-
|
|
16
|
-
Nodefony is not an exhaustive port of symfony !
|
|
17
14
|
|
|
18
15
|
## Table of content
|
|
19
16
|
|
|
@@ -137,9 +134,9 @@ You can follow Nodefony build with github actions at **<https://github.com/nodef
|
|
|
137
134
|
|
|
138
135
|
To install or update nvm, you can use the install script:
|
|
139
136
|
```sh
|
|
140
|
-
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.
|
|
137
|
+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
|
|
141
138
|
# or
|
|
142
|
-
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.
|
|
139
|
+
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
|
|
143
140
|
|
|
144
141
|
$ source ~/.bashrc # or source ~/.bash_profile
|
|
145
142
|
$ nvm ls-remote # show all remote versions
|
package/autoloader.es6
CHANGED
|
@@ -44,7 +44,7 @@ module.exports = function () {
|
|
|
44
44
|
* @module NODEFONY
|
|
45
45
|
*
|
|
46
46
|
*/
|
|
47
|
-
const regJs = /.*\.js$|.*\.es6$|.*\.es7$/;
|
|
47
|
+
const regJs = /.*\.js$|.*\.es6$|.*\.es7$|.*\.(mjs)$/;
|
|
48
48
|
|
|
49
49
|
class Autoload {
|
|
50
50
|
|
|
@@ -174,7 +174,7 @@ module.exports = function () {
|
|
|
174
174
|
}
|
|
175
175
|
console.error(e);
|
|
176
176
|
if(this.kernel){
|
|
177
|
-
this.kernel.terminate(1);
|
|
177
|
+
this.kernel.terminate(1);
|
|
178
178
|
}
|
|
179
179
|
throw e;
|
|
180
180
|
}
|
|
@@ -234,7 +234,8 @@ module.exports = function () {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
autoloadEach(ele) {
|
|
237
|
-
|
|
237
|
+
let res = regJs.exec(ele.path)
|
|
238
|
+
if (res) {
|
|
238
239
|
this.load.call(this, ele.path);
|
|
239
240
|
this.log(ele.path, "DEBUG");
|
|
240
241
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
const {
|
|
1
|
+
const {
|
|
2
|
+
Sequelize,
|
|
3
|
+
DataTypes,
|
|
4
|
+
Model
|
|
5
|
+
} = nodefony.Sequelize; //require("sequelize");
|
|
2
6
|
const validator = require('validator');
|
|
3
7
|
/*
|
|
4
8
|
*
|
|
@@ -40,7 +44,7 @@ class userEntity extends nodefony.Entity {
|
|
|
40
44
|
allowNull: false,
|
|
41
45
|
validate: {
|
|
42
46
|
is: {
|
|
43
|
-
args:
|
|
47
|
+
args: /^[\w-_.]+$/,
|
|
44
48
|
msg: `username allow alphanumeric and ( _ | - | . ) characters`
|
|
45
49
|
}
|
|
46
50
|
/*notIn: {
|
|
@@ -82,7 +86,7 @@ class userEntity extends nodefony.Entity {
|
|
|
82
86
|
},
|
|
83
87
|
email: {
|
|
84
88
|
type: DataTypes.STRING,
|
|
85
|
-
primaryKey: true,
|
|
89
|
+
//primaryKey: true,
|
|
86
90
|
unique: true,
|
|
87
91
|
allowNull: false,
|
|
88
92
|
validate: {
|
|
@@ -96,7 +100,7 @@ class userEntity extends nodefony.Entity {
|
|
|
96
100
|
allowNull: true,
|
|
97
101
|
validate: {
|
|
98
102
|
is: {
|
|
99
|
-
args:
|
|
103
|
+
args: /^[\w-_.]*$/,
|
|
100
104
|
msg: `name allow alphanumeric characters`
|
|
101
105
|
}
|
|
102
106
|
}
|
|
@@ -106,7 +110,7 @@ class userEntity extends nodefony.Entity {
|
|
|
106
110
|
allowNull: true,
|
|
107
111
|
validate: {
|
|
108
112
|
is: {
|
|
109
|
-
args:
|
|
113
|
+
args: /^[\w-_.]*$/,
|
|
110
114
|
msg: `surname allow alphanumeric characters`
|
|
111
115
|
}
|
|
112
116
|
}
|
|
@@ -153,7 +157,19 @@ class userEntity extends nodefony.Entity {
|
|
|
153
157
|
}
|
|
154
158
|
|
|
155
159
|
registerModel(db) {
|
|
156
|
-
class MyModel extends Model {
|
|
160
|
+
class MyModel extends Model {
|
|
161
|
+
hasRole(name){
|
|
162
|
+
for (let role in this.roles) {
|
|
163
|
+
if (this.roles[role] === name) {
|
|
164
|
+
return true;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
isGranted(role){
|
|
170
|
+
return this.hasRole(role);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
157
173
|
MyModel.init(this.getSchema(), {
|
|
158
174
|
sequelize: db,
|
|
159
175
|
modelName: this.name,
|
|
@@ -37,15 +37,20 @@ module.exports = merge(config, {
|
|
|
37
37
|
path: public,
|
|
38
38
|
publicPath: publicPath,
|
|
39
39
|
filename: "./js/[name].js",
|
|
40
|
+
hashFunction: "xxhash64",
|
|
40
41
|
library: "[name]",
|
|
41
42
|
libraryExport: "default"
|
|
42
43
|
},
|
|
43
44
|
externals: {},
|
|
44
45
|
resolve: {
|
|
45
46
|
extensions: ['.js', '.json', '.jsx', '.css', '.mjs'],
|
|
47
|
+
alias: {
|
|
48
|
+
"@modules": path.join(__dirname, "..", "..", "node_modules")
|
|
49
|
+
},
|
|
46
50
|
fallback: {
|
|
47
51
|
"path": false,
|
|
48
|
-
"assert": false
|
|
52
|
+
"assert": false,
|
|
53
|
+
buffer: require.resolve('buffer/')
|
|
49
54
|
}
|
|
50
55
|
},
|
|
51
56
|
module: {
|
|
@@ -121,10 +126,16 @@ module.exports = merge(config, {
|
|
|
121
126
|
]
|
|
122
127
|
},
|
|
123
128
|
plugins: [
|
|
129
|
+
new webpack.ProvidePlugin({
|
|
130
|
+
Buffer: ['buffer', 'Buffer'],
|
|
131
|
+
}),
|
|
124
132
|
new MiniCssExtractPlugin({
|
|
125
133
|
filename: "./css/[name].css"
|
|
126
134
|
}),
|
|
127
135
|
new webpack.DefinePlugin({
|
|
136
|
+
'process':{
|
|
137
|
+
platform:`'${process.platform}'`
|
|
138
|
+
},
|
|
128
139
|
'process.env': {
|
|
129
140
|
'NODE_ENV': JSON.stringify(process.env.NODE_ENV),
|
|
130
141
|
"NODE_DEBUG": JSON.stringify(debug),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { render } from "react-dom";
|
|
3
3
|
import GraphiQL from "graphiql";
|
|
4
|
+
//import { createGraphiQLFetcher } from '@graphiql/toolkit';
|
|
4
5
|
import "graphiql/graphiql.min.css";
|
|
5
6
|
import "./index.css";
|
|
6
7
|
const NODE_ENV = process.env.NODE_ENV ;
|
|
@@ -9,7 +10,7 @@ const config = process.env.GRAPHIQL ;
|
|
|
9
10
|
|
|
10
11
|
const URL = config.url;
|
|
11
12
|
|
|
12
|
-
function
|
|
13
|
+
function fetcher(graphQLParams) {
|
|
13
14
|
return fetch(URL, {
|
|
14
15
|
method: 'post',
|
|
15
16
|
headers: {
|
|
@@ -19,12 +20,47 @@ function graphQLFetcher(graphQLParams) {
|
|
|
19
20
|
body: JSON.stringify(graphQLParams),
|
|
20
21
|
credentials: 'same-origin',
|
|
21
22
|
}).then(response => response.json().then((ele)=>{
|
|
22
|
-
|
|
23
|
+
if(ele.error){
|
|
24
|
+
return ele.error;
|
|
25
|
+
}
|
|
23
26
|
return ele.data;
|
|
27
|
+
}).catch(e =>{
|
|
28
|
+
throw e;
|
|
24
29
|
}));
|
|
25
30
|
}
|
|
26
31
|
|
|
27
32
|
const defaultQuery = `
|
|
33
|
+
# Welcome to GraphiQL
|
|
34
|
+
#
|
|
35
|
+
# GraphiQL is an in-browser tool for writing, validating, and
|
|
36
|
+
# testing GraphQL queries.
|
|
37
|
+
#
|
|
38
|
+
# Type queries into this side of the screen, and you will see intelligent
|
|
39
|
+
# typeaheads aware of the current GraphQL type schema and live syntax and
|
|
40
|
+
# validation errors highlighted within the text.
|
|
41
|
+
#
|
|
42
|
+
# GraphQL queries typically start with a "{" character. Lines that start
|
|
43
|
+
# with a # are ignored.
|
|
44
|
+
#
|
|
45
|
+
# An example GraphQL query might look like:
|
|
46
|
+
#
|
|
47
|
+
# {
|
|
48
|
+
# field(arg: "value") {
|
|
49
|
+
# subField
|
|
50
|
+
# }
|
|
51
|
+
# }
|
|
52
|
+
#
|
|
53
|
+
# Keyboard shortcuts:
|
|
54
|
+
#
|
|
55
|
+
# Prettify Query: Shift-Ctrl-P (or press the prettify button above)
|
|
56
|
+
#
|
|
57
|
+
# Merge Query: Shift-Ctrl-M (or press the merge button above)
|
|
58
|
+
#
|
|
59
|
+
# Run Query: Ctrl-Enter (or press the play button above)
|
|
60
|
+
#
|
|
61
|
+
# Auto Complete: Ctrl-Space (or just start typing)
|
|
62
|
+
#
|
|
63
|
+
|
|
28
64
|
{
|
|
29
65
|
user(username: "admin") {
|
|
30
66
|
username
|
|
@@ -55,6 +91,6 @@ const Logo = () => {
|
|
|
55
91
|
GraphiQL.Logo = Logo;
|
|
56
92
|
|
|
57
93
|
render(
|
|
58
|
-
<GraphiQL fetcher={
|
|
94
|
+
<GraphiQL fetcher={fetcher} defaultQuery={defaultQuery} />,
|
|
59
95
|
container
|
|
60
96
|
);
|
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
@import url(https://fonts.googleapis.com/css?family=Comfortaa);
|
|
2
2
|
@import url(https://fonts.googleapis.com/css?family=Gochi+Hand);
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
text-align: center;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.hello h1 {
|
|
9
|
-
font-family: 'Gochi Hand', cursive;
|
|
10
|
-
color: #0167b8;
|
|
11
|
-
letter-spacing: 0;
|
|
12
|
-
font-size: 4em;
|
|
13
|
-
text-transform: none;
|
|
4
|
+
body{
|
|
14
5
|
}
|
|
15
6
|
|
|
16
7
|
.nodefony{
|
|
@@ -25,6 +16,14 @@
|
|
|
25
16
|
font-size: 4em;
|
|
26
17
|
text-transform: none;
|
|
27
18
|
}
|
|
19
|
+
.nodefony h3 {
|
|
20
|
+
text-align: center;
|
|
21
|
+
font-family: 'Gochi Hand', cursive;
|
|
22
|
+
color: #0167b8;
|
|
23
|
+
letter-spacing: 0;
|
|
24
|
+
font-size: 1.2em;
|
|
25
|
+
text-transform: none;
|
|
26
|
+
}
|
|
28
27
|
|
|
29
28
|
pre {
|
|
30
29
|
display: block;
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
SwaggerUIStandalonePreset
|
|
5
5
|
} from "swagger-ui-dist";
|
|
6
6
|
|
|
7
|
-
import "swagger-ui/dist/swagger-ui.css";
|
|
7
|
+
import "@modules/swagger-ui/dist/swagger-ui.css";
|
|
8
8
|
import "./swagger.css";
|
|
9
9
|
|
|
10
10
|
const configSwagger = process.env.SWAGGER;
|
|
@@ -26,6 +26,11 @@ class Swagger {
|
|
|
26
26
|
// Section 02 - Set logo
|
|
27
27
|
logo[0].children[0].alt = this.config.projectName;
|
|
28
28
|
logo[0].children[0].src = this.config.logo;
|
|
29
|
+
|
|
30
|
+
const newDiv = document.createElement("div");
|
|
31
|
+
const newContent = document.createTextNode(this.config.projectName);
|
|
32
|
+
newDiv.appendChild(newContent);
|
|
33
|
+
logo[0].append(newDiv)
|
|
29
34
|
});
|
|
30
35
|
});
|
|
31
36
|
}
|
|
@@ -36,14 +41,16 @@ class Swagger {
|
|
|
36
41
|
urls: this.config.urls,
|
|
37
42
|
"urls.primaryName": this.config.primaryName,
|
|
38
43
|
dom_id: '#swagger',
|
|
39
|
-
|
|
44
|
+
validatorUrl:"none",
|
|
45
|
+
defaultModelsExpandDepth: -1,
|
|
40
46
|
deepLinking: true,
|
|
47
|
+
persistAuthorization: true,
|
|
41
48
|
presets: [
|
|
42
49
|
SwaggerUI.presets.apis,
|
|
43
50
|
SwaggerUIStandalonePreset
|
|
44
51
|
],
|
|
45
52
|
plugins: [
|
|
46
|
-
SwaggerUIBundle.plugins.DownloadUrl
|
|
53
|
+
//SwaggerUIBundle.plugins.DownloadUrl
|
|
47
54
|
],
|
|
48
55
|
layout: "StandaloneLayout",
|
|
49
56
|
requestInterceptor: function (request) {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
security : Securité
|
|
4
4
|
login : Se Connecter
|
|
5
|
+
signin : Se Connecter
|
|
5
6
|
logout : Se Déconnecter
|
|
6
7
|
submit : Valider
|
|
7
8
|
surname : Nom
|
|
@@ -9,4 +10,5 @@ name : Prénom
|
|
|
9
10
|
username : Utilisateur
|
|
10
11
|
|
|
11
12
|
register : "S'enregistrer"
|
|
13
|
+
signup : "S'enregistrer"
|
|
12
14
|
update : Modifer
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<link rel="icon" type="image/x-icon" href="/app/favicon.ico"/>
|
|
13
13
|
{% endblock %}
|
|
14
14
|
{% block description %}
|
|
15
|
-
<meta name="description" content="Node.js full-stack web framework
|
|
15
|
+
<meta name="description" content="Node.js full-stack web framework">
|
|
16
16
|
{% endblock %}
|
|
17
17
|
<title>
|
|
18
18
|
{% block title %}{{nodefony.name|escape}}{% endblock %}
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
{% endblock %}
|
|
29
29
|
{% block body %}{% endblock %}
|
|
30
30
|
{% block footer %}
|
|
31
|
-
{{ render( controller("documentation:documentation:footer" )) }}
|
|
32
31
|
{% endblock %}
|
|
33
32
|
{% block javascripts %}
|
|
34
33
|
<!-- WEBPACK BUNDLE -->
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
<!-- Footer -->
|
|
2
|
-
<footer class="
|
|
3
|
-
|
|
4
|
-
<div class="text-center py-3">
|
|
2
|
+
<footer class="footer mt-auto py-3 bg-light fixed-bottom">
|
|
3
|
+
<div class="container">
|
|
5
4
|
<a href="https://github.com/nodefony">{{year|escape}} powered by: nodefony@{{nodefony.version}}</a>
|
|
6
5
|
</div>
|
|
7
|
-
<!-- Copyright -->
|
|
8
6
|
</footer>
|
|
9
7
|
<!-- Footer -->
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
{% extends '../base.html.twig' %}
|
|
2
|
-
|
|
1
|
+
{% extends '../documentation/base.html.twig' %}
|
|
3
2
|
|
|
4
3
|
{% block title %}{{title|escape}}{% endblock %}
|
|
5
4
|
|
|
6
5
|
{% block stylesheets %}
|
|
7
6
|
<!-- WEBPACK BUNDLE -->
|
|
8
|
-
<link rel="stylesheet" href="/documentation-bundle/assets/css/documentation.css"/>
|
|
9
7
|
<link rel='stylesheet' href='{{CDN("stylesheet")}}/users-bundle/assets/css/graphiql.css'/>
|
|
8
|
+
{{ parent() }}
|
|
10
9
|
<style>
|
|
11
10
|
body {
|
|
12
11
|
padding: 0;
|
|
@@ -21,14 +20,10 @@
|
|
|
21
20
|
|
|
22
21
|
{% block body %}
|
|
23
22
|
|
|
24
|
-
{% block header %}
|
|
25
|
-
{{ render( controller("users:users:header" )) }}
|
|
26
|
-
{% endblock %}
|
|
27
|
-
|
|
28
23
|
<div class="container-fluid">
|
|
29
24
|
<div class="row flex-xl-nowrap">
|
|
30
25
|
{% include '../documentation/navbar.html.twig' %}
|
|
31
|
-
<main class="col-12 col-md-9 col-xl-
|
|
26
|
+
<main class="col-12 col-md-9 col-xl-10" style="top: 2px;">
|
|
32
27
|
<div id="graphiql"></div>
|
|
33
28
|
</main>
|
|
34
29
|
</div>
|
|
@@ -40,6 +35,6 @@
|
|
|
40
35
|
|
|
41
36
|
<!-- WEBPACK BUNDLE -->
|
|
42
37
|
<script src='{{CDN("javascript")}}/users-bundle/assets/js/graphiql.js'></script>
|
|
43
|
-
|
|
38
|
+
{{ parent() }}
|
|
44
39
|
|
|
45
40
|
{% endblock %}
|
|
@@ -1,29 +1,22 @@
|
|
|
1
1
|
{% set user = getUser() %}
|
|
2
2
|
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
<span class="navbar-toggler-icon"></span>
|
|
7
|
-
</button>
|
|
8
|
-
<a class="navbar-brand mr-5" href="/">
|
|
3
|
+
<div class="container-fluid">
|
|
4
|
+
<header class="d-flex flex-wrap align-items-center justify-content-center justify-content-md-between py-3 mb-4 border-bottom">
|
|
5
|
+
<a href="/" class="d-flex align-items-center col-md-3 mb-2 mb-md-0 text-dark text-decoration-none">
|
|
9
6
|
<img src="/app/images/app-logo.png" width="30" height="30" class="d-inline-block align-top" alt="">
|
|
10
|
-
<span class="
|
|
7
|
+
<span style="color:#0167b8" class="fs-4 nodefony"><h3>{{nodefony.name|escape}}</h3></span>
|
|
11
8
|
</a>
|
|
12
|
-
<div class="collapse navbar-collapse" id="header_nodefony">
|
|
13
|
-
<ul class="navbar-nav me-auto ">
|
|
14
|
-
{% if urlDoc %}
|
|
15
|
-
<li class="nav-item">
|
|
16
|
-
<form class="form-inline" action="{{urlDoc}}">
|
|
17
|
-
<button class="btn btn-sm btn-outline-secondary" type="submit">Documentation</button>
|
|
18
|
-
</form>
|
|
19
|
-
</li>
|
|
20
|
-
{% endif %}
|
|
21
|
-
</ul>
|
|
22
9
|
|
|
23
|
-
|
|
10
|
+
<ul class="nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0">
|
|
11
|
+
{% if urlDoc %}
|
|
12
|
+
<li><a href="{{urlDoc}}" class="btn btn-outline-secondary px-2">Documentation</a></li>
|
|
13
|
+
{% endif %}
|
|
14
|
+
</ul>
|
|
15
|
+
|
|
16
|
+
<form action="{{url('lang')}}" name="formLang" id="formLang" class="col-12 col-lg-auto mb-3 mb-lg-0 me-lg-3">
|
|
17
|
+
<ul class="nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0">
|
|
24
18
|
<li class="nav-item">
|
|
25
|
-
|
|
26
|
-
<div class="input-group input-group-sm" style="top:5px;margin-right:5px">
|
|
19
|
+
<div class="input-group input-group-sm">
|
|
27
20
|
<label class="input-group-text">{{"lang"| trans("messages") }} : </label>
|
|
28
21
|
<select class="form-select form-select-sm " name="language" id="language">
|
|
29
22
|
{% for opt in langs %}
|
|
@@ -38,56 +31,60 @@
|
|
|
38
31
|
{% endfor %}
|
|
39
32
|
</select>
|
|
40
33
|
</div>
|
|
41
|
-
</form>
|
|
42
34
|
</li>
|
|
43
|
-
|
|
44
|
-
|
|
35
|
+
</ul>
|
|
36
|
+
</form>
|
|
37
|
+
|
|
38
|
+
{% if user %}
|
|
39
|
+
<div class="dropdown text-end">
|
|
40
|
+
<a href="#" class="d-block link-dark text-decoration-none dropdown-toggle" id="dropdownUser1" data-bs-toggle="dropdown" aria-expanded="false">
|
|
45
41
|
{% if user.image %}
|
|
46
|
-
<img
|
|
42
|
+
<img src="https://github.com/mdo.png" alt="mdo" width="32" height="32" class="rounded-circle">
|
|
43
|
+
{% else %}
|
|
44
|
+
<i class="text-large fa fa-user"></i>
|
|
47
45
|
{% endif %}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
{% else %}
|
|
65
|
-
<img width="100px" height="100px" src="/framework-bundle/images/nodefony-logo.png" alt="nodefony-logo"></img>
|
|
66
|
-
{% endif %}
|
|
67
|
-
<div class="user-info">
|
|
68
|
-
<p>{{"username"|trans("login")}} : {{ user.username|escape }}</p>
|
|
69
|
-
<p>{{"surname"|trans("login")}} : <i> {{ user.surname|escape }} </i> </p>
|
|
70
|
-
<p>{{"name"|trans("login")}} : <i> {{ user.name|escape }} </i> </p>
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
<div class="card-footer text-muted">
|
|
74
|
-
<a href ="{{url("logout")}}" class="card-link">{{"logout"|trans("login")}}</a>
|
|
75
|
-
<a href ="{{url("nodefony-user-update",{username:user.username})}}" class="card-link">{{"update"|trans("login")}}</a>
|
|
76
|
-
</div>
|
|
46
|
+
</a>
|
|
47
|
+
<ul class="dropdown-menu text-small border-0" aria-labelledby="dropdownUser1">
|
|
48
|
+
<div class="card " style="width: 18rem;height:100%">
|
|
49
|
+
<div class="card-header">
|
|
50
|
+
<h5 class="card-title">Profile</h5>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="card-body text-center" >
|
|
53
|
+
{% if user.image %}
|
|
54
|
+
<img width="100px" height="100px"src="{{ user.image|escape }}" alt=""></img>
|
|
55
|
+
{% else %}
|
|
56
|
+
<img width="100px" height="100px" src="/framework-bundle/images/nodefony-logo.png" alt="nodefony-logo"></img>
|
|
57
|
+
{% endif %}
|
|
58
|
+
<div class="user-info">
|
|
59
|
+
<p>{{"username"|trans("login")}} : {{ user.username|escape }}</p>
|
|
60
|
+
<p>{{"surname"|trans("login")}} : <i> {{ user.surname|escape }} </i> </p>
|
|
61
|
+
<p>{{"name"|trans("login")}} : <i> {{ user.name|escape }} </i> </p>
|
|
77
62
|
</div>
|
|
78
63
|
</div>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
class="btn btn-sm btn-outline-secondary"
|
|
85
|
-
role="button"
|
|
86
|
-
aria-pressed="false">
|
|
87
|
-
{{"login"|trans("login")}}
|
|
88
|
-
</a>
|
|
89
|
-
{% endif %}
|
|
64
|
+
<div class="card-footer text-muted">
|
|
65
|
+
<a href ="{{url("logout")}}" class="card-link">{{"logout"|trans("login")}}</a>
|
|
66
|
+
<a href ="{{url("nodefony-user-update",{username:user.username})}}" class="card-link">{{"update"|trans("login")}}</a>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
90
69
|
</ul>
|
|
91
70
|
</div>
|
|
92
|
-
|
|
93
|
-
|
|
71
|
+
{% else %}
|
|
72
|
+
|
|
73
|
+
<div class=" text-end">
|
|
74
|
+
<a href="{{url("login",{type:"secure"})}}"
|
|
75
|
+
class="btn btn-sm btn-outline-secondary"
|
|
76
|
+
role="button"
|
|
77
|
+
aria-pressed="false">
|
|
78
|
+
{{trans("signin")}}
|
|
79
|
+
</a>
|
|
80
|
+
<a href="{{url("nodefony-user-create")}}"
|
|
81
|
+
class="btn btn-sm btn-outline-primary"
|
|
82
|
+
role="button"
|
|
83
|
+
aria-pressed="false">
|
|
84
|
+
{{trans("signup")}}
|
|
85
|
+
</a>
|
|
86
|
+
|
|
87
|
+
</div>
|
|
88
|
+
{% endif %}
|
|
89
|
+
</header>
|
|
90
|
+
</div>
|
|
@@ -1,36 +1,28 @@
|
|
|
1
|
-
{% extends '../base.html.twig' %}
|
|
1
|
+
{% extends '../documentation/base.html.twig' %}
|
|
2
2
|
|
|
3
3
|
{% block title %}{{title|escape}}{% endblock %}
|
|
4
4
|
|
|
5
5
|
{% block stylesheets %}
|
|
6
6
|
<!-- WEBPACK BUNDLE -->
|
|
7
7
|
<link rel='stylesheet' href='{{CDN("stylesheet")}}/users-bundle/assets/css/swagger.css'/>
|
|
8
|
-
|
|
8
|
+
{{ parent() }}
|
|
9
9
|
{% endblock %}
|
|
10
10
|
|
|
11
11
|
{% block body %}
|
|
12
12
|
|
|
13
|
-
{% block header %}
|
|
14
|
-
{{ render( controller("users:users:header" )) }}
|
|
15
|
-
{% endblock %}
|
|
16
|
-
|
|
17
13
|
<div class="container-fluid">
|
|
18
14
|
<div class="row flex-xl-nowrap">
|
|
19
15
|
{% include '../documentation/navbar.html.twig' %}
|
|
20
|
-
<main class="col-12 col-md-9 col-xl-
|
|
16
|
+
<main class="col-12 col-md-9 col-xl-10" style="top:2px">
|
|
21
17
|
<div id="swagger"></div>
|
|
22
18
|
</main>
|
|
23
19
|
</div>
|
|
24
20
|
</div>
|
|
25
21
|
|
|
26
|
-
{% block footer %}
|
|
27
|
-
{{ render( controller("users:users:footer" )) }}
|
|
28
22
|
{% endblock %}
|
|
29
23
|
|
|
30
24
|
{% block javascripts %}
|
|
31
25
|
<!-- WEBPACK BUNDLE -->
|
|
32
26
|
<script src='{{CDN("javascript")}}/users-bundle/assets/js/swagger.js'></script>
|
|
33
|
-
|
|
34
|
-
{% endblock %}
|
|
35
|
-
|
|
27
|
+
{{ parent() }}
|
|
36
28
|
{% endblock %}
|