-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mergered user_profiles branch to master branch
- Loading branch information
Showing
55 changed files
with
1,539 additions
and
291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace Application\Migrations; | ||
|
||
use Doctrine\DBAL\Migrations\AbstractMigration; | ||
use Doctrine\DBAL\Schema\Schema; | ||
|
||
/** | ||
* Auto-generated Migration: Please modify to your needs! | ||
*/ | ||
class Version20170201193521 extends AbstractMigration | ||
{ | ||
/** | ||
* @param Schema $schema | ||
*/ | ||
public function up(Schema $schema) | ||
{ | ||
// this up() migration is auto-generated, please modify it to your needs | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('ALTER TABLE artist CHANGE website website VARCHAR(255) DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE venue CHANGE website website VARCHAR(255) DEFAULT NULL'); | ||
} | ||
|
||
/** | ||
* @param Schema $schema | ||
*/ | ||
public function down(Schema $schema) | ||
{ | ||
// this down() migration is auto-generated, please modify it to your needs | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('ALTER TABLE artist CHANGE website website VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci'); | ||
$this->addSql('ALTER TABLE venue CHANGE website website VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace Application\Migrations; | ||
|
||
use Doctrine\DBAL\Migrations\AbstractMigration; | ||
use Doctrine\DBAL\Schema\Schema; | ||
|
||
/** | ||
* Auto-generated Migration: Please modify to your needs! | ||
*/ | ||
class Version20170203064353 extends AbstractMigration | ||
{ | ||
/** | ||
* @param Schema $schema | ||
*/ | ||
public function up(Schema $schema) | ||
{ | ||
// this up() migration is auto-generated, please modify it to your needs | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('ALTER TABLE artist ADD password VARCHAR(255) NOT NULL'); | ||
} | ||
|
||
/** | ||
* @param Schema $schema | ||
*/ | ||
public function down(Schema $schema) | ||
{ | ||
// this down() migration is auto-generated, please modify it to your needs | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('ALTER TABLE artist DROP password'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace Application\Migrations; | ||
|
||
use Doctrine\DBAL\Migrations\AbstractMigration; | ||
use Doctrine\DBAL\Schema\Schema; | ||
|
||
/** | ||
* Auto-generated Migration: Please modify to your needs! | ||
*/ | ||
class Version20170203071858 extends AbstractMigration | ||
{ | ||
/** | ||
* @param Schema $schema | ||
*/ | ||
public function up(Schema $schema) | ||
{ | ||
// this up() migration is auto-generated, please modify it to your needs | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('ALTER TABLE artist ADD created_at DATETIME NOT NULL, ADD roles LONGTEXT NOT NULL COMMENT \'(DC2Type:json_array)\', CHANGE password password VARCHAR(255) DEFAULT NULL'); | ||
$this->addSql('ALTER TABLE user CHANGE password password VARCHAR(255) DEFAULT NULL'); | ||
} | ||
|
||
/** | ||
* @param Schema $schema | ||
*/ | ||
public function down(Schema $schema) | ||
{ | ||
// this down() migration is auto-generated, please modify it to your needs | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('ALTER TABLE artist DROP created_at, DROP roles, CHANGE password password VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci'); | ||
$this->addSql('ALTER TABLE user CHANGE password password VARCHAR(255) NOT NULL COLLATE utf8_unicode_ci'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace Application\Migrations; | ||
|
||
use Doctrine\DBAL\Migrations\AbstractMigration; | ||
use Doctrine\DBAL\Schema\Schema; | ||
|
||
/** | ||
* Auto-generated Migration: Please modify to your needs! | ||
*/ | ||
class Version20170203084244 extends AbstractMigration | ||
{ | ||
/** | ||
* @param Schema $schema | ||
*/ | ||
public function up(Schema $schema) | ||
{ | ||
// this up() migration is auto-generated, please modify it to your needs | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('ALTER TABLE artist DROP password, DROP created_at, DROP roles'); | ||
$this->addSql('ALTER TABLE user CHANGE password password VARCHAR(255) NOT NULL'); | ||
} | ||
|
||
/** | ||
* @param Schema $schema | ||
*/ | ||
public function down(Schema $schema) | ||
{ | ||
// this down() migration is auto-generated, please modify it to your needs | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('ALTER TABLE artist ADD password VARCHAR(255) DEFAULT NULL COLLATE utf8_unicode_ci, ADD created_at DATETIME NOT NULL, ADD roles LONGTEXT NOT NULL COLLATE utf8_unicode_ci COMMENT \'(DC2Type:json_array)\''); | ||
$this->addSql('ALTER TABLE user CHANGE password password VARCHAR(255) DEFAULT NULL COLLATE utf8_unicode_ci'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
|
||
namespace Application\Migrations; | ||
|
||
use Doctrine\DBAL\Migrations\AbstractMigration; | ||
use Doctrine\DBAL\Schema\Schema; | ||
|
||
/** | ||
* Auto-generated Migration: Please modify to your needs! | ||
*/ | ||
class Version20170203095936 extends AbstractMigration | ||
{ | ||
/** | ||
* @param Schema $schema | ||
*/ | ||
public function up(Schema $schema) | ||
{ | ||
// this up() migration is auto-generated, please modify it to your needs | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('CREATE TABLE artist (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, bio LONGTEXT DEFAULT NULL, business_name VARCHAR(255) DEFAULT NULL, profile_image VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, website VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_1599687E7927C74 (email), UNIQUE INDEX UNIQ_1599687A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB'); | ||
$this->addSql('CREATE TABLE venue (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, bio LONGTEXT DEFAULT NULL, market_name VARCHAR(255) NOT NULL, market_subtitle VARCHAR(255) NOT NULL, profile_image VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, website VARCHAR(255) DEFAULT NULL, city VARCHAR(255) NOT NULL, state VARCHAR(255) NOT NULL, address1 VARCHAR(255) NOT NULL, address2 VARCHAR(255) NOT NULL, zip_code VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_91911B0DE7927C74 (email), UNIQUE INDEX UNIQ_91911B0DA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB'); | ||
$this->addSql('CREATE TABLE phone (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, phone VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_444F97DD444F97DD (phone), INDEX IDX_444F97DDA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB'); | ||
$this->addSql('CREATE TABLE urls (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, url VARCHAR(255) NOT NULL, type VARCHAR(255) NOT NULL, INDEX IDX_2A9437A1A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB'); | ||
$this->addSql('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, email VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, roles LONGTEXT NOT NULL COMMENT \'(DC2Type:json_array)\', created_at DATETIME NOT NULL, UNIQUE INDEX UNIQ_8D93D649E7927C74 (email), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB'); | ||
$this->addSql('ALTER TABLE artist ADD CONSTRAINT FK_1599687A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)'); | ||
$this->addSql('ALTER TABLE venue ADD CONSTRAINT FK_91911B0DA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)'); | ||
$this->addSql('ALTER TABLE phone ADD CONSTRAINT FK_444F97DDA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)'); | ||
$this->addSql('ALTER TABLE urls ADD CONSTRAINT FK_2A9437A1A76ED395 FOREIGN KEY (user_id) REFERENCES user (id)'); | ||
} | ||
|
||
/** | ||
* @param Schema $schema | ||
*/ | ||
public function down(Schema $schema) | ||
{ | ||
// this down() migration is auto-generated, please modify it to your needs | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('ALTER TABLE artist DROP FOREIGN KEY FK_1599687A76ED395'); | ||
$this->addSql('ALTER TABLE venue DROP FOREIGN KEY FK_91911B0DA76ED395'); | ||
$this->addSql('ALTER TABLE phone DROP FOREIGN KEY FK_444F97DDA76ED395'); | ||
$this->addSql('ALTER TABLE urls DROP FOREIGN KEY FK_2A9437A1A76ED395'); | ||
$this->addSql('DROP TABLE artist'); | ||
$this->addSql('DROP TABLE venue'); | ||
$this->addSql('DROP TABLE phone'); | ||
$this->addSql('DROP TABLE urls'); | ||
$this->addSql('DROP TABLE user'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,23 @@ | ||
{% extends 'base.html.twig' %} | ||
|
||
{% block body %} | ||
|
||
<footer> | ||
<footer> | ||
<ul> | ||
<li><p><a href="#">Terms of service</a></p></li> | ||
<li><p><a href="#">Content guidline</a></p></li> | ||
<li><p><a href="#">Privacy police</a></p></li> | ||
|
||
</footer> | ||
</ul> | ||
|
||
{% endblock %} | ||
<ul> | ||
<li><p><a href="#">Contact local art</a></p></li> | ||
<li><p><a href="#">Advertise with us</a></p></li> | ||
<li><p><a href="#">FAQ</a></p></li> | ||
</ul> | ||
|
||
<ul> | ||
<li><p><a href="{{ path('secure_login') }}">Log in</a></p></li> | ||
<li><p><a href="{{ path('venue_registration') }}">Venue sign up</a></p></li> | ||
<li><p><a href="{{ path('artist_registration') }}">Artist sign up</a></p></li> | ||
</ul> | ||
|
||
</footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,27 @@ | ||
{% extends 'base.html.twig' %} | ||
|
||
{% block body %} | ||
|
||
<header> | ||
|
||
</header> | ||
<a href="{{ path('home_page') }}" class="logo" >logo</a> | ||
{#<image class="logo" src="{{ asset('assets/local_art_logo_50x50.svg') }}" alt="Local Art logo" >#} | ||
<div> | ||
|
||
{% endblock %} | ||
<h1><a href="{{ path('home_page') }}">Local Art</a></h1> | ||
<p><a href="{{ path('home_page') }}">Find art where ever you are.</a></p> | ||
</div> | ||
|
||
{#login and register#} | ||
<ul> | ||
{% if is_granted('ROLE_USER') %} | ||
<li><p><a href="{{ path('logout') }}">Log out</a></p></li> | ||
{% else %} | ||
<li><p><a href="{{ path('secure_login') }}">Log in</a></p></li> | ||
<li> | ||
<p><a href="#" class="sign_up">Sign up</a></p> | ||
{#<ul>#} | ||
{#<li><p><a href="{{ path('venue_registration') }}">Venue sign up</a></p></li>#} | ||
{#<li><p><a href="{{ path('artist_registration') }}">Artist sign up</a></p></li>#} | ||
{#</ul>#} | ||
</li> | ||
{% endif %} | ||
</ul> | ||
</header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
{% extends 'base.html.twig' %} | ||
|
||
{% block body %} | ||
<main> | ||
{# give different users a different message #} | ||
{% if is_granted('ROLE_ARTIST') %} | ||
<div> | ||
{% for msg in app.session.flashBag.get('artistRegistered') %} | ||
<h2>{{ msg }}</h2> | ||
{% endfor %} | ||
</div> | ||
|
||
{# give different users a different message #} | ||
{% if is_granted('ROLE_ARTIST') %} | ||
<div> | ||
{% for msg in app.session.flashBag.get('artistRegistered') %} | ||
<h2>{{ msg }}</h2> | ||
{% endfor %} | ||
</div> | ||
{% elseif is_granted('ROLE_VENUE') %} | ||
|
||
{% elseif is_granted('ROLE_VENUE') %} | ||
<div> | ||
{% for msg in app.session.flashBag.get('venueRegistered') %} | ||
<h2>{{ msg }}</h2> | ||
{% endfor %} | ||
</div> | ||
{% endif %} | ||
|
||
<div> | ||
{% for msg in app.session.flashBag.get('venueRegistered') %} | ||
<h2>{{ msg }}</h2> | ||
{% endfor %} | ||
</div> | ||
{% endif %} | ||
|
||
<h1>Home page</h1> | ||
|
||
{% endblock %} | ||
<h1>Home page</h1> | ||
</main> | ||
{% endblock %} |
Oops, something went wrong.