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.7

##### Bug Fixed:
Core: Fix the CRUD function both back end and front end;
Core: Fix the query string parameter for each returned data;
Core: Fix the table data that return nothing when no data exists;
Model: Fix the multiple database connection when switching the main connection to the second connection;
Model: Fix the field check when table using alias;
Javascript: Fix the query string extraction that return null value;
Javascript: Fix the geocoding (place search) on the map when using Google or OpenStreet provider;
Galleries: Fix the link that turned image not found when clicked from gallery category;
Dashboard: Fix RecursiveIterator that return error when catch unreadable upload folder;

##### Changes:
Modules: Change the "not found" page message to matched with modules;
Group: Replace the module structure for permission with path;
Permission: Change the permission check with module path;
Permission: Remove the field of module, submodule and controller and replaced with path instead;
Activity Log: Remove the field of module, submodule and controller and replaced with path instead;
Group Privileges: Remove the field of module, submodule and controller and replaced with path instead;

##### Improvements:
Core: Replace the permission with module path so it will work with unlimited sub module;
Core: Add title trim to prevent blank title when the requested data was not found;
Core: Block the Internet Explorer under version 11 that no longer supports common used javascript;
Modules: Change the "not found" page message to matched with modules;
Installer: Add the character restriction for encryption key and cookie name to prevent breaking the configuration parameter;
Javascript: Increase the maximum depth of menu builder;
Seeder: Apply column modification related to app__activity_logs, app__groups_privileges and app__settings table;
Redesign the "not found" page;
Add new language phrases;

##### New Features:
Galleries: Add the slide view for next and previous image if available;
Settings: Add the action sound toggle;
Addon: Install the add on directly from the Aksara Market;
Addon: Customize the installed theme;
Authentication: Add the annually sign in when active years is presents;
Date: 1 month ago
Size: 6,590 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_add_on'); ?>" 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 || typeof response[0] === 'undefined')
            {
                $('.addon-listing').html
                (
                    '<div class="col-lg-12">' +
                        '<div class="alert alert-warning">' +
                            '<?php echo phrase('no_addon_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 mb-3">' +
                                '<a href="' + val.detail_url + '" class="--modal">' +
                                    '<div class="relative rounded-top bg-dark" style="background:url(' + val.screenshot.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'); ?></span>' : '<span class="badge badge-success float-right mt-3 mr-3"><?php echo phrase('front_end'); ?></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 mb-3">' +
                                '<a href="' + val.detail_url + '" class="--modal">' +
                                    '<div class="relative rounded-top bg-dark" style="background:url(' + val.screenshot.src + ') center center no-repeat; background-size: cover; height: 256px">' +
                                        '<div class="clip gradient-top rounded-top"></div>' +
                                        '<span class="badge badge-danger 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-sm">' +
                                                '<?php echo phrase('install'); ?>' +
                                            '</a>' +
                                        '</div>' +
                                        '<div class="col-6">' +
                                            '<a href="' + val.demo_url + '" class="btn btn-outline-primary btn-block btn-sm" target="_blank">' +
                                                '<?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.