PHP Classes

File: aksara/Modules/Addons/Views/index.php

Recommend this page to a friend!
  Classes of Aby Dahana  >  Aksara  >  aksara/Modules/Addons/Views/index.php  >  Download  
File: aksara/Modules/Addons/Views/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Aksara
A CodeIgniter based API and CRUD generator
Author: By
Last change: Initial commit for update 4.2.8

This commit updates the following changes:
1. Core: update the statement to skip the field inside the form validation. Update the null value to empty when preparing the field data value;
2. Validation: Update the statement under "unique" validation when second parameter is empty;
3. Add-Ons: Add the theme and modules install and update THRU from the Aksara Market. Finally!;
4. Modules and Themes: Changes on statement when removing the temporary folder from the extract package;
5. Refine the looks and feel on the Add-Ons page.
Initial commit for update 4.2.8

This commit focuses on functioning the market addons. Current progress was finished for:
1. Theme and module import;
2. Theme and module uninstall;
3. Theme preview (pre-install);
4. Theme changer;
5. Theme customizer;

Updating the theme and url helper that previously not working with imported theme and modules. Add the function to call the asset under theme and module. The route module (core) was added for getting the theme and module assets.

Changes on Assets controller to working with theme preview (related to base_url and asset_url configuration value).

Add the extension (intl) check (pre-install) and phpspreadsheet dependencies to scale up the app to produce the excel import and export.

Correct the installation migration that previously fail to execute (caused by invalid json format while insert the data on group privileges table "by typo"). Change the structure of app__users table and change the country field to country_id (also rewrite users and account module).

CORE
Adds the capability to using custom title and icon for each request method (create, read, update, delete etc.) that previously applied to set_desrcription() with array pair: [$method => $title] | [$method => $icon]. Correcting the missing variable called from CRUD search feature.

This commit already tested both MySQLi, PostgreSQL and SQLite3. You may help me to test to install it under SQL Server database to check if it's has no error.
Initial commit for update 4.2.8

1. Template core, add the limit number to the pagination;
2. Addons, capability to import the module and theme. Refine the market addon fetching;
3. Installer, correct the migration.
Initial commit for update 4.2.8
Initial commit for update 4.2.8

Change the phrase
Initial commit for update version 4.2.8

1. \aksara\Laboratory\Core.php: assign the method of "parent_module" related to view template and permission, add the option parameter for "set_title" to set the individual title for current action (index, create, read, update), improve the autocomplete function;

2. \aksara\Laboratory\Model.php: add the method to get error message, throwing an error message than error exception;

3. \aksara\Laboratory\Permission.php: change the thrown error method when validate AJAX request;

4. \aksara\Laboratory\Template.php: correct the view path finder of sub-modules;

5. Change the template of core modules;

6. Add the reverse geocoding for openlayers when updating the layer feature;

7. Minor updates for core plugins.
Revert "Initial commit for updat 4.2.8"

This reverts commit 5d2eaabba9d42ad8dc108eaf4303b2d58a50a735.
Initial commit for update 3.2.8

1. \aksara\Laboratory\Core.php: assign the method of "parent_module" related to view template and permission, add the option parameter for "set_title" to set the individual title for current action (index, create, read, update), improve the autocomplete function;

2. \aksara\Laboratory\Model.php: add the method to get error message, throwing an error message than error exception;

3. \aksara\Laboratory\Permission.php: change the thrown error method when validate AJAX request;

4. \aksara\Laboratory\Template.php: correct the view path finder of sub-modules;

5. Change the template of core modules;

6. Add the reverse geocoding for openlayers when updating the layer feature;

7. Minor updates for core plugins.
Revert "Revert "Revert "Initial commit for updat 4.2.8"""

This reverts commit 73226fbaf324b253ed2c3888e8eabd81ca8ef946.
Revert "Revert "Initial commit for updat 4.2.8""

This reverts commit 94a714c958f637d932a6bea4bb15a884ddef733e.
Revert "Initial commit for updat 4.2.8"

This reverts commit 5d2eaabba9d42ad8dc108eaf4303b2d58a50a735.
Revert "Revert "Initial commit for updat 4.2.8""

This reverts commit 91ca274f4924f2ba97344ab5d80cb64f6a1a1274.
Revert "Initial commit for updat 4.2.8"

This reverts commit 5d2eaabba9d42ad8dc108eaf4303b2d58a50a735.
Initial commit for updat 4.2.8

1. \aksara\Laboratory\Core.php: assign the method of "parent_module" related to view template and permission, add the option parameter for "set_title" to set the individual title for current action (index, create, read, update), improve the autocomplete function;

2. \aksara\Laboratory\Model.php: add the method to get error message, throwing an error message than error exception;

3. \aksara\Laboratory\Permission.php: change the thrown error method when validate AJAX request;

4. \aksara\Laboratory\Template.php: correct the view path finder of sub-module;

5. Change the template of core module;

6. Add the reverse geocoding for openlayers when updating the layer feature;

7. Minor update for core plugins.
Date: 9 hours ago
Size: 6,740 bytes
 

Contents

Class file image Download
<div class="container-fluid pb-3">
    <div class="row border-bottom bg-white mb-3 sticky-top" style="overflow-x: auto; top:88px">
        <ul class="nav" style="flex-wrap: nowrap">
            <li class="nav-item">
                <a href="<?php echo go_to(); ?>" class="nav-link no-wrap --xhr active">
                    <i class="mdi mdi-cart"></i>
                    <?php echo phrase('market'); ?>
</a>
            </li>
            <li class="nav-item">
                <a href="<?php echo go_to('themes'); ?>" class="nav-link no-wrap --xhr">
                    <i class="mdi mdi-palette"></i>
                    <?php echo phrase('installed_theme'); ?>
</a>
            </li>
            <li class="nav-item">
                <a href="<?php echo go_to('modules'); ?>" class="nav-link no-wrap --xhr">
                    <i class="mdi mdi-puzzle"></i>
                    <?php echo phrase('installed_module'); ?>
</a>
            </li>
            <li class="nav-item">
                <a href="<?php echo go_to('ftp'); ?>" class="nav-link no-wrap --xhr">
                    <i class="mdi mdi-console-network"></i>
                    <?php echo phrase('ftp_configuration'); ?>
</a>
            </li>
        </ul>
    </div>
    <div class="row">
        <div class="col-md-4">
            <div class="row mb-3">
                <div class="col-6">
                    <a href="<?php echo go_to(null, array('order' => 'popular')); ?>" class="btn btn-secondary btn-block btn-sm --xhr">
                        <?php echo phrase('popular'); ?>
</a>
                </div>
                <div class="col-6">
                    <a href="<?php echo go_to(null, array('order' => 'latest')); ?>" class="btn btn-secondary btn-block btn-sm --xhr">
                        <?php echo phrase('latest'); ?>
</a>
                </div>
            </div>
        </div>
        <div class="col-md-6 offset-md-2">
            <form action="<?php echo go_to(null, array('per_page' => null)); ?>" method="POST" class="form-horizontal relative --xhr-form mb-3">
                <input type="text" name="q" class="form-control form-control-sm" placeholder="<?php echo phrase('search_addon'); ?>" value="<?php echo service('request')->getGet('q'); ?>" />
                <button type="submit" class="btn float-right absolute top right">
                    <i class="mdi mdi-magnify font-weight-bold"></i>
                </button>
            </form>
        </div>
    </div>
    <hr class="row mt-0" />
    <div class="row addon-listing">
        <!-- addon listing -->
    </div>
</div>

<script type="text/javascript">
    $(document).ready(function()
    {
        $.ajax
        ({
            url: '<?php echo current_page(); ?>',
            method: 'POST',
            data:
            {
                source: 'market',
                order: '<?php echo (service('request')->getGet('order') ? service('request')->getGet('order') : null); ?>',
                keyword: '<?php echo (service('request')->getGet('q') ? service('request')->getGet('q') : null); ?>'
            },
            beforeSend: function()
            {
                $('.addon-listing').html
                (
                    '<div class="col-lg-12">' +
                        '<div class="spinner-border" role="status">' +
                            '<span class="sr-only"><?php echo phrase('loading'); ?></span>' +
                        '</div>' +
                    '</div>'
                )
            },
            context: this
        })
        .done(function(response)
        {
            if(!response || Object.keys(response).length === 0)
            {
                $('.addon-listing').html
                (
                    '<div class="col-lg-12">' +
                        '<div class="alert alert-warning">' +
                            '<?php echo phrase('no_addons_available_for_your_current_aksara_version'); ?>' +
                        '</div>' +
                    '</div>'
                );
               
                return;
            }
           
            else if(typeof response.error !== 'undefined')
            {
                $('.addon-listing').html
                (
                    '<div class="col-lg-12">' +
                        '<div class="alert alert-warning">' +
                            response.error +
                        '</div>' +
                    '</div>'
                );
               
                return;
            }
           
            $('.addon-listing').html(''),
           
            $.each(response, function(key, val)
            {
                if(val.addon_type == 'theme')
                {
                    $(
                        '<div class="col-sm-6 col-md-4 col-lg-3">' +
                            '<div class="card shadow border-0 rounded-more mb-3">' +
                                '<a href="' + val.detail_url + '" class="--modal">' +
                                    '<div class="relative rounded-top bg-dark" style="background:url(' + val.thumbnail.src + ') center center no-repeat; background-size: cover; height: 256px">' +
                                        '<div class="clip gradient-top rounded-top"></div>' +
                                        (val.type == 'backend' ? '<span class="badge badge-warning float-right mt-3 mr-3"><?php echo phrase('back_end_theme'); ?></span>' : '<span class="badge badge-success float-right mt-3 mr-3"><?php echo phrase('front_end_theme'); ?></span>') +
                                        '<div class="absolute w-100 text-center bottom p-3">' +
                                            '<b class="text-light">' +
                                                val.name +
                                            '</b>' +
                                        '</div>' +
                                    '</div>' +
                                '</a>' +
                                '<div class="card-body p-3">' +
                                    '<div class="row">' +
                                        '<div class="col-6">' +
                                            '<a href="' + val.install_url + '" class="btn btn-primary btn-block btn-xs --xhr show-progress">' +
                                                '<i class="mdi mdi-plus"></i>' +
                                                '<?php echo phrase('install'); ?>' +
                                            '</a>' +
                                        '</div>' +
                                        '<div class="col-6">' +
                                            '<a href="' + val.demo_url + '" class="btn btn-outline-primary btn-block btn-xs" target="_blank">' +
                                                '<i class="mdi mdi-magnify"></i>' +
                                                '<?php echo phrase('preview'); ?>' +
                                            '</a>' +
                                        '</div>' +
                                    '</div>' +
                                '</div>' +
                            '</div>' +
                        '</div>'
                    )
                    .appendTo('.addon-listing')
                }
                else if(val.addon_type == 'module')
                {
                    $(
                        '<div class="col-sm-6 col-md-4 col-lg-3">' +
                            '<div class="card shadow border-0 rounded-more mb-3">' +
                                '<a href="' + val.detail_url + '" class="--modal">' +
                                    '<div class="relative rounded-top bg-dark" style="background:url(' + val.thumbnail.src + ') center center no-repeat; background-size: cover; height: 256px">' +
                                        '<div class="clip gradient-top rounded-top"></div>' +
                                        '<span class="badge badge-primary float-right mt-3 mr-3"><?php echo phrase('module'); ?></span>' +
                                        '<div class="absolute w-100 text-center bottom p-3">' +
                                            '<b class="text-light">' +
                                                val.name +
                                            '</b>' +
                                        '</div>' +
                                    '</div>' +
                                '</a>' +
                                '<div class="card-body p-3">' +
                                    '<div class="row">' +
                                        '<div class="col-6">' +
                                            '<a href="' + val.install_url + '" class="btn btn-primary btn-block btn-xs --xhr show-progress">' +
                                                '<i class="mdi mdi-plus"></i>' +
                                                '<?php echo phrase('install'); ?>' +
                                            '</a>' +
                                        '</div>' +
                                        '<div class="col-6">' +
                                            '<a href="' + val.demo_url + '" class="btn btn-outline-primary btn-block btn-xs" target="_blank">' +
                                                '<i class="mdi mdi-magnify"></i>' +
                                                '<?php echo phrase('preview'); ?>' +
                                            '</a>' +
                                        '</div>' +
                                    '</div>' +
                                '</div>' +
                            '</div>' +
                        '</div>'
                    )
                    .appendTo('.addon-listing')
                }
            })
        })
        .fail(function()
        {
        })
    })
</script>

For more information send a message to info at phpclasses dot org.