diff --git a/app/plugins/bookmarks/controllers/bookmarks.php b/app/plugins/bookmarks/controllers/bookmarks.php index 0f2595c..3c1e1c5 100644 --- a/app/plugins/bookmarks/controllers/bookmarks.php +++ b/app/plugins/bookmarks/controllers/bookmarks.php @@ -26,6 +26,7 @@ use TheTempusProject\TheTempusProject as App; use TheTempusProject\Houdini\Classes\Components; use TheTempusProject\Houdini\Classes\Forms as HoudiniForms; use TheTempusProject\Houdini\Classes\Navigation; +use TheTempusProject\Houdini\Classes\Template; class Bookmarks extends Controller { protected static $bookmarks; @@ -127,8 +128,7 @@ class Bookmarks extends Controller { public function createBookmark( $id = null ) { $folderID = Input::get('folder_id') ? Input::get('folder_id') : $id; $folderID = Input::post('folder_id') ? Input::post('folder_id') : $id; - $folderSelect = HoudiniForms::getFormFieldHtml( 'folder_id', 'Folder', 'select', $folderID, self::$folders->simpleByUser() ); - Components::set( 'folderSelect', $folderSelect ); + $this->setFolderSelect( $folderID ); if ( ! Input::exists() ) { return Views::view( 'bookmarks.bookmarks.create' ); @@ -172,8 +172,7 @@ class Bookmarks extends Controller { $folderID = $bookmark->folderID; } - $folderSelect = HoudiniForms::getFormFieldHtml( 'folder_id', 'Folder', 'select', $folderID, self::$folders->simpleByUser() ); - Components::set( 'folderSelect', $folderSelect ); + $this->setFolderSelect( $folderID ); Components::set( 'color', $bookmark->color ); if ( ! Input::exists( 'submit' ) ) { @@ -227,7 +226,8 @@ class Bookmarks extends Controller { $folder = self::$folders->findById( $id ); if ( $folder == false ) { $folders = self::$folders->byUser(); - return Views::view( 'bookmarks.folders.list', $folders ); + Components::set( 'foldersList', Views::simpleView( 'bookmarks.folders.list', $folders ) ); + return Views::view( 'bookmarks.folders.listPage', $folders ); } if ( $folder->createdBy != App::$activeUser->ID ) { Session::flash( 'error', 'You do not have permission to view this folder.' ); @@ -241,11 +241,11 @@ class Bookmarks extends Controller { $folderID = Input::exists('folder_id') ? Input::post('folder_id') : $id; $folders = self::$folders->simpleByUser(); if ( ! empty( $folders ) ) { - $folderSelect = HoudiniForms::getFormFieldHtml( 'folder_id', 'Folder', 'select', $folderID, $folders ); + $this->setFolderSelect( $folderID ); } else { $folderSelect = ''; + Components::set( 'folderSelect', $folderSelect ); } - Components::set( 'folderSelect', $folderSelect ); if ( ! Input::exists() ) { return Views::view( 'bookmarks.folders.create' ); } @@ -275,8 +275,7 @@ class Bookmarks extends Controller { } $folderID = ( false === Input::exists('folder_id') ) ? $folder->ID : Input::post('folder_id'); - $folderSelect = HoudiniForms::getFormFieldHtml( 'folder_id', 'Folder', 'select', $folderID, self::$folders->simpleByUser() ); - Components::set( 'folderSelect', $folderSelect ); + $this->setFolderSelect( $folderID ); Components::set( 'color', $folder->color ); if ( ! Input::exists( 'submit' ) ) { @@ -512,4 +511,36 @@ class Bookmarks extends Controller { } return $out; } + + + + + private function setFolderSelect( $folderID ) { + $options = self::$folders->simpleByUser(); + $out = ''; + $out .= '
'; + $out .= ''; + $out .= '
'; + $out .= ''; + $out .= '
'; + $out .= '
'; + $folderSelect = Template::parse( $out ); + Components::set( 'folderSelect', $folderSelect ); + } } diff --git a/app/plugins/bookmarks/views/bookmarks/create.html b/app/plugins/bookmarks/views/bookmarks/create.html index 13c4113..8069266 100644 --- a/app/plugins/bookmarks/views/bookmarks/create.html +++ b/app/plugins/bookmarks/views/bookmarks/create.html @@ -1,44 +1,51 @@ -Create Bookmark -
- -
- -
- + +

Add Bookmark

+
+
+ +
+ +
-
-
- -
- + + +
+ +
+ +
-
-
- -
- + + +
+ +
+ +
-
- {folderSelect} -
- -
- + {folderSelect} +
+ +
+ +
-
-
- -
- {colorSelect} +
+ +
+ {colorSelect} +
-
-
- -
- + + + + + +
+
-
+ \ No newline at end of file diff --git a/app/plugins/bookmarks/views/bookmarks/edit.html b/app/plugins/bookmarks/views/bookmarks/edit.html index ac89c62..18b9d68 100644 --- a/app/plugins/bookmarks/views/bookmarks/edit.html +++ b/app/plugins/bookmarks/views/bookmarks/edit.html @@ -1,44 +1,51 @@ -Edit Bookmark -
- -
- -
- + +

Edit Bookmark

+
+
+ +
+ +
-
-
- -
- + + +
+ +
+ +
-
-
- -
- + + +
+ +
+ +
-
- {folderSelect} -
- -
- + {folderSelect} +
+ +
+ +
-
-
- -
- {colorSelect} +
+ +
+ {colorSelect} +
-
-
- -
- + + + + + +
+
-
+ \ No newline at end of file diff --git a/app/plugins/bookmarks/views/bookmarks/list.html b/app/plugins/bookmarks/views/bookmarks/list.html index 7a25ff4..1fa2a6a 100644 --- a/app/plugins/bookmarks/views/bookmarks/list.html +++ b/app/plugins/bookmarks/views/bookmarks/list.html @@ -1,37 +1,37 @@ - - - - - - - - - - - - {LOOP} - - - - - - - - {/LOOP} - {ALT} - - - - {/ALT} - -
Bookmark
- - {title} - - - {privacy} -
- No results to show. -
-Create \ No newline at end of file + + + + + + + + + + + + {LOOP} + + + + + + + + {/LOOP} + {ALT} + + + + {/ALT} + +
Bookmark
+ + {title} + + + {privacy} +
+ No results to show. +
+ Create \ No newline at end of file diff --git a/app/plugins/bookmarks/views/bookmarks/listPage.html b/app/plugins/bookmarks/views/bookmarks/listPage.html new file mode 100644 index 0000000..f975b06 --- /dev/null +++ b/app/plugins/bookmarks/views/bookmarks/listPage.html @@ -0,0 +1,8 @@ + + +
+
+ Bookmark List + {bookmarksList} +
+
diff --git a/app/plugins/bookmarks/views/bookmarks/view.html b/app/plugins/bookmarks/views/bookmarks/view.html index 48f080d..cb73a7f 100644 --- a/app/plugins/bookmarks/views/bookmarks/view.html +++ b/app/plugins/bookmarks/views/bookmarks/view.html @@ -1,84 +1,120 @@ -{BookmarkBreadCrumbs}
-
-
-
-
-

Bookmark

-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Title{title}
URL{url}
Type{linkType}
Privacy{privacy}
Color{color}
Description
{description}
Icon
{iconHtml}
{icon}
Meta
{meta}
Created{DTC}{createdAt}{/DTC}
Archived{DTC}{archivedAt}{/DTC}
Hidden{DTC}{hiddenAt}{/DTC}
Last Refreshed{DTC}{refreshedAt}{/DTC}
+ + + + + + + + + + + + + + + + +
+
+
+
+ +
+

Bookmark

+
+ + +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Title:{title}
URL:{url}
Type:{linkType}
Privacy:{privacy}
Color:{color}
Created:{DTC}{createdAt}{/DTC}
Archived:{DTC}{archivedAt}{/DTC}
Hidden:{DTC}{hiddenAt}{/DTC}
Last Refreshed:{DTC}{refreshedAt}{/DTC}
Description
{description}
Icon
{iconHtml}
{icon}
Meta
{meta}
+
-
-
-
-
\ No newline at end of file +
+
+ + + + + + + + diff --git a/app/plugins/bookmarks/views/dash.html b/app/plugins/bookmarks/views/dash.html index ddcc41b..392423f 100644 --- a/app/plugins/bookmarks/views/dash.html +++ b/app/plugins/bookmarks/views/dash.html @@ -1,15 +1,17 @@
-
- Unsorted Bookmarks +
+ Unsorted Bookmarks {bookmarksList}
-
- Folders List +
+ Folders List {foldersList}
-Folders
- {folderPanels} +
+ Bookmarks + {folderPanels} +
\ No newline at end of file diff --git a/app/plugins/bookmarks/views/folders/create.html b/app/plugins/bookmarks/views/folders/create.html index e87a638..9372d2e 100644 --- a/app/plugins/bookmarks/views/folders/create.html +++ b/app/plugins/bookmarks/views/folders/create.html @@ -1,38 +1,41 @@ -Create Folder -
- -
- -
- + +

Create Folder

+
+
+ +
+ +
-
-
- -
- +
+ +
+ +
-
- {folderSelect} -
- -
- + {folderSelect} +
+ +
+ +
-
-
- -
- {colorSelect} +
+ +
+ {colorSelect} +
-
-
- -
- + + + + + +
+
-
+ \ No newline at end of file diff --git a/app/plugins/bookmarks/views/folders/edit.html b/app/plugins/bookmarks/views/folders/edit.html index 4cc6736..fcf1fd0 100644 --- a/app/plugins/bookmarks/views/folders/edit.html +++ b/app/plugins/bookmarks/views/folders/edit.html @@ -1,38 +1,43 @@ -Edit Folder -
- -
- -
- + + + +

Edit Folder

+
+
+ +
+ +
-
-
- -
- +
+ +
+ +
-
- {folderSelect} -
- -
- + {folderSelect} +
+ +
+ +
-
-
- -
- {colorSelect} +
+ +
+ {colorSelect} +
-
-
- -
- + + + + + +
+
-
+ \ No newline at end of file diff --git a/app/plugins/bookmarks/views/folders/list.html b/app/plugins/bookmarks/views/folders/list.html index 2961af9..e5df19a 100644 --- a/app/plugins/bookmarks/views/folders/list.html +++ b/app/plugins/bookmarks/views/folders/list.html @@ -1,33 +1,33 @@ - - - - - - - - - - - - - {LOOP} - - - - - - - - - {/LOOP} - {ALT} - - - - {/ALT} - -
TitlePrivacyDescription
{title}{privacy}{description}
- No results to show. -
-Create \ No newline at end of file + + + + + + + + + + + + + {LOOP} + + + + + + + + + {/LOOP} + {ALT} + + + + {/ALT} + +
TitlePrivacyDescription
{title}{privacy}{description}
+ No results to show. +
+ Create \ No newline at end of file diff --git a/app/plugins/bookmarks/views/folders/listPage.html b/app/plugins/bookmarks/views/folders/listPage.html new file mode 100644 index 0000000..e4f4a70 --- /dev/null +++ b/app/plugins/bookmarks/views/folders/listPage.html @@ -0,0 +1,7 @@ + +
+
+ Folders List + {foldersList} +
+
diff --git a/app/plugins/bookmarks/views/folders/view.html b/app/plugins/bookmarks/views/folders/view.html index e337328..ee0fae0 100644 --- a/app/plugins/bookmarks/views/folders/view.html +++ b/app/plugins/bookmarks/views/folders/view.html @@ -1,47 +1,79 @@ -{BookmarkBreadCrumbs}
-
-
-
-
-

Bookmark Folder

-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
Title{title}
Privacy{privacy}
Color{color}
Description
{description}
Created{DTC}{createdAt}{/DTC}
+ + + + + + + + + + +
+
+
+
+ +
+

Bookmark Folder

+
+ + +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Title:{title}
Privacy:{privacy}
Color:{color}
Created:{DTC}{createdAt}{/DTC}
Description
{description}
+
-
-
-
-
\ No newline at end of file +
+
+ + + + + + + + diff --git a/app/plugins/bookmarks/views/import.html b/app/plugins/bookmarks/views/import.html index 62758cb..ec0c98d 100644 --- a/app/plugins/bookmarks/views/import.html +++ b/app/plugins/bookmarks/views/import.html @@ -1,16 +1,18 @@ -Import Bookmarks -
-
- -
- +
+ Import Bookmarks + +
+ +
+ +
-
- -
- -
- + +
+ +
+ +
-
- \ No newline at end of file + +
\ No newline at end of file diff --git a/app/plugins/bookmarks/views/nav/folderTabs.html b/app/plugins/bookmarks/views/nav/folderTabs.html index f3549ba..20d76c2 100644 --- a/app/plugins/bookmarks/views/nav/folderTabs.html +++ b/app/plugins/bookmarks/views/nav/folderTabs.html @@ -1,6 +1,6 @@ -