aboutsummaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2017-05-31 09:31:18 +0200
committerThomas Citharel <tcit@tcit.fr>2017-06-23 10:08:54 +0200
commitbf6c0346d8d35a719dd1bff1cb4d573d422f99ff (patch)
tree04fb80e20ad1cffacb72357a632a9afe2ec058cb /app
parentd6d3f4ec3698effd1d4b063e295341791bdcf7d7 (diff)
downloadwallabag-federation.tar.gz
wallabag-federation.tar.zst
wallabag-federation.zip
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'app')
-rw-r--r--app/AppKernel.php3
-rw-r--r--app/DoctrineMigrations/Version20170328185535.php99
-rw-r--r--app/Resources/static/themes/material/css/index.scss1
-rwxr-xr-xapp/Resources/static/themes/material/css/layout.scss6
-rw-r--r--app/Resources/static/themes/material/css/profile.scss54
-rw-r--r--app/config/config.yml3
-rw-r--r--app/config/parameters.yml.dist3
-rw-r--r--app/config/routing.yml5
-rw-r--r--app/config/security.yml1
9 files changed, 173 insertions, 2 deletions
diff --git a/app/AppKernel.php b/app/AppKernel.php
index c50783a6..c5109866 100644
--- a/app/AppKernel.php
+++ b/app/AppKernel.php
@@ -32,6 +32,7 @@ class AppKernel extends Kernel
32 new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(), 32 new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
33 new FOS\JsRoutingBundle\FOSJsRoutingBundle(), 33 new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
34 new BD\GuzzleSiteAuthenticatorBundle\BDGuzzleSiteAuthenticatorBundle(), 34 new BD\GuzzleSiteAuthenticatorBundle\BDGuzzleSiteAuthenticatorBundle(),
35 new OldSound\RabbitMqBundle\OldSoundRabbitMqBundle(),
35 36
36 // wallabag bundles 37 // wallabag bundles
37 new Wallabag\CoreBundle\WallabagCoreBundle(), 38 new Wallabag\CoreBundle\WallabagCoreBundle(),
@@ -39,7 +40,7 @@ class AppKernel extends Kernel
39 new Wallabag\UserBundle\WallabagUserBundle(), 40 new Wallabag\UserBundle\WallabagUserBundle(),
40 new Wallabag\ImportBundle\WallabagImportBundle(), 41 new Wallabag\ImportBundle\WallabagImportBundle(),
41 new Wallabag\AnnotationBundle\WallabagAnnotationBundle(), 42 new Wallabag\AnnotationBundle\WallabagAnnotationBundle(),
42 new OldSound\RabbitMqBundle\OldSoundRabbitMqBundle(), 43 new Wallabag\FederationBundle\WallabagFederationBundle(),
43 ]; 44 ];
44 45
45 if (in_array($this->getEnvironment(), ['dev', 'test'], true)) { 46 if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
diff --git a/app/DoctrineMigrations/Version20170328185535.php b/app/DoctrineMigrations/Version20170328185535.php
new file mode 100644
index 00000000..f0afb7b9
--- /dev/null
+++ b/app/DoctrineMigrations/Version20170328185535.php
@@ -0,0 +1,99 @@
1<?php
2
3namespace Application\Migrations;
4
5use Doctrine\DBAL\Migrations\AbstractMigration;
6use Doctrine\DBAL\Schema\Schema;
7use Doctrine\DBAL\Schema\SchemaException;
8use Symfony\Component\DependencyInjection\ContainerAwareInterface;
9use Symfony\Component\DependencyInjection\ContainerInterface;
10use Doctrine\DBAL\Migrations\SkipMigrationException;
11
12/**
13 * Creates the Change table.
14 */
15class Version20170328185535 extends AbstractMigration implements ContainerAwareInterface
16{
17 /**
18 * @var ContainerInterface
19 */
20 private $container;
21
22 public function setContainer(ContainerInterface $container = null)
23 {
24 $this->container = $container;
25 }
26
27 private function getTable($tableName)
28 {
29 return $this->container->getParameter('database_table_prefix').$tableName;
30 }
31
32 /**
33 * @param Schema $schema
34 */
35 public function up(Schema $schema)
36 {
37 try {
38 $schema->getTable($this->getTable('change'));
39 } catch (SchemaException $e) {
40 // The Change table doesn't exist, we need to create it
41 if (10 == $e->getCode()) {
42 if ($this->connection->getDatabasePlatform()->getName() == 'sqlite') {
43 $this->addSql('CREATE TABLE '.$this->getTable('change').' (id INTEGER NOT NULL, entry_id INTEGER DEFAULT NULL, type INTEGER NOT NULL, created_at DATETIME NOT NULL, PRIMARY KEY(id), CONSTRAINT FK_133B9D0FBA364942 FOREIGN KEY (entry_id) REFERENCES '.$this->getTable('entry').' (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
44
45 return true;
46 }
47
48 $changeTable = $schema->createTable($this->getTable('change'));
49 $changeTable->addColumn(
50 'id',
51 'integer',
52 ['autoincrement' => true]
53 );
54 $changeTable->addColumn(
55 'type',
56 'integer',
57 ['notnull' => false]
58 );
59 $changeTable->addColumn(
60 'created_at',
61 'datetime',
62 ['notnull' => false]
63 );
64 $changeTable->addColumn(
65 'entry_id',
66 'integer',
67 ['notnull' => false]
68 );
69
70 $changeTable->setPrimaryKey(['id']);
71
72 $changeTable->addForeignKeyConstraint(
73 $this->getTable('entry'),
74 ['entry_id'],
75 ['id'],
76 ['onDelete' => 'CASCADE'],
77 'IDX_change_entry'
78 );
79
80 return true;
81 }
82 }
83
84 throw new SkipMigrationException('It seems that you already played this migration.');
85 }
86
87 /**
88 * @param Schema $schema
89 */
90 public function down(Schema $schema)
91 {
92 try {
93 $changeTable = $schema->getTable($this->getTable('change'));
94 $schema->dropTable($changeTable->getName());
95 } catch (SchemaException $e) {
96 throw new SkipMigrationException('It seems that you already played this migration.');
97 }
98 }
99}
diff --git a/app/Resources/static/themes/material/css/index.scss b/app/Resources/static/themes/material/css/index.scss
index 8300e430..a360b99b 100644
--- a/app/Resources/static/themes/material/css/index.scss
+++ b/app/Resources/static/themes/material/css/index.scss
@@ -9,6 +9,7 @@
9@import 'nav'; 9@import 'nav';
10@import 'sidenav'; 10@import 'sidenav';
11@import 'notifications'; 11@import 'notifications';
12@import 'profile';
12@import 'various'; 13@import 'various';
13 14
14/* Tools */ 15/* Tools */
diff --git a/app/Resources/static/themes/material/css/layout.scss b/app/Resources/static/themes/material/css/layout.scss
index cfdbf2b3..6fd14335 100755
--- a/app/Resources/static/themes/material/css/layout.scss
+++ b/app/Resources/static/themes/material/css/layout.scss
@@ -18,6 +18,12 @@ body {
18 border-bottom: 1px solid #ddd; 18 border-bottom: 1px solid #ddd;
19} 19}
20 20
21nav,
22body:not(.reset-left) main,
23footer {
24 padding-left: 240px;
25}
26
21main, 27main,
22#content, 28#content,
23.valign-wrapper { 29.valign-wrapper {
diff --git a/app/Resources/static/themes/material/css/profile.scss b/app/Resources/static/themes/material/css/profile.scss
new file mode 100644
index 00000000..d5b9a5ff
--- /dev/null
+++ b/app/Resources/static/themes/material/css/profile.scss
@@ -0,0 +1,54 @@
1.profile {
2 .details {
3 display: flex;
4 flex-direction: row;
5
6 .bio {
7 flex: 1;
8 font-size: 14px;
9 line-height: 18px;
10 padding: 5px 10px;
11 order: 1;
12
13 p {
14 font-size: 14px;
15 font-weight: 400;
16 overflow: hidden;
17 word-break: normal;
18 word-wrap: break-word;
19 }
20 }
21
22 .details-counters {
23 order: 0;
24 display: flex;
25 flex-direction: row;
26 }
27
28 .counter {
29 width: 80px;
30 color: #9baec8;
31 padding: 5px 10px 0;
32 margin-bottom: 10px;
33 border-right: 1px solid #9baec8;
34 cursor: default;
35 position: relative;
36
37 .counter-label {
38 font-size: 12px;
39 text-transform: uppercase;
40 display: block;
41 margin-bottom: 5px;
42 }
43
44 .counter-number {
45 font-weight: 500;
46 font-size: 18px;
47 color: #00bcd4;
48 }
49 }
50 }
51 img.avatar {
52 width: 10em;
53 }
54}
diff --git a/app/config/config.yml b/app/config/config.yml
index 2bc5e3b3..4a935dfb 100644
--- a/app/config/config.yml
+++ b/app/config/config.yml
@@ -6,8 +6,9 @@ imports:
6 6
7parameters: 7parameters:
8 # Allows to use the live reload feature for changes in assets 8 # Allows to use the live reload feature for changes in assets
9 use_webpack_dev_server: false 9 use_webpack_dev_server: true
10 craue_config.cache_adapter.class: Craue\ConfigBundle\CacheAdapter\SymfonyCacheComponentAdapter 10 craue_config.cache_adapter.class: Craue\ConfigBundle\CacheAdapter\SymfonyCacheComponentAdapter
11 media_directory: '%kernel.root_dir%/../web/uploads/media'
11 12
12framework: 13framework:
13 #esi: ~ 14 #esi: ~
diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist
index b3fe11c8..d342c72a 100644
--- a/app/config/parameters.yml.dist
+++ b/app/config/parameters.yml.dist
@@ -25,6 +25,9 @@ parameters:
25 25
26 domain_name: https://your-wallabag-url-instance.com 26 domain_name: https://your-wallabag-url-instance.com
27 27
28 # Instance URL
29 domain_name: wallabag.tld
30
28 mailer_transport: smtp 31 mailer_transport: smtp
29 mailer_host: 127.0.0.1 32 mailer_host: 127.0.0.1
30 mailer_user: ~ 33 mailer_user: ~
diff --git a/app/config/routing.yml b/app/config/routing.yml
index 0bd2d130..f1bbbda9 100644
--- a/app/config/routing.yml
+++ b/app/config/routing.yml
@@ -17,6 +17,11 @@ wallabag_api:
17 type: annotation 17 type: annotation
18 prefix: / 18 prefix: /
19 19
20wallabag_federation:
21 resource: "@WallabagFederationBundle/Controller/"
22 type: annotation
23 prefix: /
24
20app: 25app:
21 resource: "@WallabagCoreBundle/Controller/" 26 resource: "@WallabagCoreBundle/Controller/"
22 type: annotation 27 type: annotation
diff --git a/app/config/security.yml b/app/config/security.yml
index e14a0bd1..a8a0a6ae 100644
--- a/app/config/security.yml
+++ b/app/config/security.yml
@@ -66,4 +66,5 @@ security:
66 - { path: ^/settings, roles: ROLE_SUPER_ADMIN } 66 - { path: ^/settings, roles: ROLE_SUPER_ADMIN }
67 - { path: ^/annotations, roles: ROLE_USER } 67 - { path: ^/annotations, roles: ROLE_USER }
68 - { path: ^/users, roles: ROLE_SUPER_ADMIN } 68 - { path: ^/users, roles: ROLE_SUPER_ADMIN }
69 - { path: ^/profile, roles: IS_AUTHENTICATED_ANONYMOUSLY }
69 - { path: ^/, roles: ROLE_USER } 70 - { path: ^/, roles: ROLE_USER }