Skip to content

Commit

Permalink
Refactor admin files list to standard list view
Browse files Browse the repository at this point in the history
  • Loading branch information
billtomczak committed Sep 11, 2019
1 parent 6eb140b commit a4c0309
Show file tree
Hide file tree
Showing 10 changed files with 585 additions and 705 deletions.
18 changes: 11 additions & 7 deletions src/admin/include.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* along with OSDownloads. If not, see <http://www.gnu.org/licenses/>.
*/

use Alledia\Framework\AutoLoader;
use Alledia\Framework\Joomla\Extension;
use Alledia\OSDownloads\Free\Factory;

Expand All @@ -45,22 +46,25 @@
// Define the constant that say OSDownloads is ok to run
define('OSDOWNLOADS_LOADED', 1);

define('OSDOWNLOADS_MEDIA_PATH', JPATH_SITE . 'media/com_osdownloads');
define('OSDOWNLOADS_MEDIA_URI', JUri::root() . 'media/com_osdownloads');
define('OSDOWNLOADS_ADMIN', JPATH_ADMINISTRATOR . '/components/com_osdownloads');
define('OSDOWNLOADS_SITE', JPATH_SITE . '/components/com_osdownloads');
define('OSDOWNLOADS_LIBRARY', OSDOWNLOADS_ADMIN . '/library');
define('OSDOWNLOADS_MEDIA', JPATH_SITE . '/media/com_osdownloads');

Extension\Helper::loadLibrary('com_osdownloads');

require_once JPATH_ADMINISTRATOR . '/components/com_osdownloads/vendor/autoload.php';

$lang = JFactory::getLanguage();
require_once OSDOWNLOADS_ADMIN . '/vendor/autoload.php';
JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php');

switch (JFactory::getApplication()->getName()) {
case 'site':
$lang->load('com_osdownloads', JPATH_SITE . '/components/com_osdownloads');
JFactory::getLanguage()->load('com_osdownloads', OSDOWNLOADS_SITE);
break;

case 'administrator':
$lang->load('com_osdownloads', JPATH_ADMINISTRATOR . '/components/com_osdownloads');
JFactory::getLanguage()->load('com_osdownloads', OSDOWNLOADS_ADMIN);

JLoader::register('TraitModelUploads', OSDOWNLOADS_ADMIN . '/models/TraitModelUploads.php');
break;
}
}
18 changes: 18 additions & 0 deletions src/admin/language/en-GB/en-GB.com_osdownloads.ini
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,25 @@ COM_OSDOWNLOADS_FILES_FIELD_ORDERING_LABEL = "Ordering"
COM_OSDOWNLOADS_FILES_MODIFIED_TIME = "Modification date"
COM_OSDOWNLOADS_FILES_NAME = "Name"
COM_OSDOWNLOADS_FILES_ORDERING = "Ordering"
COM_OSDOWNLOADS_FILES_NO_RESULTS = "No files match your selection"
COM_OSDOWNLOADS_FILES_CREATE = "You have not created any file downloads. Click the \"New\" button to create your first one."

COM_OSDOWNLOADS_GENERAL = "General"
COM_OSDOWNLOADS_GO = "Go"

COM_OSDOWNLOADS_GRID_ORDERING_ACCESS_ASC = "Access Ascending"
COM_OSDOWNLOADS_GRID_ORDERING_ACCESS_DESC = "Access Descending"
COM_OSDOWNLOADS_GRID_ORDERING_DOWNLOADED_ASC = "Downloaded Ascending"
COM_OSDOWNLOADS_GRID_ORDERING_DOWNLOADED_DESC = "Downloaded Descending"
COM_OSDOWNLOADS_GRID_ORDERING_ID_ASC = "ID Ascending"
COM_OSDOWNLOADS_GRID_ORDERING_ID_DESC = "ID Descending"
COM_OSDOWNLOADS_GRID_ORDERING_NAME_ASC = "Name Ascending"
COM_OSDOWNLOADS_GRID_ORDERING_NAME_DESC = "Name Descending"
COM_OSDOWNLOADS_GRID_ORDERING_ORDERING_ASC = "Ordering Ascending"
COM_OSDOWNLOADS_GRID_ORDERING_ORDERING_DESC = "Ordering Descending"
COM_OSDOWNLOADS_GRID_ORDERING_PUBLISHED_ASC = "Published Ascending"
COM_OSDOWNLOADS_GRID_ORDERING_PUBLISHED_DESC = "Published Descending"

COM_OSDOWNLOADS_ID = "ID"
COM_OSDOWNLOADS_INCLUDE_FILES_CHILD_CATEGORIES_DESC = "Show the files from child categories"
COM_OSDOWNLOADS_INCLUDE_FILES_CHILD_CATEGORIES_LABEL = "Show files from child categories"
Expand Down Expand Up @@ -116,6 +131,9 @@ COM_OSDOWNLOADS_NUMBER_OF_COLUMN = "Number of columns"

COM_OSDOWNLOADS_OPTION_UPLOAD = "Upload"
COM_OSDOWNLOADS_OPTION_URL = "URL"
COM_OSDOWNLOADS_OPTION_SELECT_CATEGORY = "- Select Category"
COM_OSDOWNLOADS_OPTION_SELECT_PUBLISHED = "- Select State"

COM_OSDOWNLOADS_OPTIONAL = "Optional"
COM_OSDOWNLOADS_OPTIONS = "OSDownloads options"
COM_OSDOWNLOADS_OTHER_LINK = "Other Link"
Expand Down
277 changes: 0 additions & 277 deletions src/admin/models/abstract/file.php

This file was deleted.

Loading

0 comments on commit a4c0309

Please sign in to comment.