From 9632f05c2c422b7c4cf9c85eacd0fd4e2cf25946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20LEUILLIOT?= Date: Sat, 12 Dec 2020 17:46:57 +0100 Subject: [PATCH] refactor: remove bookmarks feature since there are no longer ways to collect bookmarks and esi seems frozen for now, remove bookmark feature and its dependencies. Closes eveseat/seat#695 --- src/Acl/EsiRolesMap.php | 1 - src/Config/Permissions/character.php | 5 -- src/Config/Permissions/corporation.php | 5 -- src/Config/package.character.menu.php | 8 -- src/Config/package.corporation.menu.php | 8 -- src/Config/web.jobnames.php | 4 - .../Character/BookmarksController.php | 48 ----------- .../Corporation/BookmarksController.php | 48 ----------- .../Character/Intel/BookmarkDataTable.php | 53 ------------ .../Intel/AbstractBookmarkDataTable.php | 84 ------------------- .../Corporation/Intel/BookmarkDataTable.php | 42 ---------- src/Http/Routes/Character/View.php | 5 -- src/Http/Routes/Corporation/View.php | 5 -- src/resources/lang/de/permissions.php | 4 - src/resources/lang/de/seat.php | 1 - src/resources/lang/en/permissions.php | 4 - src/resources/lang/en/seat.php | 2 - src/resources/lang/fr/seat.php | 1 - src/resources/lang/ru/seat.php | 1 - src/resources/lang/zh-CN/seat.php | 1 - .../views/character/bookmarks.blade.php | 60 ------------- .../views/corporation/bookmarks.blade.php | 24 ------ 22 files changed, 414 deletions(-) delete mode 100644 src/Http/Controllers/Character/BookmarksController.php delete mode 100644 src/Http/Controllers/Corporation/BookmarksController.php delete mode 100644 src/Http/DataTables/Character/Intel/BookmarkDataTable.php delete mode 100644 src/Http/DataTables/Common/Intel/AbstractBookmarkDataTable.php delete mode 100644 src/Http/DataTables/Corporation/Intel/BookmarkDataTable.php delete mode 100644 src/resources/views/character/bookmarks.blade.php delete mode 100644 src/resources/views/corporation/bookmarks.blade.php diff --git a/src/Acl/EsiRolesMap.php b/src/Acl/EsiRolesMap.php index 34bbdc25a..03d7200d4 100644 --- a/src/Acl/EsiRolesMap.php +++ b/src/Acl/EsiRolesMap.php @@ -125,7 +125,6 @@ class EsiRolesMap 'corporation.wallet_fifth_division', 'corporation.wallet_sixth_division', 'corporation.wallet_seventh_division', - 'corporation.bookmark', 'corporation.contact', 'corporation.standing', 'corporation.killmail', diff --git a/src/Config/Permissions/character.php b/src/Config/Permissions/character.php index 64b885669..737a3039d 100644 --- a/src/Config/Permissions/character.php +++ b/src/Config/Permissions/character.php @@ -95,11 +95,6 @@ 'description' => 'web::permissions.character_transaction_description', 'division' => 'financial', ], - 'bookmark' => [ - 'label' => 'web::permissions.character_bookmark_label', - 'description' => 'web::permissions.character_bookmark_description', - 'division' => 'military', - ], 'contact' => [ 'label' => 'web::permissions.character_contact_label', 'description' => 'web::permissions.character_contact_description', diff --git a/src/Config/Permissions/corporation.php b/src/Config/Permissions/corporation.php index 2254d9a25..22fff0704 100644 --- a/src/Config/Permissions/corporation.php +++ b/src/Config/Permissions/corporation.php @@ -160,11 +160,6 @@ 'description' => 'web::permissions.corporation_wallet_seventh_division_description', 'division' => 'financial', ], - 'bookmark' => [ - 'label' => 'web::permissions.corporation_bookmark_label', - 'description' => 'web::permissions.corporation_bookmark_description', - 'division' => 'military', - ], 'contact' => [ 'label' => 'web::permissions.corporation_contact_label', 'description' => 'web::permissions.corporation_contact_description', diff --git a/src/Config/package.character.menu.php b/src/Config/package.character.menu.php index b7f8db454..e71b023a2 100644 --- a/src/Config/package.character.menu.php +++ b/src/Config/package.character.menu.php @@ -28,14 +28,6 @@ 'highlight_view' => 'assets', 'route' => 'character.view.assets', ], - [ - 'name' => 'bookmarks', - 'label' => 'web::seat.bookmark', - 'plural' => true, - 'permission' => 'character.bookmark', - 'highlight_view' => 'bookmarks', - 'route' => 'character.view.bookmarks', - ], [ 'name' => 'calendar', 'label' => 'web::seat.calendar', diff --git a/src/Config/package.corporation.menu.php b/src/Config/package.corporation.menu.php index 0ccc1ff17..f341ef759 100644 --- a/src/Config/package.corporation.menu.php +++ b/src/Config/package.corporation.menu.php @@ -28,14 +28,6 @@ 'highlight_view' => 'assets', 'route' => 'corporation.view.assets', ], - [ - 'name' => 'bookmark', - 'label' => 'web::seat.bookmark', - 'plural' => true, - 'permission' => 'corporation.bookmark', - 'highlight_view' => 'bookmarks', - 'route' => 'corporation.view.bookmarks', - ], [ 'name' => 'contacts', 'label' => 'web::seat.contacts', diff --git a/src/Config/web.jobnames.php b/src/Config/web.jobnames.php index 0e9507ccc..612084026 100644 --- a/src/Config/web.jobnames.php +++ b/src/Config/web.jobnames.php @@ -26,10 +26,6 @@ 'character' => [ 'assets' => \Seat\Eveapi\Jobs\Assets\Character\Assets::class, 'blueprints' => \Seat\Eveapi\Jobs\Character\Blueprints::class, - 'bookmarks' => [ - \Seat\Eveapi\Jobs\Bookmarks\Character\Bookmarks::class, - \Seat\Eveapi\Jobs\Bookmarks\Character\Folders::class, - ], 'calendar' => [ \Seat\Eveapi\Jobs\Calendar\Events::class, \Seat\Eveapi\Jobs\Calendar\Detail::class, diff --git a/src/Http/Controllers/Character/BookmarksController.php b/src/Http/Controllers/Character/BookmarksController.php deleted file mode 100644 index 37660c072..000000000 --- a/src/Http/Controllers/Character/BookmarksController.php +++ /dev/null @@ -1,48 +0,0 @@ -addScope(new CharacterScope('character.bookmark', request()->input('characters'))) - ->render('web::character.bookmarks', compact('character')); - } -} diff --git a/src/Http/Controllers/Corporation/BookmarksController.php b/src/Http/Controllers/Corporation/BookmarksController.php deleted file mode 100644 index a019f957a..000000000 --- a/src/Http/Controllers/Corporation/BookmarksController.php +++ /dev/null @@ -1,48 +0,0 @@ -addScope(new CorporationScope('corporation.bookmark', [$corporation->corporation_id])) - ->render('web::corporation.bookmarks', compact('corporation')); - } -} diff --git a/src/Http/DataTables/Character/Intel/BookmarkDataTable.php b/src/Http/DataTables/Character/Intel/BookmarkDataTable.php deleted file mode 100644 index c40e2a533..000000000 --- a/src/Http/DataTables/Character/Intel/BookmarkDataTable.php +++ /dev/null @@ -1,53 +0,0 @@ -postAjax([ - 'data' => 'function(d) { d.characters = $("#dt-character-selector").val(); }', - ]); - } -} diff --git a/src/Http/DataTables/Common/Intel/AbstractBookmarkDataTable.php b/src/Http/DataTables/Common/Intel/AbstractBookmarkDataTable.php deleted file mode 100644 index d3ab895a4..000000000 --- a/src/Http/DataTables/Common/Intel/AbstractBookmarkDataTable.php +++ /dev/null @@ -1,84 +0,0 @@ -eloquent($this->applyScopes($this->query())) - ->editColumn('created', function ($row) { - return view('web::partials.date', ['datetime' => $row->created])->render(); - }) - ->addColumn('coordinates', function ($row) { - return view('web::common.bookmarks.coordinates', compact('row'))->render(); - }) - ->rawColumns(['created', 'coordinates']) - ->make(true); - } - - /** - * @return \Yajra\DataTables\Html\Builder - */ - public function html() - { - return $this->builder() - ->postAjax() - ->columns($this->getColumns()) - ->parameters([ - 'drawCallback' => "function (settings) { var api = this.api(); var rows = api.rows({page:'current'}).nodes(); var last=null; api.column(0, {page:'current'}).data().each(function (group, i) { if ( last !== group ) { $(rows).eq(i).before('' + group + ''); last = group; }}); $('[data-toggle=tooltip]').tooltip(); }", - ]); - } - - /** - * @return \Illuminate\Database\Eloquent\Builder - */ - abstract public function query(); - - /** - * @return array - */ - public function getColumns() - { - return [ - ['data' => 'folder.name', 'visible' => false], - ['data' => 'created', 'title' => trans('web::bookmark.created')], - ['data' => 'label', 'title' => trans('web::bookmark.label')], - ['data' => 'map_name', 'title' => trans('web::bookmark.location')], - ['data' => 'notes', 'title' => trans('web::bookmark.notes')], - ['data' => 'coordinates', 'title' => trans('web::bookmark.coordinates')], - ]; - } -} diff --git a/src/Http/DataTables/Corporation/Intel/BookmarkDataTable.php b/src/Http/DataTables/Corporation/Intel/BookmarkDataTable.php deleted file mode 100644 index 986c750c1..000000000 --- a/src/Http/DataTables/Corporation/Intel/BookmarkDataTable.php +++ /dev/null @@ -1,42 +0,0 @@ -uses('AssetsController@getContainer') ->middleware('can:character.asset,character'); -Route::get('/{character}/bookmarks') - ->name('character.view.bookmarks') - ->uses('BookmarksController@index') - ->middleware('can:character.bookmark,character'); - Route::get('/{character}/calendar') ->name('character.view.calendar') ->uses('CalendarController@index') diff --git a/src/Http/Routes/Corporation/View.php b/src/Http/Routes/Corporation/View.php index ca957458d..3dd5a8de2 100644 --- a/src/Http/Routes/Corporation/View.php +++ b/src/Http/Routes/Corporation/View.php @@ -47,11 +47,6 @@ ->uses('AssetsController@getContainer') ->middleware('can:corporation.asset,corporation'); -Route::get('/{corporation}/bookmarks') - ->name('corporation.view.bookmarks') - ->uses('BookmarksController@index') - ->middleware('can:corporation.bookmark,corporation'); - Route::get('/{corporation}/contacts') ->name('corporation.view.contacts') ->uses('ContactsController@index') diff --git a/src/resources/lang/de/permissions.php b/src/resources/lang/de/permissions.php index 3cdfcc123..05f93a4a0 100644 --- a/src/resources/lang/de/permissions.php +++ b/src/resources/lang/de/permissions.php @@ -45,8 +45,6 @@ // Character Scope 'character_asset_label' => 'Zugriff auf Charakter Besitz gewähren.', 'character_asset_description' => 'Zeigt alle Besitztümer eines Charakter an, sowie deren Orte.', - 'character_bookmark_label' => 'Zugriff auf Charakter Lesezeichen (Bookmarks) gewähren.', - 'character_bookmark_description' => 'Zeigt alle aktiven Lesezeichen (Bookmarks) eines Charakters an, inklusive Ordnerstruktur, Name, Ort und Notizen.', 'character_calendar_label' => 'Zugriff auf Charakter Kalenderereignisse gewähren.', 'character_calendar_description' => 'Zeigt alle Kalenderereignisse an die einem Character zur Verfügung stehen.', 'character_contact_label' => 'Zugriff auf Charakter Kontakte gewähren.', @@ -103,8 +101,6 @@ 'corporation_asset_sixth_division_description' => 'Gewährt Einsicht auf die sechste Abteilung eines Corp-Büros.', 'corporation_asset_seventh_division_label' => 'Zugriff Corp-Büro Abteilung 7 gewähren.', 'corporation_asset_seventh_division_description' => 'Gewährt Einsicht auf die siebte Abteilung eines Corp-Büros.', - 'corporation_bookmark_label' => 'Zugriff auf Corp Lesezeichen (Bookmarks) gewähren.', - 'corporation_bookmark_description' => 'Zeigt jedes Lesezeichen (Bookmark) welches für die Corp erstellt wurde.', 'corporation_contact_label' => 'Zugriff auf Corp Kontakte gewähren.', 'corporation_contact_description' => 'Zeigt die Kontaktliste einer Corp an, inklusive Name, Ansehen und links zu nützlichen Tools wie zKillboard.', 'corporation_contract_label' => 'Zugriff auf Corp Verträge gewähren.', diff --git a/src/resources/lang/de/seat.php b/src/resources/lang/de/seat.php index a79948bf8..bf83b1268 100644 --- a/src/resources/lang/de/seat.php +++ b/src/resources/lang/de/seat.php @@ -361,7 +361,6 @@ 'no_account_info' => 'Keine Account Informationen verfügbar', 'channel_members' => 'Kanal Mitglieder .DE', 'motd' => 'MoTD', - 'bookmark' => 'Bookmark|Bookmarks', 'coordinates' => 'Koordinaten', 'folder' => 'Ordner', diff --git a/src/resources/lang/en/permissions.php b/src/resources/lang/en/permissions.php index bbafda4b3..3cec7ba5c 100644 --- a/src/resources/lang/en/permissions.php +++ b/src/resources/lang/en/permissions.php @@ -54,8 +54,6 @@ // Character Scope 'character_asset_label' => 'Grant access to Character Assets', 'character_asset_description' => 'Displays every asset (item) of a character as well as their location and quantity.', - 'character_bookmark_label' => 'Grant access to Character Bookmarks', - 'character_bookmark_description' => 'Displays every active bookmark made by a character, including folder structure, name, location and optional notes.', 'character_calendar_label' => 'Grant access to Character Calendar Events ', 'character_calendar_description' => 'Displays every calendar event the character either created or is subscribed to.', 'character_contact_label' => 'Grant access to Character Contacts', @@ -112,8 +110,6 @@ 'corporation_asset_sixth_division_description' => 'Grants permission to view all corporation assets inside the Sixth (6th) Division.', 'corporation_asset_seventh_division_label' => 'Grant access to Corporation Assets inside the Seventh Division', 'corporation_asset_seventh_division_description' => 'Grants permission to view all corporation assets inside the Seventh (7th) Division.', - 'corporation_bookmark_label' => 'Grant access to Corporation Bookmarks', - 'corporation_bookmark_description' => 'Shows every single bookmark made on behalf of a corporation, including folder structure, name, location and optional note.', 'corporation_contact_label' => 'Grant access to Corporation Contacts', 'corporation_contact_description' => 'Displays corporation contacts including name, standing and link to third-party platforms (like zkillboard).', 'corporation_contract_label' => 'Grant access to Corporation Contracts', diff --git a/src/resources/lang/en/seat.php b/src/resources/lang/en/seat.php index 6d825c163..f26be03a8 100644 --- a/src/resources/lang/en/seat.php +++ b/src/resources/lang/en/seat.php @@ -450,7 +450,6 @@ 'update_skill_queue' => 'Update Skill Queue', 'update_assets' => 'Update Assets', 'update_blueprints' => 'Update Blueprints', - 'update_bookmarks' => 'Update Bookmarks', 'update_calendar' => 'Update Calendar', 'update_contacts' => 'Update Contacts', 'update_contracts' => 'Update Contracts', @@ -552,7 +551,6 @@ 'deleted_refresh_token' => 'A refresh token for this character was deleted about :time. As a result, information displayed may be out of date.', 'channel_members' => 'Channel Members', 'motd' => 'MoTD', - 'bookmark' => 'Bookmark|Bookmarks', 'coordinates' => 'Coordinates', 'folder' => 'Folder', 'skills_graph' => 'Skills Graph', diff --git a/src/resources/lang/fr/seat.php b/src/resources/lang/fr/seat.php index dd9f60bd5..a9de1669d 100644 --- a/src/resources/lang/fr/seat.php +++ b/src/resources/lang/fr/seat.php @@ -382,7 +382,6 @@ 'no_account_info' => 'Aucune information de compte disponible', 'channel_members' => 'Membres sur le canal', 'motd' => 'Message du jour', - 'bookmark' => 'Emplacements', 'coordinates' => 'Coordonnées', 'folder' => 'Dossier', diff --git a/src/resources/lang/ru/seat.php b/src/resources/lang/ru/seat.php index 8f7e4dfc4..8d15c27f7 100644 --- a/src/resources/lang/ru/seat.php +++ b/src/resources/lang/ru/seat.php @@ -496,7 +496,6 @@ 'no_account_info' => 'Нет информации об аккаунте', 'channel_members' => 'Члены канала связи', 'motd' => 'MoTD', - 'bookmark' => 'Закладка|Закладки/Буки', 'coordinates' => 'Координаты', 'folder' => 'Папка', 'skills_graph' => 'Графики навыков', diff --git a/src/resources/lang/zh-CN/seat.php b/src/resources/lang/zh-CN/seat.php index 9fffd74d9..da2b4f409 100644 --- a/src/resources/lang/zh-CN/seat.php +++ b/src/resources/lang/zh-CN/seat.php @@ -483,7 +483,6 @@ 'no_account_info' => '无可用账户信息', 'channel_members' => '频道成员', 'motd' => 'MoTD', - 'bookmark' => '保存的地点|保存的地点', 'coordinates' => '坐标', 'folder' => '文件夹', 'skills_graph' => '技能图表', diff --git a/src/resources/views/character/bookmarks.blade.php b/src/resources/views/character/bookmarks.blade.php deleted file mode 100644 index ac4a70ca4..000000000 --- a/src/resources/views/character/bookmarks.blade.php +++ /dev/null @@ -1,60 +0,0 @@ -@extends('web::character.layouts.view', ['viewname' => 'bookmarks', 'breadcrumb' => trans_choice('web::seat.bookmark', 2)]) - -@section('page_header', trans_choice('web::seat.character', 1) . ' ' . trans_choice('web::seat.bookmark', 2)) - -@inject('request', 'Illuminate\Http\Request') - -@section('character_content') - -
-
-

- {{ trans_choice('web::seat.bookmark', 2) }} -

- @if($character->refresh_token) -
-
- -
-
- @endif -
-
-
- -
- - {{ $dataTable->table() }} -
-
- -@stop - -@push('javascript') - - {!! $dataTable->scripts() !!} - - -@endpush \ No newline at end of file diff --git a/src/resources/views/corporation/bookmarks.blade.php b/src/resources/views/corporation/bookmarks.blade.php deleted file mode 100644 index 2c54826b7..000000000 --- a/src/resources/views/corporation/bookmarks.blade.php +++ /dev/null @@ -1,24 +0,0 @@ -@extends('web::corporation.layouts.view', ['viewname' => 'bookmarks', 'breadcrumb' => trans_choice('web::seat.bookmark', 2)]) - -@section('page_header', trans_choice('web::seat.corporation', 1) . ' ' . trans_choice('web::seat.bookmark', 2)) - -@section('corporation_content') - -
-
-

{{ trans_choice('web::seat.bookmark', 2) }}

-
-
- - {{ $dataTable->table() }} - -
-
- -@stop - -@push('javascript') - - {!! $dataTable->scripts() !!} - -@endpush \ No newline at end of file