Adds the admin filters at the top of the page.

This commit is contained in:
Llewellyn van der Merwe 2021-02-08 12:29:37 +02:00
parent 9e2e5e6583
commit 8ee0fcffc0
Signed by: Llewellyn
GPG Key ID: EFC0C720A240551C
84 changed files with 306 additions and 153 deletions

View File

@ -10,7 +10,7 @@ Just a basic demo of the most basic implementations of the [Joomla](http://www.j
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Demo](https://www.vdm.io/)
+ *First Build*: 18th October, 2016
+ *Last Build*: 6th January, 2021
+ *Last Build*: 8th February, 2021
+ *Version*: 2.0.3
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -23,11 +23,11 @@ due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **16679**
+ *File count*: **154**
+ *Line count*: **16831**
+ *File count*: **156**
+ *Folder count*: **57**
**30 Hours** or **4 Eight Hour Days** (the actual time the author spent)
**31 Hours** or **4 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @12hours** = codingtime / 4;
@ -35,7 +35,7 @@ due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder
> **mapping @5hours** = codingtime / 10;
> **office @8hours** = codingtime / 6;)
**77 Hours** or **10 Eight Hour Days**
**78 Hours** or **10 Eight Hour Days**
(a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,

View File

@ -10,7 +10,7 @@ Just a basic demo of the most basic implementations of the [Joomla](http://www.j
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Demo](https://www.vdm.io/)
+ *First Build*: 18th October, 2016
+ *Last Build*: 6th January, 2021
+ *Last Build*: 8th February, 2021
+ *Version*: 2.0.3
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
@ -23,11 +23,11 @@ due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **16679**
+ *File count*: **154**
+ *Line count*: **16831**
+ *File count*: **156**
+ *Folder count*: **57**
**30 Hours** or **4 Eight Hour Days** (the actual time the author spent)
**31 Hours** or **4 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @12hours** = codingtime / 4;
@ -35,7 +35,7 @@ due to [Automated Component Builder](https://www.vdm.io/joomla-component-builder
> **mapping @5hours** = codingtime / 10;
> **office @8hours** = codingtime / 6;)
**77 Hours** or **10 Eight Hour Days**
**78 Hours** or **10 Eight Hour Days**
(a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage admin.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage dashboard.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage look.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage looks.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage admin.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage controller.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage import.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage looks.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage headercheck.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage batch_.php

View File

@ -1,5 +1,6 @@
COM_DEMO="Demo"
COM_DEMO_ARCHIVED="Archived"
COM_DEMO_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS="Are you sure you want to delete? Confirming will permanently delete the selected item(s)!"
COM_DEMO_AUTHOR="Author"
COM_DEMO_BACK="Back"
COM_DEMO_CLOSE_NEW="Close & New"
@ -51,9 +52,20 @@ COM_DEMO_EDIT_CREATED_DATE_DESC="Allows users in this group to edit created date
COM_DEMO_EDIT_S="Edit %s"
COM_DEMO_EDIT_VERSIONS="Edit Version"
COM_DEMO_EDIT_VERSIONS_DESC="Allows users in this group to edit versions."
COM_DEMO_EMPTY_TRASH="Empty trash"
COM_DEMO_EXIT_TRASH="Exit trash"
COM_DEMO_EXPORT_DATA="Export Data"
COM_DEMO_EXPORT_DATA_DESC="Allows users in this group to export data."
COM_DEMO_EXPORT_FAILED="Export Failed"
COM_DEMO_FILTER_DESCRIPTION_ASCENDING="Description ascending"
COM_DEMO_FILTER_DESCRIPTION_DESCENDING="Description descending"
COM_DEMO_FILTER_NAME_ASCENDING="Name ascending"
COM_DEMO_FILTER_NAME_DESCENDING="Name descending"
COM_DEMO_FILTER_PUBLISHED="Status"
COM_DEMO_FILTER_PUBLISHED_LOOKS="Status options for looks"
COM_DEMO_FILTER_SEARCH="Searchlooks"
COM_DEMO_FILTER_SEARCH_LOOKS="Search the look items. Prefix with ID: to search for an item by ID."
COM_DEMO_FILTER_SELECT_ACCESS="Select Access"
COM_DEMO_HELP_MANAGER="Help"
COM_DEMO_IMPORT_CONTINUE="Continue"
COM_DEMO_IMPORT_DATA="Import Data"
@ -157,34 +169,27 @@ COM_DEMO_LOOKS_PRIVACY_DELETE="Looks Privacy Delete"
COM_DEMO_LOOKS_PRIVACY_DELETE_DESC="Allows the users in this group to remove their personal data in Looks via the Joomla privacy suite."
COM_DEMO_LOOKS_SUBMENU="Looks Submenu"
COM_DEMO_LOOKS_SUBMENU_DESC="Allows the users in this group to submenu of look"
COM_DEMO_LOOK_ADD="Add"
COM_DEMO_LOOK_ADD_LABEL="Add More"
COM_DEMO_LOOK_ALIAS="Alias"
COM_DEMO_LOOK_ALIAS_HINT="Auto-generated from name"
COM_DEMO_LOOK_ALIAS_LABEL="Alias"
COM_DEMO_LOOK_CREATED_BY_DESC="The user that created this Look."
COM_DEMO_LOOK_CREATED_BY_LABEL="Created By"
COM_DEMO_LOOK_CREATED_DATE_DESC="The date this Look was created."
COM_DEMO_LOOK_CREATED_DATE_LABEL="Created Date"
COM_DEMO_LOOK_DATEOFBIRTH="Dateofbirth"
COM_DEMO_LOOK_DATEOFBIRTH_DESCRIPTION="Your date of birth"
COM_DEMO_LOOK_DATEOFBIRTH_LABEL="Date of Birth"
COM_DEMO_LOOK_DESCRIPTION="Description"
COM_DEMO_LOOK_DESCRIPTION_DESCRIPTION="Add Description Here"
COM_DEMO_LOOK_DESCRIPTION_HINT="Add Description Here"
COM_DEMO_LOOK_DESCRIPTION_LABEL="Description"
COM_DEMO_LOOK_DETAILS="Details"
COM_DEMO_LOOK_EDIT="Editing the Look"
COM_DEMO_LOOK_EMAIL="Email"
COM_DEMO_LOOK_EMAIL_DESCRIPTION="Enter Email"
COM_DEMO_LOOK_EMAIL_HINT="demo@example.com"
COM_DEMO_LOOK_EMAIL_LABEL="Email"
COM_DEMO_LOOK_EMAIL_MESSAGE="Error! Please add email address here."
COM_DEMO_LOOK_ERROR_UNIQUE_ALIAS="Another Look has the same alias."
COM_DEMO_LOOK_ID="Id"
COM_DEMO_LOOK_IMAGE="Image"
COM_DEMO_LOOK_IMAGE_LABEL="Image"
COM_DEMO_LOOK_MOBILE_PHONE="Mobile Phone"
COM_DEMO_LOOK_MOBILE_PHONE_DESCRIPTION="Enter Mobile Phone Number"
COM_DEMO_LOOK_MOBILE_PHONE_HINT="Mobile Phone Here"
COM_DEMO_LOOK_MOBILE_PHONE_LABEL="Mobile Phone"
@ -194,7 +199,6 @@ COM_DEMO_LOOK_MODIFIED_BY_LABEL="Modified By"
COM_DEMO_LOOK_MODIFIED_DATE_DESC="The date this Look was modified."
COM_DEMO_LOOK_MODIFIED_DATE_LABEL="Modified Date"
COM_DEMO_LOOK_MORE="More"
COM_DEMO_LOOK_NAME="Name"
COM_DEMO_LOOK_NAME_DESCRIPTION="Enter Name Here"
COM_DEMO_LOOK_NAME_HINT="Name Here"
COM_DEMO_LOOK_NAME_LABEL="Name"
@ -209,7 +213,6 @@ COM_DEMO_LOOK_SAVE_WARNING="Alias already existed so a number was added at the e
COM_DEMO_LOOK_STATUS="Status"
COM_DEMO_LOOK_VERSION_DESC="A count of the number of times this Look has been revised."
COM_DEMO_LOOK_VERSION_LABEL="Version"
COM_DEMO_LOOK_WEBSITE="Website"
COM_DEMO_LOOK_WEBSITE_DESCRIPTION="Enter website address"
COM_DEMO_LOOK_WEBSITE_HINT="http://www.example.com"
COM_DEMO_LOOK_WEBSITE_LABEL="Website"
@ -226,8 +229,12 @@ COM_DEMO_SUBMENU_LOOKS="Looks"
COM_DEMO_SUBMENU_LOOKS_FIELDS="Looks Fields"
COM_DEMO_SUBMENU_LOOKS_FIELDS_GROUPS="Looks Field Groups"
COM_DEMO_TRASHED="Trashed"
COM_DEMO_TRASHED_ITEMS="Trashed items"
COM_DEMO_TRASH_AREA="Trash Area"
COM_DEMO_TYPE_LOOK="Look"
COM_DEMO_USE_BATCH="Use Batch"
COM_DEMO_USE_BATCH_DESC="Allows users in this group to use batch copy/update method."
COM_DEMO_VERSION="Version"
COM_DEMO_WEBSITE="Website"
COM_DEMO_WEBSITE="Website"
COM_DEMO_YOU_ARE_CURRENTLY_VIEWING_THE_TRASHED_ITEMS="You are currently viewing the trashed items."
COM_DEMO_YOU_ARE_CURRENTLY_VIEWING_THE_TRASH_AREA_AND_YOU_DONT_HAVE_ANY_ITEMS_IN_TRASH_AT_THE_MOMENT="You are currently viewing the trash area, and you don't have any items in trash at the moment!"

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage batchselection.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage details_above.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage details_fullwidth.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage details_under.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage metadata.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage more_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage more_right.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage publishing.php

View File

@ -0,0 +1,82 @@
<?php
/*----------------------------------------------------------------------------------| www.vdm.io |----/
Vast Development Method
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage trashhelper.php
@author Llewellyn van der Merwe <https://www.vdm.io/>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
/------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('JPATH_BASE') or die('Restricted access');
?>
<?php if ($displayData->state->get('filter.published') == -2 && ($displayData->canState && $displayData->canDelete)) : ?>
<script>
// change the class of the delete button
jQuery("#toolbar-delete button").toggleClass("btn-danger");
// function to empty the trash
function emptyTrash() {
if (document.adminForm.boxchecked.value == 0) {
// select all the items visable
document.adminForm.elements['checkall-toggle'].checked=1;
Joomla.checkAll(document.adminForm.elements['checkall-toggle']);
// check to confirm the deletion
if(confirm('<?= JText::_("COM_DEMO_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
Joomla.submitbutton('<?= $displayData->get("name") ?>.delete');
} else {
document.adminForm.elements['checkall-toggle'].checked=0;
Joomla.checkAll(document.adminForm.elements['checkall-toggle']);
}
} else {
// confirm deletion of those selected
if (confirm('<?= JText::_("COM_DEMO_ARE_YOU_SURE_YOU_WANT_TO_DELETE_CONFIRMING_WILL_PERMANENTLY_DELETE_THE_SELECTED_ITEMS") ?>')) {
Joomla.submitbutton('<?= $displayData->get("name") ?>.delete');
};
}
return false;
}
// function to exit the tash state
function exitTrash() {
document.adminForm.filter_published.selectedIndex = 0;
document.adminForm.submit();
return false;
}
</script>
<div class="alert alert-error">
<?php if (empty($displayData->items)): ?>
<h4 class="alert-heading">
<span class="icon-trash"></span>
<?= JText::_("COM_DEMO_TRASH_AREA") ?>
</h4>
<p><?= JText::_("COM_DEMO_YOU_ARE_CURRENTLY_VIEWING_THE_TRASH_AREA_AND_YOU_DONT_HAVE_ANY_ITEMS_IN_TRASH_AT_THE_MOMENT") ?></p>
<?php else: ?>
<h4 class="alert-heading">
<span class="icon-trash"></span>
<?= JText::_("COM_DEMO_TRASHED_ITEMS") ?>
</h4>
<p><?= JText::_("COM_DEMO_YOU_ARE_CURRENTLY_VIEWING_THE_TRASHED_ITEMS") ?></p>
<button onclick="emptyTrash();" class="btn btn-small btn-danger">
<span class="icon-delete" aria-hidden="true"></span>
<?= JText::_("COM_DEMO_EMPTY_TRASH") ?>
</button>
<?php endif; ?>
<button onclick="exitTrash();" class="btn btn-small">
<span class="icon-back" aria-hidden="true"></span>
<?= JText::_("COM_DEMO_EXIT_TRASH") ?>
</button>
</div>
<?php endif; ?>

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage demo.php

View File

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<form
addrulepath="/administrator/components/com_demo/models/rules"
addfieldpath="/administrator/components/com_demo/models/fields"
>
<fields name="filter">
<field
type="text"
name="search"
inputmode="search"
label="COM_DEMO_FILTER_SEARCH"
description="COM_DEMO_FILTER_SEARCH_LOOKS"
hint="JSEARCH_FILTER"
/>
<field
type="status"
name="published"
label="COM_DEMO_FILTER_PUBLISHED"
description="COM_DEMO_FILTER_PUBLISHED_LOOKS"
onchange="this.form.submit();"
>
<option value="">JOPTION_SELECT_PUBLISHED</option>
</field>
<field
type="accesslevel"
name="access"
label="JFIELD_ACCESS_LABEL"
description="JFIELD_ACCESS_DESC"
multiple="true"
class="multipleAccessLevels"
onchange="this.form.submit();"
/>
<input type="hidden" name="form_submited" value="1"/>
</fields>
<fields name="list">
<field
name="fullordering"
type="list"
label="COM_CONTENT_LIST_FULL_ORDERING"
description="COM_CONTENT_LIST_FULL_ORDERING_DESC"
onchange="this.form.submit();"
default="a.id DESC"
validate="options"
>
<option value="">JGLOBAL_SORT_BY</option>
<option value="a.ordering ASC">JGRID_HEADING_ORDERING_ASC</option>
<option value="a.ordering DESC">JGRID_HEADING_ORDERING_DESC</option>
<option value="a.published ASC">JSTATUS_ASC</option>
<option value="a.published DESC">JSTATUS_DESC</option>
<option value="a.name ASC">COM_DEMO_FILTER_NAME_ASCENDING</option>
<option value="a.name DESC">COM_DEMO_FILTER_NAME_DESCENDING</option>
<option value="a.description ASC">COM_DEMO_FILTER_DESCRIPTION_ASCENDING</option>
<option value="a.description DESC">COM_DEMO_FILTER_DESCRIPTION_DESCENDING</option>
<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
</field>
<field
name="limit"
type="limitbox"
label="COM_CONTENT_LIST_LIMIT"
description="COM_CONTENT_LIST_LIMIT_DESC"
class="input-mini"
default="25"
onchange="this.form.submit();"
/>
</fields>
</form>

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage look.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage import.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage looks.php
@ -68,8 +68,15 @@ class DemoModelLooks extends JModelList
$this->context .= '.' . $layout;
}
// Check if the form was submitted
$formSubmited = $app->input->post->get('form_submited');
$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int');
$this->setState('filter.access', $access);
if ($formSubmited)
{
$access = $app->input->post->get('access');
$this->setState('filter.access', $access);
}
$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', '');
$this->setState('filter.published', $published);
@ -87,10 +94,18 @@ class DemoModelLooks extends JModelList
$this->setState('filter.search', $search);
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
$this->setState('filter.name', $name);
if ($formSubmited)
{
$name = $app->input->post->get('name');
$this->setState('filter.name', $name);
}
$description = $this->getUserStateFromRequest($this->context . '.filter.description', 'filter_description');
$this->setState('filter.description', $description);
if ($formSubmited)
{
$description = $app->input->post->get('description');
$this->setState('filter.description', $description);
}
// List state information.
parent::populateState($ordering, $direction);
@ -439,7 +454,18 @@ class DemoModelLooks extends JModelList
$id .= ':' . $this->getState('filter.id');
$id .= ':' . $this->getState('filter.search');
$id .= ':' . $this->getState('filter.published');
$id .= ':' . $this->getState('filter.access');
// Check if the value is an array
$_access = $this->getState('filter.access');
if (DemoHelper::checkArray($_access))
{
$id .= ':' . implode(':', $_access);
}
// Check if this is only an number or string
elseif (is_numeric($_access)
|| DemoHelper::checkString($_access))
{
$id .= ':' . $_access;
}
$id .= ':' . $this->getState('filter.ordering');
$id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by');

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage default_main.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage default_vdm.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage view.html.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage submitbutton.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage edit.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage default.php
@ -24,6 +24,7 @@ defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('dropdown.init');
JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_DEMO_FILTER_SELECT_ACCESS') . ' -'));
JHtml::_('formbehavior.chosen', 'select');
if ($this->saveOrder)
{
@ -31,23 +32,6 @@ if ($this->saveOrder)
JHtml::_('sortablelist.sortable', 'lookList', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
}
?>
<script type="text/javascript">
Joomla.orderTable = function()
{
table = document.getElementById("sortTable");
direction = document.getElementById("directionTable");
order = table.options[table.selectedIndex].value;
if (order != '<?php echo $this->listOrder; ?>')
{
dirn = 'asc';
}
else
{
dirn = direction.options[direction.selectedIndex].value;
}
Joomla.tableOrdering(order, dirn, '');
}
</script>
<form action="<?php echo JRoute::_('index.php?option=com_demo&view=looks'); ?>" method="post" name="adminForm" id="adminForm">
<?php if(!empty( $this->sidebar)): ?>
<div id="j-sidebar-container" class="span2">
@ -57,13 +41,17 @@ if ($this->saveOrder)
<?php else : ?>
<div id="j-main-container">
<?php endif; ?>
<?php
// Add the trash helper layout
echo JLayoutHelper::render('trashhelper', $this);
// Add the searchtools
echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this));
?>
<?php if (empty($this->items)): ?>
<?php echo $this->loadTemplate('toolbar');?>
<div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php else : ?>
<?php echo $this->loadTemplate('toolbar');?>
<table class="table table-striped" id="lookList">
<thead><?php echo $this->loadTemplate('head');?></thead>
<tfoot><?php echo $this->loadTemplate('foot');?></tfoot>
@ -81,8 +69,6 @@ if ($this->saveOrder)
$this->loadTemplate('batch_body')
); ?>
<?php endif; ?>
<input type="hidden" name="filter_order" value="<?php echo $this->listOrder; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->listDirn; ?>" />
<input type="hidden" name="boxchecked" value="0" />
</div>
<?php endif; ?>

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage default_batch_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage default_batch_footer.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage default_body.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage default_foot.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage default_head.php
@ -25,7 +25,7 @@ defined('_JEXEC') or die('Restricted access');
<tr>
<?php if ($this->canEdit&& $this->canState): ?>
<th width="1%" class="nowrap center hidden-phone">
<?php echo JHtml::_('grid.sort', '<i class="icon-menu-2"></i>', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?>
<?php echo JHtml::_('searchtools.sort', '', 'a.ordering', $this->listDirn, $this->listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
</th>
<th width="20" class="nowrap center">
<?php echo JHtml::_('grid.checkall'); ?>
@ -39,14 +39,14 @@ defined('_JEXEC') or die('Restricted access');
</th>
<?php endif; ?>
<th class="nowrap" >
<?php echo JHtml::_('grid.sort', 'COM_DEMO_LOOK_NAME_LABEL', 'a.name', $this->listDirn, $this->listOrder); ?>
<?php echo JHtml::_('searchtools.sort', 'COM_DEMO_LOOK_NAME_LABEL', 'a.name', $this->listDirn, $this->listOrder); ?>
</th>
<th class="nowrap hidden-phone" >
<?php echo JHtml::_('grid.sort', 'COM_DEMO_LOOK_DESCRIPTION_LABEL', 'a.description', $this->listDirn, $this->listOrder); ?>
<?php echo JHtml::_('searchtools.sort', 'COM_DEMO_LOOK_DESCRIPTION_LABEL', 'a.description', $this->listDirn, $this->listOrder); ?>
</th>
<?php if ($this->canState): ?>
<th width="10" class="nowrap center" >
<?php echo JHtml::_('grid.sort', 'COM_DEMO_LOOK_STATUS', 'a.published', $this->listDirn, $this->listOrder); ?>
<?php echo JHtml::_('searchtools.sort', 'COM_DEMO_LOOK_STATUS', 'a.published', $this->listDirn, $this->listOrder); ?>
</th>
<?php else: ?>
<th width="10" class="nowrap center" >
@ -54,6 +54,6 @@ defined('_JEXEC') or die('Restricted access');
</th>
<?php endif; ?>
<th width="5" class="nowrap center hidden-phone" >
<?php echo JHtml::_('grid.sort', 'COM_DEMO_LOOK_ID', 'a.id', $this->listDirn, $this->listOrder); ?>
<?php echo JHtml::_('searchtools.sort', 'COM_DEMO_LOOK_ID', 'a.id', $this->listDirn, $this->listOrder); ?>
</th>
</tr>

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage default_toolbar.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage view.html.php
@ -43,6 +43,10 @@ class DemoViewLooks extends JViewLegacy
$this->pagination = $this->get('Pagination');
$this->state = $this->get('State');
$this->user = JFactory::getUser();
// Load the filter form from xml.
$this->filterForm = $this->get('FilterForm');
// Load the active filters.
$this->activeFilters = $this->get('ActiveFilters');
// Add the list ordering clause.
$this->listOrder = $this->escape($this->state->get('list.ordering', 'a.id'));
$this->listDirn = $this->escape($this->state->get('list.direction', 'DESC'));
@ -163,22 +167,6 @@ class DemoViewLooks extends JViewLegacy
JToolBarHelper::preferences('com_demo');
}
// Only load publish filter if state change is allowed
if ($this->canState)
{
JHtmlSidebar::addFilter(
JText::_('JOPTION_SELECT_PUBLISHED'),
'filter_published',
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true)
);
}
JHtmlSidebar::addFilter(
JText::_('JOPTION_SELECT_ACCESS'),
'filter_access',
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'))
);
// Only load published batch if state and batch is allowed
if ($this->canState && $this->canBatch)
{

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade">
<name>COM_DEMO</name>
<creationDate>6th January, 2021</creationDate>
<creationDate>8th February, 2021</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://www.vdm.io/</authorUrl>

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage script.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage look.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage looking.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage looks.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage site.css

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage site.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage controller.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage category.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage demo.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage headercheck.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage route.php

View File

@ -6,6 +6,10 @@ COM_DEMO_DESCRIPTION="Description"
COM_DEMO_EDIT_LOOK="Edit Look"
COM_DEMO_EDIT_S="Edit %s"
COM_DEMO_EMAIL="Email"
COM_DEMO_FILTER_DESCRIPTION_ASCENDING="Description ascending"
COM_DEMO_FILTER_DESCRIPTION_DESCENDING="Description descending"
COM_DEMO_FILTER_NAME_ASCENDING="Name ascending"
COM_DEMO_FILTER_NAME_DESCENDING="Name descending"
COM_DEMO_HITS="Hits"
COM_DEMO_LIST_OF_ALL_LOOKS="List of all looks"
COM_DEMO_LOOK="Look"
@ -34,33 +38,26 @@ COM_DEMO_LOOKS_N_ITEMS_UNFEATURED="%s Looks unfeatured."
COM_DEMO_LOOKS_N_ITEMS_UNFEATURED_1="%s Look unfeatured."
COM_DEMO_LOOKS_N_ITEMS_UNPUBLISHED="%s Looks unpublished."
COM_DEMO_LOOKS_N_ITEMS_UNPUBLISHED_1="%s Look unpublished."
COM_DEMO_LOOK_ADD="Add"
COM_DEMO_LOOK_ADD_LABEL="Add More"
COM_DEMO_LOOK_ALIAS="Alias"
COM_DEMO_LOOK_ALIAS_HINT="Auto-generated from name"
COM_DEMO_LOOK_ALIAS_LABEL="Alias"
COM_DEMO_LOOK_CREATED_BY_DESC="The user that created this Look."
COM_DEMO_LOOK_CREATED_BY_LABEL="Created By"
COM_DEMO_LOOK_CREATED_DATE_DESC="The date this Look was created."
COM_DEMO_LOOK_CREATED_DATE_LABEL="Created Date"
COM_DEMO_LOOK_DATEOFBIRTH="Dateofbirth"
COM_DEMO_LOOK_DATEOFBIRTH_DESCRIPTION="Your date of birth"
COM_DEMO_LOOK_DATEOFBIRTH_LABEL="Date of Birth"
COM_DEMO_LOOK_DESCRIPTION="Description"
COM_DEMO_LOOK_DESCRIPTION_DESCRIPTION="Add Description Here"
COM_DEMO_LOOK_DESCRIPTION_HINT="Add Description Here"
COM_DEMO_LOOK_DESCRIPTION_LABEL="Description"
COM_DEMO_LOOK_DETAILS="Details"
COM_DEMO_LOOK_EDIT="Editing the Look"
COM_DEMO_LOOK_EMAIL="Email"
COM_DEMO_LOOK_EMAIL_DESCRIPTION="Enter Email"
COM_DEMO_LOOK_EMAIL_HINT="demo@example.com"
COM_DEMO_LOOK_EMAIL_LABEL="Email"
COM_DEMO_LOOK_EMAIL_MESSAGE="Error! Please add email address here."
COM_DEMO_LOOK_ERROR_UNIQUE_ALIAS="Another Look has the same alias."
COM_DEMO_LOOK_IMAGE="Image"
COM_DEMO_LOOK_IMAGE_LABEL="Image"
COM_DEMO_LOOK_MOBILE_PHONE="Mobile Phone"
COM_DEMO_LOOK_MOBILE_PHONE_DESCRIPTION="Enter Mobile Phone Number"
COM_DEMO_LOOK_MOBILE_PHONE_HINT="Mobile Phone Here"
COM_DEMO_LOOK_MOBILE_PHONE_LABEL="Mobile Phone"
@ -70,7 +67,6 @@ COM_DEMO_LOOK_MODIFIED_BY_LABEL="Modified By"
COM_DEMO_LOOK_MODIFIED_DATE_DESC="The date this Look was modified."
COM_DEMO_LOOK_MODIFIED_DATE_LABEL="Modified Date"
COM_DEMO_LOOK_MORE="More"
COM_DEMO_LOOK_NAME="Name"
COM_DEMO_LOOK_NAME_DESCRIPTION="Enter Name Here"
COM_DEMO_LOOK_NAME_HINT="Name Here"
COM_DEMO_LOOK_NAME_LABEL="Name"
@ -84,7 +80,6 @@ COM_DEMO_LOOK_PUBLISHING="Publishing"
COM_DEMO_LOOK_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Look to customise the alias."
COM_DEMO_LOOK_VERSION_DESC="A count of the number of times this Look has been revised."
COM_DEMO_LOOK_VERSION_LABEL="Version"
COM_DEMO_LOOK_WEBSITE="Website"
COM_DEMO_LOOK_WEBSITE_DESCRIPTION="Enter website address"
COM_DEMO_LOOK_WEBSITE_HINT="http://www.example.com"
COM_DEMO_LOOK_WEBSITE_LABEL="Website"

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage details_above.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage details_fullwidth.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage details_under.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage metadata.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage more_left.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage more_right.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage publishing.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage look.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage look.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage looking.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage looks.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage router.php

View File

@ -3,7 +3,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage submitbutton.js

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage edit.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage view.html.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage default.php

View File

@ -4,7 +4,7 @@
/-------------------------------------------------------------------------------------------------------/
@version 2.0.3
@build 6th January, 2021
@build 8th February, 2021
@created 18th October, 2016
@package Demo
@subpackage view.html.php