diff --git a/app/bootstrap.php b/app/bootstrap.php index 8b9d1571..eaec9c1d 100644 --- a/app/bootstrap.php +++ b/app/bootstrap.php @@ -74,7 +74,7 @@ return function(array $config_array = []) { // Miscellaneous helper methods $anime_client = new AnimeClient(); $anime_client->setContainer($container); - $container->set('anime_client', $anime_client); + $container->set('anime-client', $anime_client); // Models $container->set('api-model', new Model\API($container)); diff --git a/app/config/minify_js_groups.php b/app/config/minify_js_groups.php index e39a7af3..f1f1c932 100644 --- a/app/config/minify_js_groups.php +++ b/app/config/minify_js_groups.php @@ -36,6 +36,14 @@ return [ 'anime_edit.js', 'manga_edit.js' ], + 'table_edit' => [ + 'lib/jquery.min.js', + 'lib/table_sorter/jquery.tablesorter.min.js', + 'sort_tables.js', + 'show_message.js', + 'anime_edit.js', + 'manga_edit.js' + ], 'anime_collection' => [ 'lib/jquery.min.js', 'lib/jquery.throttle-debounce.js', diff --git a/app/config/routes.php b/app/config/routes.php index d75c8b4e..9118ee45 100644 --- a/app/config/routes.php +++ b/app/config/routes.php @@ -18,18 +18,22 @@ return [ 'default_method' => 'index', '404_method' => 'not_found' ], - // Routes on all controllers - 'common' => [ - 'update' => [ - 'path' => '/{controller}/update', - 'action' => 'update', - 'verb' => 'post', - 'tokens' => [ - 'controller' => '[a-z_]+' - ] - ], - ], // Routes on anime collection controller + 'anime' => [ + 'anime_add_form' => [ + 'path' => '/anime/add', + 'action' => 'add_form', + 'verb' => 'get' + ], + 'anime_add' => [ + 'path' => '/anime/add', + 'action' => 'add', + 'verb' => 'post' + ] + ], + 'manga' => [ + + ], 'collection' => [ 'collection_search' => [ 'path' => '/collection/search', diff --git a/app/views/anime/add.php b/app/views/anime/add.php new file mode 100644 index 00000000..12e88ab3 --- /dev/null +++ b/app/views/anime/add.php @@ -0,0 +1,40 @@ +is_authenticated()): ?> +
+

Add Anime to your List

+
+
+ +
+
+
+
+ + + + + + + + + + + +
+ +
  + +
+
+
+ + + \ No newline at end of file diff --git a/app/views/anime/cover.php b/app/views/anime/cover.php index bcc216f1..c9fedca0 100644 --- a/app/views/anime/cover.php +++ b/app/views/anime/cover.php @@ -1,4 +1,7 @@
+is_authenticated()): ?> +Add Item +

There's nothing here!

@@ -7,18 +10,35 @@

html($name) ?>

+ is_authenticated()) continue; ?>
is_authenticated()): ?> - + img($item['anime']['image']); ?>
+ is_authenticated()): ?> +
+ + ">Edit + +
+ + +
+ + + + + +
+
Rating: / 10
Episodes: diff --git a/app/views/anime/edit.php b/app/views/anime/edit.php index fe128b54..3c44d7b3 100644 --- a/app/views/anime/edit.php +++ b/app/views/anime/edit.php @@ -1,8 +1,89 @@ - - +is_authenticated()): ?>
+

Edit Anime List Item

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

html($item['anime']['title']) ?>

+ +

html($item['anime']['alternate_title']) ?>

+ +
+
+ img($item['anime']['image']); ?> +
+
+ checked="checked" + /> +
+ +
+ / 10 +
+ + 0): ?> + / + +
+ checked="checked" + /> +
+ +
+ +
  + + + +
- - \ No newline at end of file + + \ No newline at end of file diff --git a/app/views/anime/list.php b/app/views/anime/list.php index e8b0343e..804fa490 100644 --- a/app/views/anime/list.php +++ b/app/views/anime/list.php @@ -1,4 +1,7 @@
+is_authenticated()): ?> +Add Item +

There's nothing here!

@@ -7,21 +10,31 @@ + is_authenticated()): ?> + + + + is_authenticated()) continue; ?> + is_authenticated()): ?> + + - + - - + + @@ -47,4 +70,5 @@ - \ No newline at end of file +is_authenticated()) ? 'table_edit' : 'table' ?> + diff --git a/app/views/collection/add.php b/app/views/collection/add.php index 3ff15a21..d8fb65f2 100644 --- a/app/views/collection/add.php +++ b/app/views/collection/add.php @@ -1,37 +1,43 @@ is_authenticated()): ?>
+

Add Anime to your Collection

-
-
Series
-
-
+
+
-
- -
-
- -
- -
-
- -
 
-
- -
-
+ +
+
  Title Airing Status Score Type Progress RatedAttributes Notes Genres
+ ">Edit + - + " . $item['anime']['alternate_title'] : "" ?> @@ -29,16 +42,26 @@ / 10 Episodes: / + Episodes:
+  /  +
-
    - - -
  • +
+ + + + + - + + +

html($item['notes']) ?>

+
+ +
+ + + + + + + + + + + + + + +
+ +
  + +
diff --git a/app/views/collection/cover.php b/app/views/collection/cover.php index bd154cf7..3dafcbf0 100644 --- a/app/views/collection/cover.php +++ b/app/views/collection/cover.php @@ -1,6 +1,6 @@
is_authenticated()): ?> -[Add Item] +Add Item

There's nothing here!

@@ -19,17 +19,17 @@
+ is_authenticated()): ?> +
+ ">Edit + ">Delete */ ?> +
+
Episodes:
- is_authenticated()): ?> -
- [">Edit] - [">Delete] -
-
diff --git a/app/views/collection/edit.php b/app/views/collection/edit.php index fd6bf1c6..8afecb81 100644 --- a/app/views/collection/edit.php +++ b/app/views/collection/edit.php @@ -1,30 +1,49 @@ is_authenticated()): ?>
+

Edit Anime Collection Item

-
-

-

- -
-
- -
- -
-
- -
 
-
- - - - -
-
+ + + + + + + + + + + + + + + + + + + + + +
+

html($item['title']) ?>

+ +

html($item['alternate_title']) ?>

+ +
+
+ img($item['cover_image']); ?> +
+
+ +
  + + + + +