From ff995987d4f49998b73210a12a1cd47e39ef63a0 Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Mon, 2 Dec 2019 20:35:43 +0000 Subject: Move module views to the views/modules folder --- app/Http/Controllers/BranchesController.php | 2 +- app/Http/Controllers/ListController.php | 10 +- resources/views/branches-list.phtml | 3 - resources/views/individual-list-page.phtml | 7 - resources/views/media-list-page.phtml | 208 --------------------- resources/views/modules/branches/list.phtml | 3 + resources/views/modules/individual-list/page.phtml | 7 + resources/views/modules/media-list/page.phtml | 208 +++++++++++++++++++++ resources/views/modules/note-list/page.phtml | 7 + resources/views/modules/repository-list/page.phtml | 7 + resources/views/modules/source-list/page.phtml | 7 + resources/views/note-list-page.phtml | 7 - resources/views/repository-list-page.phtml | 7 - resources/views/source-list-page.phtml | 7 - 14 files changed, 245 insertions(+), 245 deletions(-) delete mode 100644 resources/views/branches-list.phtml delete mode 100644 resources/views/individual-list-page.phtml delete mode 100644 resources/views/media-list-page.phtml create mode 100644 resources/views/modules/branches/list.phtml create mode 100644 resources/views/modules/individual-list/page.phtml create mode 100644 resources/views/modules/media-list/page.phtml create mode 100644 resources/views/modules/note-list/page.phtml create mode 100644 resources/views/modules/repository-list/page.phtml create mode 100644 resources/views/modules/source-list/page.phtml delete mode 100644 resources/views/note-list-page.phtml delete mode 100644 resources/views/repository-list-page.phtml delete mode 100644 resources/views/source-list-page.phtml diff --git a/app/Http/Controllers/BranchesController.php b/app/Http/Controllers/BranchesController.php index 58fdd40ba1..b3c183e7c6 100644 --- a/app/Http/Controllers/BranchesController.php +++ b/app/Http/Controllers/BranchesController.php @@ -129,7 +129,7 @@ class BranchesController extends AbstractBaseController $ancestors = []; } - $html = view('branches-list', [ + $html = view('modules/branches/list', [ 'branches' => $this->getPatriarchsHtml($tree, $individuals, $ancestors, $surname, $soundex_dm, $soundex_std), ]); diff --git a/app/Http/Controllers/ListController.php b/app/Http/Controllers/ListController.php index 1ce9cc1667..c7b3c0cc6e 100644 --- a/app/Http/Controllers/ListController.php +++ b/app/Http/Controllers/ListController.php @@ -389,7 +389,7 @@ class ListController extends AbstractBaseController $html = ob_get_clean(); - return $this->viewResponse('individual-list-page', [ + return $this->viewResponse('modules/individual-list/page', [ 'content' => $html, 'title' => $title, 'tree' => $tree, @@ -445,7 +445,7 @@ class ListController extends AbstractBaseController $media_objects = array_slice($media_objects, ($page - 1) * $max, $max); - return $this->viewResponse('media-list-page', [ + return $this->viewResponse('modules/media-list/page', [ 'count' => $count, 'filter' => $filter, 'folder' => $folder, @@ -479,7 +479,7 @@ class ListController extends AbstractBaseController $notes = $this->allNotes($tree); - return $this->viewResponse('note-list-page', [ + return $this->viewResponse('modules/note-list/page', [ 'notes' => $notes, 'title' => I18N::translate('Shared notes'), 'tree' => $tree, @@ -500,7 +500,7 @@ class ListController extends AbstractBaseController $repositories = $this->allRepositories($tree); - return $this->viewResponse('repository-list-page', [ + return $this->viewResponse('modules/repository-list/page', [ 'repositories' => $repositories, 'title' => I18N::translate('Repositories'), 'tree' => $tree, @@ -521,7 +521,7 @@ class ListController extends AbstractBaseController $sources = $this->allSources($tree); - return $this->viewResponse('source-list-page', [ + return $this->viewResponse('modules/source-list/page', [ 'sources' => $sources, 'title' => I18N::translate('Sources'), 'tree' => $tree, diff --git a/resources/views/branches-list.phtml b/resources/views/branches-list.phtml deleted file mode 100644 index 5c0c15df45..0000000000 --- a/resources/views/branches-list.phtml +++ /dev/null @@ -1,3 +0,0 @@ -
    - -
diff --git a/resources/views/individual-list-page.phtml b/resources/views/individual-list-page.phtml deleted file mode 100644 index fc9de325be..0000000000 --- a/resources/views/individual-list-page.phtml +++ /dev/null @@ -1,7 +0,0 @@ -

- -

- -
- -
diff --git a/resources/views/media-list-page.phtml b/resources/views/media-list-page.phtml deleted file mode 100644 index 041925d652..0000000000 --- a/resources/views/media-list-page.phtml +++ /dev/null @@ -1,208 +0,0 @@ - - -

- -

- -
- - -
- -
- 'folder', 'selected' => $folder, 'options' => $folders]) ?> - /* I18N: Label for check-box */ I18N::translate('Include subfolders'), 'name' => 'subdirs', 'checked' => $subdirs === '1']) ?> -
- - -
- 'max', 'selected' => $max, 'options' => FunctionsEdit::numericOptions([10, 20, 30, 40, 50, 75, 100, 150, 200])]) ?> -
-
- -
- -
- 'form_type', 'id' => 'form-type', 'selected' => $form_type, 'options' => ['' => ''] + $formats]) ?> -
- -
-
-
-
-
- -
- -
- -
- -
-
-
- - - - -
-
-
- -
- isNotEmpty()) : ?> -

- -
-
- 1) : ?> - - - - -
-
- 1) : ?> - - - - -
-
- -
-
- - - - - -
-
- - - - - -
-
- -
- $media_object) : ?> -
-
-
-

- fullName() ?> -

-
-
- mediaFiles() as $media_file) : ?> - displayImage(300, 200, 'contain', ['class' => 'img-fluid']) ?> - - -

- type(); - if ($mediatype) { - echo GedcomTag::getLabelValue('TYPE', GedcomTag::getFileFormTypeValue($mediatype)); - } - echo FunctionsPrintFacts::printFactSources($tree, $media_object->gedcom(), 1); - echo FunctionsPrint::printFactNotes($tree, $media_object->gedcom(), 1); - if ($media_file->isExternal()) { - echo GedcomTag::getLabelValue('URL', $media_file->filename()); - } elseif ($media_file->fileExists($data_filesystem)) { - echo GedcomTag::getLabelValue('FORM', $media_file->mimeType()); - if (Auth::isEditor($tree)) { - echo GedcomTag::getLabelValue('FILE', $media_file->filename()); - } - if (Auth::isEditor($tree)) { - foreach ($media_file->attributes($data_filesystem) as $tag => $value) { - echo GedcomTag::getLabelValue($tag, $value); - } - } - } else { - echo '

', /* I18N: %s is a filename */ I18N::translate('The file ā€œ%sā€ does not exist.', $media_file->filename()), '

'; - } - ?> -

-
- -
-
- -
- -
-
- 1) : ?> - - - - -
-
- 1) : ?> - - - - -
-
- -
-
- - - - - -
-
- - - - - -
-
- -
diff --git a/resources/views/modules/branches/list.phtml b/resources/views/modules/branches/list.phtml new file mode 100644 index 0000000000..5c0c15df45 --- /dev/null +++ b/resources/views/modules/branches/list.phtml @@ -0,0 +1,3 @@ +
    + +
diff --git a/resources/views/modules/individual-list/page.phtml b/resources/views/modules/individual-list/page.phtml new file mode 100644 index 0000000000..fc9de325be --- /dev/null +++ b/resources/views/modules/individual-list/page.phtml @@ -0,0 +1,7 @@ +

+ +

+ +
+ +
diff --git a/resources/views/modules/media-list/page.phtml b/resources/views/modules/media-list/page.phtml new file mode 100644 index 0000000000..041925d652 --- /dev/null +++ b/resources/views/modules/media-list/page.phtml @@ -0,0 +1,208 @@ + + +

+ +

+ +
+ + +
+ +
+ 'folder', 'selected' => $folder, 'options' => $folders]) ?> + /* I18N: Label for check-box */ I18N::translate('Include subfolders'), 'name' => 'subdirs', 'checked' => $subdirs === '1']) ?> +
+ + +
+ 'max', 'selected' => $max, 'options' => FunctionsEdit::numericOptions([10, 20, 30, 40, 50, 75, 100, 150, 200])]) ?> +
+
+ +
+ +
+ 'form_type', 'id' => 'form-type', 'selected' => $form_type, 'options' => ['' => ''] + $formats]) ?> +
+ +
+
+
+
+
+ +
+ +
+ +
+ +
+
+
+ + + + +
+
+
+ +
+ isNotEmpty()) : ?> +

+ +
+
+ 1) : ?> + + + + +
+
+ 1) : ?> + + + + +
+
+ +
+
+ + + + + +
+
+ + + + + +
+
+ +
+ $media_object) : ?> +
+
+
+

+ fullName() ?> +

+
+
+ mediaFiles() as $media_file) : ?> + displayImage(300, 200, 'contain', ['class' => 'img-fluid']) ?> + + +

+ type(); + if ($mediatype) { + echo GedcomTag::getLabelValue('TYPE', GedcomTag::getFileFormTypeValue($mediatype)); + } + echo FunctionsPrintFacts::printFactSources($tree, $media_object->gedcom(), 1); + echo FunctionsPrint::printFactNotes($tree, $media_object->gedcom(), 1); + if ($media_file->isExternal()) { + echo GedcomTag::getLabelValue('URL', $media_file->filename()); + } elseif ($media_file->fileExists($data_filesystem)) { + echo GedcomTag::getLabelValue('FORM', $media_file->mimeType()); + if (Auth::isEditor($tree)) { + echo GedcomTag::getLabelValue('FILE', $media_file->filename()); + } + if (Auth::isEditor($tree)) { + foreach ($media_file->attributes($data_filesystem) as $tag => $value) { + echo GedcomTag::getLabelValue($tag, $value); + } + } + } else { + echo '

', /* I18N: %s is a filename */ I18N::translate('The file ā€œ%sā€ does not exist.', $media_file->filename()), '

'; + } + ?> +

+
+ +
+
+ +
+ +
+
+ 1) : ?> + + + + +
+
+ 1) : ?> + + + + +
+
+ +
+
+ + + + + +
+
+ + + + + +
+
+ +
diff --git a/resources/views/modules/note-list/page.phtml b/resources/views/modules/note-list/page.phtml new file mode 100644 index 0000000000..3be5fcd5dd --- /dev/null +++ b/resources/views/modules/note-list/page.phtml @@ -0,0 +1,7 @@ +

+ +

+ +
+ $notes, 'tree' => $tree]) ?> +
diff --git a/resources/views/modules/repository-list/page.phtml b/resources/views/modules/repository-list/page.phtml new file mode 100644 index 0000000000..19ffc64459 --- /dev/null +++ b/resources/views/modules/repository-list/page.phtml @@ -0,0 +1,7 @@ +

+ +

+ +
+ $repositories, 'tree' => $tree]) ?> +
diff --git a/resources/views/modules/source-list/page.phtml b/resources/views/modules/source-list/page.phtml new file mode 100644 index 0000000000..146fb1ef6e --- /dev/null +++ b/resources/views/modules/source-list/page.phtml @@ -0,0 +1,7 @@ +

+ +

+ +
+ $sources, 'tree' => $tree]) ?> +
diff --git a/resources/views/note-list-page.phtml b/resources/views/note-list-page.phtml deleted file mode 100644 index 3be5fcd5dd..0000000000 --- a/resources/views/note-list-page.phtml +++ /dev/null @@ -1,7 +0,0 @@ -

- -

- -
- $notes, 'tree' => $tree]) ?> -
diff --git a/resources/views/repository-list-page.phtml b/resources/views/repository-list-page.phtml deleted file mode 100644 index 19ffc64459..0000000000 --- a/resources/views/repository-list-page.phtml +++ /dev/null @@ -1,7 +0,0 @@ -

- -

- -
- $repositories, 'tree' => $tree]) ?> -
diff --git a/resources/views/source-list-page.phtml b/resources/views/source-list-page.phtml deleted file mode 100644 index 146fb1ef6e..0000000000 --- a/resources/views/source-list-page.phtml +++ /dev/null @@ -1,7 +0,0 @@ -

- -

- -
- $sources, 'tree' => $tree]) ?> -
-- cgit v1.3