From e53777170832e0c67438847ddf361b8cd47ed98f Mon Sep 17 00:00:00 2001 From: Joey Kimsey Date: Tue, 17 Dec 2024 22:45:47 -0500 Subject: [PATCH] plugin wip --- .gitignore | 1 - .../bookmarks/controllers/bookmarks.php | 73 ++++++----- app/plugins/bookmarks/controllers/shared.php | 30 +---- app/plugins/bookmarks/models/bookmarks.php | 46 +++++-- .../bookmarks/models/bookmarkviews.php | 12 +- app/plugins/bookmarks/models/folders.php | 9 +- app/plugins/bookmarks/plugin.php | 4 + .../bookmarks/views/bookmarks/create.html | 95 ++++++++------- .../views/components/bookmarkListPanel.html | 16 +-- .../views/components/bookmarkListRows.html | 5 +- .../views/components/publicList.html | 27 ++++ .../views/components/publicListRows.html | 30 +++++ .../views/components/shareListPanel.html | 52 ++++---- .../views/components/shareListRows.html | 11 +- app/plugins/bookmarks/views/dash.html | 20 +-- .../bookmarks/views/folders/create.html | 85 +++++++------ .../bookmarks/views/public/bookmark.html | 48 ++++++++ .../{shareFolder.html => public/folder.html} | 13 +- app/plugins/bookmarks/views/share.html | 20 +-- app/plugins/bookmarks/views/shareLink.html | 83 ------------- .../members/controllers/admin/products.php | 10 +- .../members/controllers/admin/records.php | 8 +- app/plugins/members/plugin.php | 8 +- .../members/views/admin/memberships/list.html | 91 +++++++------- .../members/views/admin/memberships/view.html | 76 ++++++++++++ .../members/views/admin/products/create.html | 83 ++++++++----- .../members/views/admin/products/edit.html | 83 ++++++++----- .../members/views/admin/products/list.html | 87 ++++++------- .../members/views/admin/products/view.html | 86 +++++++------ app/plugins/members/views/manage.html | 2 +- app/plugins/reviews/views/admin/category.html | 4 +- .../suggestions/controllers/suggestions.php | 53 ++++---- app/plugins/suggestions/views/admin/edit.html | 58 +++++---- app/plugins/suggestions/views/admin/list.html | 115 +++++++++--------- app/plugins/suggestions/views/admin/view.html | 31 +++-- app/plugins/suggestions/views/view.html | 4 +- app/plugins/wip/controllers/admin/wip.php | 2 +- app/plugins/wip/views/admin/create.html | 56 +++++++-- app/plugins/wip/views/admin/edit.html | 56 +++++++-- app/plugins/wip/views/admin/list.html | 85 ++++++------- app/plugins/wip/views/admin/view.html | 50 +++++++- bin/tempus_project.php | 8 +- 42 files changed, 1043 insertions(+), 693 deletions(-) create mode 100644 app/plugins/bookmarks/views/components/publicList.html create mode 100644 app/plugins/bookmarks/views/components/publicListRows.html create mode 100644 app/plugins/bookmarks/views/public/bookmark.html rename app/plugins/bookmarks/views/{shareFolder.html => public/folder.html} (82%) create mode 100644 app/plugins/members/views/admin/memberships/view.html diff --git a/.gitignore b/.gitignore index 2c74cbb..eaa41c2 100644 --- a/.gitignore +++ b/.gitignore @@ -56,7 +56,6 @@ Temporary Items .htaccess app/config/* !app/config/constants.php -uploads/images/* logs/* .vscode/ mail.log diff --git a/app/plugins/bookmarks/controllers/bookmarks.php b/app/plugins/bookmarks/controllers/bookmarks.php index 3b5cffe..27a1aa6 100644 --- a/app/plugins/bookmarks/controllers/bookmarks.php +++ b/app/plugins/bookmarks/controllers/bookmarks.php @@ -434,8 +434,11 @@ class Bookmarks extends Controller { } public function import() { - // echo '
';
-        
+        if ( !App::$isMember ) {
+            Issues::add( 'notice', 'You must have an active membership to import bookmarks.' );
+            return $this->index();
+        }
+
         if ( ! Input::exists('submit') ) {
             return Views::view( 'bookmarks.import' );
         }
@@ -489,6 +492,11 @@ class Bookmarks extends Controller {
     }
 
     public function export() {
+        if ( !App::$isMember ) {
+            Issues::add( 'notice', 'You must have an active membership to export bookmarks.' );
+            return $this->index();
+        }
+
         $folders = self::$folders->byUser();
 
         if ( ! Input::exists('submit') ) {
@@ -544,6 +552,35 @@ class Bookmarks extends Controller {
         }
     }
 
+    public function share( $id = '' ) {
+        $panelArray = [];
+        $folders = self::$folders->byUser();
+        if ( empty( $folders ) ) {
+            return Views::view( 'bookmarks.share' );
+        }
+        foreach ( $folders as $key => $folder ) {
+            $panel = new \stdClass();
+            $folderObject = new \stdClass();
+            if ( $folder->privacy == 'private' ) {
+                $links = self::$bookmarks->publicByFolder( $folder->ID );
+            } else {
+                $links = self::$bookmarks->byFolder( $folder->ID );
+            }
+            $folderObject->bookmarks = $links;
+
+            $folderObject->ID = $folder->ID;
+            $folderObject->uuid = $folder->uuid;
+            $folderObject->title = $folder->title;
+            $folderObject->color = $folder->color;
+            $folderObject->privacyBadge = $folder->privacyBadge;
+
+            $folderObject->bookmarkListRows = Views::simpleView( 'bookmarks.components.shareListRows', $folderObject->bookmarks );
+            $panel->panel = Views::simpleView( 'bookmarks.components.shareListPanel', [$folderObject] );
+            $panelArray[] = $panel;
+        }
+        return Views::view( 'bookmarks.share', $panelArray );
+    }
+
     private function exportFolder( $title, $editedAt, $createdAt, $links ) {
         $htmlDoc = '

'.$title.'

' . PHP_EOL; $htmlDoc .= '

' . PHP_EOL; @@ -561,37 +598,7 @@ class Bookmarks extends Controller { return $htmlDoc; } - public function share( $id = '' ) { - $panelArray = []; - $folders = self::$folders->byUser(); - foreach ( $folders as $key => $folder ) { - $panel = new \stdClass(); - $folderObject = new \stdClass(); - if ( $folder->privacy == 'private' ) { - $folderObject->privacyBadge = 'Private'; - $links = self::$bookmarks->publicByFolder( $folder->ID ); - } else { - $folderObject->privacyBadge = 'Public'; - $links = self::$bookmarks->byFolder( $folder->ID ); - } - $folderObject->bookmarks = $links; - - $folderObject->ID = $folder->ID; - $folderObject->uuid = $folder->uuid; - $folderObject->title = $folder->title; - $folderObject->color = $folder->color; - - - - $folderObject->bookmarkListRows = Views::simpleView( 'bookmarks.components.shareListRows', $folderObject->bookmarks ); - $panel->panel = Views::simpleView( 'bookmarks.components.shareListPanel', [$folderObject] ); - $panelArray[] = $panel; - } - return Views::view( 'bookmarks.share', $panelArray ); - } - - public function parseBookmarks($htmlContent) - { + private function parseBookmarks($htmlContent) { $started = false; $out = []; $currentFolder = []; diff --git a/app/plugins/bookmarks/controllers/shared.php b/app/plugins/bookmarks/controllers/shared.php index 55c4b72..322c709 100644 --- a/app/plugins/bookmarks/controllers/shared.php +++ b/app/plugins/bookmarks/controllers/shared.php @@ -35,29 +35,6 @@ class Shared extends Controller { Components::set( 'SITE_URL', Routes::getAddress() ); } - public function index() { - $bookmarks = self::$bookmarks->noFolder(); - $folders = self::$folders->byUser(); - - $panelArray = []; - if ( !empty( $folders ) ) { - foreach ( $folders as $folder ) { - $panel = new \stdClass(); - $folderObject = new \stdClass(); - $folderObject->bookmarks = self::$bookmarks->byFolder( $folder->ID ); - $folderObject->ID = $folder->ID; - $folderObject->title = $folder->title; - $folderObject->color = $folder->color; - $folderObject->bookmarkListRows = Views::simpleView( 'bookmarks.components.bookmarkListRows', $folderObject->bookmarks ); - $panelArray[] = $folderObject; - } - } - Components::set( 'foldersList', Views::simpleView( 'bookmarks.folders.list', $folders ) ); - Components::set( 'folderPanels', Views::simpleView( 'bookmarks.components.bookmarkListPanel', $panelArray ) ); - Components::set( 'bookmarksList', Views::simpleView( 'bookmarks.bookmarks.list', $bookmarks ) ); - return Views::view( 'bookmarks.dash' ); - } - public function shared( $type = '', $id = '' ) { if ( empty( $type ) ) { Session::flash( 'error', 'Unknown share' ); @@ -105,7 +82,7 @@ class Shared extends Controller { } } } - return Views::view( 'bookmarks.shareLink', $bookmark ); + return Views::view( 'bookmarks.public.bookmark', $bookmark ); } public function folder( $id = '' ) { @@ -122,6 +99,9 @@ class Shared extends Controller { Session::flash( 'error', 'Unknown share' ); return Redirect::to( 'home/index' ); } - return Views::view( 'bookmarks.shareFolder', $folder ); + $folder->bookmarks = self::$bookmarks->unsafeByFolder( $folder->ID ); + $folder->bookmarkListRows = Views::simpleView( 'bookmarks.components.publicListRows', $folder->bookmarks ); + $folder->panel = Views::simpleView( 'bookmarks.components.publicList', [$folder] ); + return Views::view( 'bookmarks.public.folder', $folder ); } } diff --git a/app/plugins/bookmarks/models/bookmarks.php b/app/plugins/bookmarks/models/bookmarks.php index 7c95374..9d289fa 100644 --- a/app/plugins/bookmarks/models/bookmarks.php +++ b/app/plugins/bookmarks/models/bookmarks.php @@ -42,7 +42,7 @@ class Bookmarks extends DatabaseModel { [ 'hiddenAt', 'int', '11' ], [ 'order', 'int', '11' ], [ 'linkType', 'varchar', '32' ], - [ 'uuid', 'char', '36' ], + [ 'uuid', 'uuid', '36' ], ]; /** @@ -132,6 +132,20 @@ class Bookmarks extends DatabaseModel { return $this->filter( $bookmarks->results() ); } + public function unsafeByFolder( $id, $limit = null ) { + $whereClause = [ 'folderID', '=', $id ]; + if ( empty( $limit ) ) { + $bookmarks = self::$db->get( $this->tableName, $whereClause ); + } else { + $bookmarks = self::$db->get( $this->tableName, $whereClause, 'ID', 'DESC', [0, $limit] ); + } + if ( !$bookmarks->count() ) { + Debug::info( 'No Bookmarks found.' ); + return false; + } + return $this->filter( $bookmarks->results() ); + } + public function byFolder( $id, $limit = null ) { $whereClause = ['createdBy', '=', App::$activeUser->ID, 'AND']; @@ -349,34 +363,48 @@ class Bookmarks extends DatabaseModel { $instance->iconHtml = ''; } } - + if ( $instance->privacy == 'private' ) { - $instance->privacyBadge = 'Private'; + $instance->privacyBadge = 'Private'; } else { - $instance->privacyBadge = 'Public'; + $instance->privacyBadge = 'Public'; + } + + if ( $instance->privacy == 'private' ) { + $instance->publish = ' + + + '; + } else { + $instance->publish = ' + + + '; } if ( empty( $instance->hiddenAt ) ) { $instance->hideBtn = ' - + '; } else { $instance->hideBtn = ' - + '; } + if ( empty( $instance->archivedAt ) ) { $instance->archiveBtn = ' - + '; } else { $instance->archiveBtn = ' - + '; } + if ( ! empty( $instance->refreshedAt ) && time() < ( $instance->refreshedAt + ( 60 * 10 ) ) ) { $instance->refreshBtn = ' @@ -445,6 +473,7 @@ class Bookmarks extends DatabaseModel { } return true; } + public function retract( $id ) { if ( !Check::id( $id ) ) { Debug::info( 'Bookmarks: illegal ID.' ); @@ -461,7 +490,6 @@ class Bookmarks extends DatabaseModel { return true; } - public function archive( $id ) { if ( !Check::id( $id ) ) { Debug::info( 'Bookmarks: illegal ID.' ); diff --git a/app/plugins/bookmarks/models/bookmarkviews.php b/app/plugins/bookmarks/models/bookmarkviews.php index 29a4e54..75fab4c 100644 --- a/app/plugins/bookmarks/models/bookmarkviews.php +++ b/app/plugins/bookmarks/models/bookmarkviews.php @@ -25,10 +25,20 @@ class Bookmarkviews extends DatabaseModel { [ 'title', 'varchar', '256' ], [ 'description', 'text', '' ], [ 'privacy', 'varchar', '48' ], + + + + + + + + + + [ 'createdBy', 'int', '11' ], [ 'createdAt', 'int', '11' ], [ 'updatedAt', 'int', '11' ], - [ 'uuid', 'char', '36' ], + [ 'uuid', 'text', '' ], ]; /** diff --git a/app/plugins/bookmarks/models/folders.php b/app/plugins/bookmarks/models/folders.php index d153783..a04b05a 100644 --- a/app/plugins/bookmarks/models/folders.php +++ b/app/plugins/bookmarks/models/folders.php @@ -29,7 +29,7 @@ class Folders extends DatabaseModel { [ 'folderID', 'int', '11' ], [ 'createdBy', 'int', '11' ], [ 'createdAt', 'int', '11' ], - [ 'uuid', 'char', '36' ], + [ 'uuid', 'text', '' ], ]; /** @@ -197,6 +197,13 @@ class Folders extends DatabaseModel { // Real Work Starts Here $instance->prettyPrivacy = ucfirst( $instance->privacy ); $instance->prettyTitle = ucfirst( $instance->title ); + + if ( $instance->privacy == 'private' ) { + $instance->privacyBadge = 'Private'; + } else { + $instance->privacyBadge = 'Public'; + } + // Real Work Ends Here $out[] = $instance; if ( !empty( $end ) ) { diff --git a/app/plugins/bookmarks/plugin.php b/app/plugins/bookmarks/plugin.php index 45b5b43..2eec9ac 100644 --- a/app/plugins/bookmarks/plugin.php +++ b/app/plugins/bookmarks/plugin.php @@ -43,6 +43,10 @@ class Bookmarks extends Plugin { 'url' => '{ROOT_URL}bookmarks/index', 'filter' => 'loggedin', ], + [ + 'text' => 'Extensions', + 'url' => '{ROOT_URL}extensions/index', + ], ]; public $configMatrix = [ 'enabled' => [ diff --git a/app/plugins/bookmarks/views/bookmarks/create.html b/app/plugins/bookmarks/views/bookmarks/create.html index 8069266..f4559a1 100644 --- a/app/plugins/bookmarks/views/bookmarks/create.html +++ b/app/plugins/bookmarks/views/bookmarks/create.html @@ -1,51 +1,56 @@ -

-

Add Bookmark

-
-
- -
- -
-
+
+
+ Add Bookmark +
+ +
+
+ +
+ +
+
-
- -
- -
-
+
+ +
+ +
+
-
- -
- -
-
- {folderSelect} -
- -
- -
-
-
- -
- {colorSelect} -
-
+
+ +
+ +
+
+ {folderSelect} +
+ +
+ +
+
+
+ +
+ {colorSelect} +
+
- - + + - -
- -
-
- \ No newline at end of file + +
+ +
+
+ + + \ No newline at end of file diff --git a/app/plugins/bookmarks/views/components/bookmarkListPanel.html b/app/plugins/bookmarks/views/components/bookmarkListPanel.html index a7f679f..8d10a9d 100644 --- a/app/plugins/bookmarks/views/components/bookmarkListPanel.html +++ b/app/plugins/bookmarks/views/components/bookmarkListPanel.html @@ -2,11 +2,11 @@
-
- {title} +
+ {title}
-
-
+
+
    {bookmarkListRows}
@@ -14,8 +14,8 @@
{/LOOP} {ALT} -
-

no folders

+
+

No folders found.

{/ALT} \ No newline at end of file diff --git a/app/plugins/bookmarks/views/components/bookmarkListRows.html b/app/plugins/bookmarks/views/components/bookmarkListRows.html index 9d83f3c..5410aff 100644 --- a/app/plugins/bookmarks/views/components/bookmarkListRows.html +++ b/app/plugins/bookmarks/views/components/bookmarkListRows.html @@ -1,18 +1,19 @@ {LOOP} -
  • +
  • {iconHtml} {title} {hideBtn} {archiveBtn} + {publish}
  • {/LOOP} {ALT} -
  • +
  • No Bookmarks

  • {/ALT} \ No newline at end of file diff --git a/app/plugins/bookmarks/views/components/publicList.html b/app/plugins/bookmarks/views/components/publicList.html new file mode 100644 index 0000000..4dc8c85 --- /dev/null +++ b/app/plugins/bookmarks/views/components/publicList.html @@ -0,0 +1,27 @@ +{LOOP} +
    +
    +
    + +
    +
    +
    {title}
    +
    +
    + +
    +
    +
      + {bookmarkListRows} +
    +
    +
    +
    +
    +
    +{/LOOP} +{ALT} +
    +

    no Folders

    +
    +{/ALT} \ No newline at end of file diff --git a/app/plugins/bookmarks/views/components/publicListRows.html b/app/plugins/bookmarks/views/components/publicListRows.html new file mode 100644 index 0000000..4ef72d5 --- /dev/null +++ b/app/plugins/bookmarks/views/components/publicListRows.html @@ -0,0 +1,30 @@ +{LOOP} +
  • + {iconHtml} + {title} + + + + + + +
  • +{/LOOP} +{ALT} +
  • +

    No Bookmarks

    +
  • +{/ALT} \ No newline at end of file diff --git a/app/plugins/bookmarks/views/components/shareListPanel.html b/app/plugins/bookmarks/views/components/shareListPanel.html index a38e767..1caabdc 100644 --- a/app/plugins/bookmarks/views/components/shareListPanel.html +++ b/app/plugins/bookmarks/views/components/shareListPanel.html @@ -2,35 +2,45 @@
    -
    - {title}{privacyBadge} - - - - +
    \ No newline at end of file diff --git a/app/plugins/members/views/manage.html b/app/plugins/members/views/manage.html index 11af213..a45cf86 100644 --- a/app/plugins/members/views/manage.html +++ b/app/plugins/members/views/manage.html @@ -29,7 +29,7 @@ - + diff --git a/app/plugins/reviews/views/admin/category.html b/app/plugins/reviews/views/admin/category.html index 9d4717a..32d1f0c 100644 --- a/app/plugins/reviews/views/admin/category.html +++ b/app/plugins/reviews/views/admin/category.html @@ -27,8 +27,8 @@
    diff --git a/app/plugins/suggestions/controllers/suggestions.php b/app/plugins/suggestions/controllers/suggestions.php index 1b843ce..8f2efcf 100644 --- a/app/plugins/suggestions/controllers/suggestions.php +++ b/app/plugins/suggestions/controllers/suggestions.php @@ -51,17 +51,24 @@ class Suggestions extends Controller { Issues::add( 'error', 'Suggestion not found.' ); return $this->index(); } - if ( empty( self::$comments ) ) { - self::$comments = new CommentsModel; - } + if ( Input::exists( 'contentId' ) ) { $this->comments( 'post', Input::post( 'contentId' ) ); } + Components::set( 'CONTENT_ID', $id ); Components::set( 'COMMENT_TYPE', 'suggestions' ); - Components::set( 'NEWCOMMENT', Views::simpleView( 'comments.create' ) ); - Components::set( 'count', self::$comments->count( 'suggestion', $id ) ); - Components::set( 'COMMENTS', Views::simpleView( 'comments.list', self::$comments->display( 10, self::$suggestions->tableName, $id ) ) ); + $plugin = new Comments; + if ( ! $plugin->checkEnabled() ) { + Components::set( 'NEWCOMMENT', '' ); + Components::set( 'count', '' ); + Components::set( 'COMMENTS', '' ); + } else { + $comments = new CommentsModel; + Components::set( 'count', $comments->count( 'suggestion', $id ) ); + Components::set( 'COMMENTS', Views::simpleView( 'comments.list', $comments->display( 10, self::$suggestions->tableName, $id ) ) ); + Components::set( 'NEWCOMMENT', Views::simpleView( 'comments.create' ) ); + } Views::view( 'suggestions.view', $data ); } @@ -98,36 +105,40 @@ class Suggestions extends Controller { } public function comments( $sub = null, $data = null ) { - if ( empty( self::$comments ) ) { - self::$comments = new CommentsModel; - } - $commentsPlugin = new Comments; if ( empty( $sub ) || empty( $data ) ) { - Session::flash( 'error', 'Whoops, try again.' ); - Redirect::to( 'suggestions' ); + Issues::add( 'error', 'There was an issue with your request. Please check the url and try again.' ); + return $this->index(); } + + $plugin = new Comments; + if ( ! $plugin->checkEnabled() ) { + Issues::add( 'error', 'Comments are disabled.' ); + return $this->index(); + } + switch ( $sub ) { case 'post': $content = self::$suggestions->findById( $data ); if ( empty( $content ) ) { - Session::flash( 'error', 'Unknown Content.' ); - Redirect::to( 'suggestions' ); + Issues::add( 'error', 'Unknown Content.' ); + return $this->index(); } - return $commentsPlugin->formPost( self::$suggestions->tableName, $content, 'suggestions/view/' ); + Redirect::to( 'suggestions' ); + return $plugin->formPost( self::$suggestions->tableName, $content, 'suggestions/view/' ); case 'edit': $content = self::$comments->findById( $data ); if ( empty( $content ) ) { - Session::flash( 'error', 'Unknown Comment.' ); - Redirect::to( 'suggestions' ); + Issues::add( 'error', 'Unknown Comment.' ); + return $this->index(); } - return $commentsPlugin->formEdit( self::$suggestions->tableName, $content, 'suggestions/view/' ); + return $plugin->formEdit( self::$suggestions->tableName, $content, 'suggestions/view/' ); case 'delete': $content = self::$comments->findById( $data ); if ( empty( $content ) ) { - Session::flash( 'error', 'Unknown Comment.' ); - Redirect::to( 'suggestions' ); + Issues::add( 'error', 'Unknown Comment.' ); + return $this->index(); } - return $commentsPlugin->formDelete( self::$suggestions->tableName, $content, 'suggestions/view/' ); + return $plugin->formDelete( self::$suggestions->tableName, $content, 'suggestions/view/' ); } } } \ No newline at end of file diff --git a/app/plugins/suggestions/views/admin/edit.html b/app/plugins/suggestions/views/admin/edit.html index 8346454..95e0976 100644 --- a/app/plugins/suggestions/views/admin/edit.html +++ b/app/plugins/suggestions/views/admin/edit.html @@ -1,22 +1,38 @@ -
    -
    -
    - - -
    +
    +
    + Edit Suggestion +
    + +
    +
    + +
    + +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    + +
    +
    + + + + + +
    + +
    +
    +
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    - - - \ No newline at end of file +
    \ No newline at end of file diff --git a/app/plugins/suggestions/views/admin/list.html b/app/plugins/suggestions/views/admin/list.html index de8686f..ca49b6a 100644 --- a/app/plugins/suggestions/views/admin/list.html +++ b/app/plugins/suggestions/views/admin/list.html @@ -1,56 +1,59 @@ -Suggestions -{PAGINATION} -
    - - - - - - - - - - - - - - - - - {LOOP} - - - - - - - - - - - - - {/LOOP} - {ALT} - - - - {/ALT} - -
    IDSuggestionSuggested OnSuggested ByApprovedApproved OnApproved By - -
    {ID}{suggestion}{DTC}{suggestedOn}{/DTC}{submittedBy}{approved}{DTC}{approvedOn}{/DTC}{approvedByName} - - - - - - - -
    - No results to show. -
    - -
    -
    -clear all \ No newline at end of file +
    + Suggestions +
    + {ADMIN_BREADCRUMBS} +
    + + + + + + + + + + + + + + + + + {LOOP} + + + + + + + + + + + + + {/LOOP} + {ALT} + + + + {/ALT} + +
    IDSuggestionSuggested OnSuggested ByApprovedApproved OnApproved By + +
    {ID}{suggestion}{DTC}{suggestedOn}{/DTC}{submittedBy}{approved}{DTC}{approvedOn}{/DTC}{approvedByName} + + + + + + + +
    + No results to show. +
    + +
    +
    + clear all +
    \ No newline at end of file diff --git a/app/plugins/suggestions/views/admin/view.html b/app/plugins/suggestions/views/admin/view.html index 0d044b3..788d9ea 100644 --- a/app/plugins/suggestions/views/admin/view.html +++ b/app/plugins/suggestions/views/admin/view.html @@ -1,17 +1,14 @@ -
    -
    -
    -

    Suggestion

    -
    - - {suggestion} - {ADMIN} -
    - Delete - Edit -
    - {/ADMIN} -
    - {COMMENTS} -
    -
    \ No newline at end of file +
    + Suggestion: {title} +
    + {ADMIN_BREADCRUMBS} + + {suggestion} + {ADMIN} +
    + + +
    + {/ADMIN} + {COMMENTS} +
    \ No newline at end of file diff --git a/app/plugins/suggestions/views/view.html b/app/plugins/suggestions/views/view.html index fc3f097..985d782 100644 --- a/app/plugins/suggestions/views/view.html +++ b/app/plugins/suggestions/views/view.html @@ -8,8 +8,8 @@ {suggestion} {ADMIN}
    - Delete - Edit + +
    {/ADMIN}
    diff --git a/app/plugins/wip/controllers/admin/wip.php b/app/plugins/wip/controllers/admin/wip.php index b40f383..6c4ddb4 100644 --- a/app/plugins/wip/controllers/admin/wip.php +++ b/app/plugins/wip/controllers/admin/wip.php @@ -28,7 +28,7 @@ class Wip extends AdminController { public function __construct() { parent::__construct(); self::$projects = new Projects; - self::$title = 'Admin - Projects'; + self::$title = 'Admin - WIP'; $view = Navigation::activePageSelect( 'nav.admin', '/admin/wip' ); Components::set( 'ADMINNAV', $view ); } diff --git a/app/plugins/wip/views/admin/create.html b/app/plugins/wip/views/admin/create.html index c730ee3..6812650 100644 --- a/app/plugins/wip/views/admin/create.html +++ b/app/plugins/wip/views/admin/create.html @@ -1,16 +1,48 @@ -

    Create Project

    -
    -
    -

    +
    + Add WIP +
    + {ADMIN_BREADCRUMBS} + +
    + +
    + +
    + +
    +
    -
    -

    + +
    + +
    + +
    +
    -
    -

    + +
    + +
    + +
    +
    -
    -

    + +
    + +
    + +
    +
    - - \ No newline at end of file + + + + +
    + +
    +
    + +
    \ No newline at end of file diff --git a/app/plugins/wip/views/admin/edit.html b/app/plugins/wip/views/admin/edit.html index fa82c9f..0b86d90 100644 --- a/app/plugins/wip/views/admin/edit.html +++ b/app/plugins/wip/views/admin/edit.html @@ -1,16 +1,48 @@ -

    Edit Project

    -
    -
    -

    +
    + Edit WIP +
    + {ADMIN_BREADCRUMBS} + +
    + +
    + +
    + +
    +
    -
    -

    + +
    + +
    + +
    +
    -
    -

    + +
    + +
    + +
    +
    -
    -

    + +
    + +
    + +
    +
    - - \ No newline at end of file + + + + +
    + +
    +
    + +
    \ No newline at end of file diff --git a/app/plugins/wip/views/admin/list.html b/app/plugins/wip/views/admin/list.html index 01fd1ce..1ecef7c 100644 --- a/app/plugins/wip/views/admin/list.html +++ b/app/plugins/wip/views/admin/list.html @@ -1,41 +1,44 @@ -Works in Progress -{PAGINATION} -
    - - - - - - - - - - - - - {LOOP} - - - - - - - - - {/LOOP} - {ALT} - - - - {/ALT} - -
    TitleProgressStart Date - -
    {title}{progress}{startDate} - -
    - No results to show. -
    - Create - -
    \ No newline at end of file +
    + Works in Progress +
    + {ADMIN_BREADCRUMBS} +
    + + + + + + + + + + + + + {LOOP} + + + + + + + + + {/LOOP} + {ALT} + + + + {/ALT} + +
    TitleProgressStart Date + +
    {title}{progress}{startDate} + +
    + No results to show. +
    + Create + +
    +
    \ No newline at end of file diff --git a/app/plugins/wip/views/admin/view.html b/app/plugins/wip/views/admin/view.html index 24e8a7c..657f93a 100644 --- a/app/plugins/wip/views/admin/view.html +++ b/app/plugins/wip/views/admin/view.html @@ -1,8 +1,46 @@ -WIP -
    -

    {name}

    -

    {position} from {prettyStart} to {prettyEnd}

    -
    - {details} +
    +
    +
    + {ADMIN_BREADCRUMBS} +
    + +
    +

    {title}

    +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + +
    Title{title}
    Progress{progress}
    Started:{DTC}{startDate}{/DTC}
    Description{description}
    +
    +
    + + + +
    +
    \ No newline at end of file diff --git a/bin/tempus_project.php b/bin/tempus_project.php index 384cf18..57badf6 100644 --- a/bin/tempus_project.php +++ b/bin/tempus_project.php @@ -137,19 +137,15 @@ class TheTempusProject extends Bedrock { ]; public $main_links = [ [ - 'text' => 'Home', + 'text' => 'About', 'url' => '{ROOT_URL}home/index', + 'filter' => 'notloggedin', ], [ 'text' => 'Admin', 'url' => '{ROOT_URL}admin/index', 'filter' => 'admin', ], - [ - 'text' => 'Extensions', - 'url' => '{ROOT_URL}extensions/index', - // 'filter' => 'notloggedin', - ], ]; public $filters = [ [