diff --git a/.env b/.env index dc4fb09..f25add0 100644 --- a/.env +++ b/.env @@ -15,5 +15,5 @@ APP_SECRET=d28750a79bbdda939b77d930e53a3ae2 # Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url # For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db" # Configure your db driver and server_version in config/packages/doctrine.yaml -DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name +DATABASE_URL=mysql://admin:admin@127.0.0.1:3306/testing-platform ###< doctrine/doctrine-bundle ### diff --git a/.gitignore b/.gitignore index b6291f1..82333d9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ - +.idea/ +/uploads/photos/ ###> symfony/framework-bundle ### /.env.local /.env.*.local @@ -6,3 +7,7 @@ /var/ /vendor/ ###< symfony/framework-bundle ### + +###> symfony/web-server-bundle ### +/.web-server-pid +###< symfony/web-server-bundle ### diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..28a804d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..e7271a3 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml new file mode 100644 index 0000000..acec127 --- /dev/null +++ b/.idea/php.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/testing-platform.iml b/.idea/testing-platform.iml new file mode 100644 index 0000000..aa3f9c4 --- /dev/null +++ b/.idea/testing-platform.iml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..fc78fb0 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,804 @@ + + + + + + + $PROJECT_DIR$/composer.json + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + make + doct + orm + /tmp/phpPtmuq1 + tmp + getTargetDirectory + getTarget + EXCEPTION + $targetDir + role + 'id' + 4 + photos_directory + resolver + User + local + + + + + + $PROJECT_DIR$/vendor/twig + $PROJECT_DIR$ + $PROJECT_DIR$/public + + + + + + + + + + + true + DEFINITION_ORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/user/_form.html.twig b/templates/user/_form.html.twig new file mode 100644 index 0000000..bf20b98 --- /dev/null +++ b/templates/user/_form.html.twig @@ -0,0 +1,4 @@ +{{ form_start(form) }} + {{ form_widget(form) }} + +{{ form_end(form) }} diff --git a/templates/user/edit.html.twig b/templates/user/edit.html.twig new file mode 100644 index 0000000..dd2e212 --- /dev/null +++ b/templates/user/edit.html.twig @@ -0,0 +1,13 @@ +{% extends 'base.html.twig' %} + +{% block title %}Edit User{% endblock %} + +{% block body %} +

Edit User

+ + {{ include('user/_form.html.twig', {'button_label': 'Update'}) }} + + back to list + + {{ include('user/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/user/index.html.twig b/templates/user/index.html.twig new file mode 100644 index 0000000..bb32802 --- /dev/null +++ b/templates/user/index.html.twig @@ -0,0 +1,45 @@ +{% extends 'base.html.twig' %} + +{% block title %}User index{% endblock %} + +{% block body %} +

User index

+ + + + + + + + + + + + + + + + {% for user in users %} + + + + + + + + + + + {% else %} + + + + {% endfor %} + +
IdNameSecondNameEmailPasswordPhonePhotoactions
{{ user.id }}{{ user.name }}{{ user.secondName }}{{ user.email }}{{ user.password }}{{ user.phone }}{{ user.photo }} + show + edit +
no records found
+ + Create new +{% endblock %} diff --git a/templates/user/new.html.twig b/templates/user/new.html.twig new file mode 100644 index 0000000..24bba94 --- /dev/null +++ b/templates/user/new.html.twig @@ -0,0 +1,11 @@ +{% extends 'base.html.twig' %} + +{% block title %}New User{% endblock %} + +{% block body %} +

Create new User

+ + {{ include('user/_form.html.twig') }} + + back to list +{% endblock %} diff --git a/templates/user/registration.html.twig b/templates/user/registration.html.twig new file mode 100644 index 0000000..21e5722 --- /dev/null +++ b/templates/user/registration.html.twig @@ -0,0 +1,32 @@ + +{% extends 'base.html.twig' %} + +{% block body %} + + +
+

registration

+ {{ form_start(form) }} + {{ form_end(form) }} + {#{{ form_row(form.name) }}#} + {#{{ form_row(form.secondName) }}#} + {#{{ form_row(form.email) }}#} + {#{{ form_row(form.password) }}#} + {#{{ form_row(form.phone) }}#} + {#{{ form_row(form.photo) }}#} + {#{{ form_row(form.role) }}#} + {#{{ form_row(form.save) }}#} +
+
+ + + + + + + +{% endblock %} + + + + diff --git a/templates/user/show.html.twig b/templates/user/show.html.twig new file mode 100644 index 0000000..e08dbb4 --- /dev/null +++ b/templates/user/show.html.twig @@ -0,0 +1,48 @@ +{% extends 'base.html.twig' %} + +{% block title %}User{% endblock %} + +{% block body %} +

User

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Id{{ user.id }}
Name{{ user.name }}
SecondName{{ user.secondName }}
Email{{ user.email }}
Password{{ user.password }}
Phone{{ user.phone }}
Photo + Symfony! +
+ + back to list + + edit + + {{ include('user/_delete_form.html.twig') }} +{% endblock %} diff --git a/templates/userList/list.html.twig b/templates/userList/list.html.twig new file mode 100644 index 0000000..1be10fa --- /dev/null +++ b/templates/userList/list.html.twig @@ -0,0 +1,59 @@ + +{% extends 'base.html.twig' %} + +{% block body %} + + +
+
+ register + or + log in +
+ +

Users List

+ + + + + + + + + + {% for user in users %} + + + + + + + {##} + + + {% endfor %} +
idnamesecond nameemailphoneactions
+ {{ user.id }} + + {{ user.name }} + + {{ user.secondName }} + + {{ user.email }} + + {{ user.phone }} + #} + {#{{ user.role }}#} + {# + + {##} + + + +
+
+{% endblock %} + + + +