Jump to content


flowerbed333's Content

There have been 5 items by flowerbed333 (Search limited from 20-January 20)


By content type

See this member's

Sort by                Order  

#16276 Using setTexteditor in a Multiple Grid returns TypeError

Posted by flowerbed333 on 13 May 2018 - 09:17 AM in Grocery CRUD Enterprise

I have the same issue. Probably a side effect of multigrid use



#16077 Multiple Grids in one page

Posted by flowerbed333 on 23 February 2018 - 01:04 PM in Grocery CRUD Enterprise

Hi,

 

I have purchased the Grocery Crud Enterprise to use multiple Grids ans now I cannot achieve my objective.

 

I am trying to make a Multiple Grids in on page based on example located at page https://www.groceryc...multiple-grids.

The code is simple but I am sure that someting is missing because noting happens. In your example in Code Igniter you have only 3 functions. All functions return something ... where happens the page generation ?

 

It's not possible to have a conroller with a multiple Grids sample like in the community version ?

Please Help me ...

I cannot achieve this ...

 

My code is 

 

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 
include(APPPATH . 'libraries/GroceryCrudEnterprise/autoload.php');
use GroceryCrud\Core\GroceryCrud;
 
class Examples extends CI_Controller {
 
public function __construct()
{
parent::__construct();
 
$this->load->database();
$this->load->helper('url');
 
// You can simply remove these lines once you have base_url installed correctly
$config = [];
include(APPPATH . 'config/config.php');
if ($config['base_url'] === '') {
show_error('You forgot to application/config/config.php . For more check the video tutorial here: <a href="https://youtu.be/X0gnDD0qTS8?t=24s" target="_blank">Common mistakes when we install Grocery CRUD</a>');
}
 
// In case you will need grocery CRUD community edition, just
// uncomment the below line :)
// $this->load->library('grocery_CRUD');   
}
 
public function _example_output($output = null)
{
if (isset($output->isJSONResponse) && $output->isJSONResponse) {
            header('Content-Type: application/json; charset=utf-8');
            echo $output->output;
            exit;
}
 
$this->load->view('example.php',(array)$output);
}
 
public function index()
{
$this->_example_output((object)array('output' => '' , 'js_files' => array() , 'css_files' => array()));
}
 
public function customers_management()
{
$crud = $this->_getGroceryCrudEnterprise();
 
$crud->setTable('customers');
$crud->setSubject('Customer', 'Customers');
$crud->columns(['customerName','contactLastName','phone','city','country','salesRepEmployeeNumber','creditLimit']);
$crud->displayAs('salesRepEmployeeNumber','from Employeer')
->displayAs('customerName','Name')
->displayAs('contactLastName','Last Name');
$crud->setRelation('salesRepEmployeeNumber','employees','lastName');
 
$output = $crud->render();
 
$this->_example_output($output);
}
 
private function _getDbData() {
        $db = [];
        include(APPPATH . 'config/database.php');
        return [
            'adapter' => [
                'driver' => 'Pdo_Mysql',
                'host'     => $db['default']['hostname'],
                'database' => $db['default']['database'],
                'username' => $db['default']['username'],
                'password' => $db['default']['password'],
                'charset' => 'utf8'
            ]
        ];
    }
 
private function _getGroceryCrudEnterprise($bootstrap = true, $jquery = true) {
        $db = $this->_getDbData();
        $config = include(APPPATH . 'config/gcrud-enteprise.php');
        $groceryCrud = new GroceryCrud($config, $db);
        return $groceryCrud;
}
 
public function demo_multigrid() {
    $crud = $this->_getGroceryCrudEnterprise();
 
    $crud->setApiUrlPath('/EBO/index.php/examples/demo_example_films');
    $output = $crud->render();
 
    $crud2 = $this->_getGroceryCrudEnterprise();
 
    $crud2->setApiUrlPath('/EBO/index.php/examples/demo_example_customers');
    $output2 = $crud->render();
 
    $output->output .= '
' . $output2->output;
 
    $this->_example_output($output);
}
 
public function demo_example_films() {
    $crud = $this->_getGroceryCrudEnterprise();
 
    $crud->setTable('film');
    $crud->setSubject('Film', 'Films');
    $crud->setRead();
    $crud->setRelationNtoN('actors', 'film_actor', 'actor', 'film_id', 'actor_id', 'fullname');
    $crud->setRelationNtoN('categories', 'film_category', 'category', 'film_id', 'category_id', 'name');
 
    return $crud->render();
}
 
public function demo_example_customers() {
    $crud = $this->_getGroceryCrudEnterprise();
 
    $crud->setTable('customers');
    $crud->setSubject('Customer', 'Customers');
    $crud->setRead();
 
    return $crud->render();
}
}
 

Thx.

 

Mitch




#16074 Set Relation with where clause

Posted by flowerbed333 on 22 February 2018 - 02:55 PM in Grocery CRUD Enterprise

Hi Johnny,

 

I have also purchased Grocery Crud Enterprise and I have an issue with usage of Set Relation (or Default Ordering) when I use the Syntax.

Example :

$crud->setRelation('lmc_title','lm_parameters','p_value', [
    'lm_parameters.p_type' => 'cust_title'
]);

 

I have no error when form is generated but I have One record Empty.

 

When I remove the Where clause ... All lines are generated but without filtering

 

Just for info I have the same problem with default Ordering

 
$crud->defaultOrdering('p_type', 'asc');
This Works !!!
 
$crud->defaultOrdering([
   'p_type' => 'as'
]);

This works Not ... But the 2 are similars. I am on XAMPP with GC Entr 2.5.

 

Could you give me a Trick ?

Attached Thumbnails

  • Capture d’écran 2018-02-22 à 15.54.25.png



#16013 GROCERY bootstrap-v4 theme not working with elite admin

Posted by flowerbed333 on 26 January 2018 - 12:25 PM in Bugs / Issues

Hi, I have also purchased the theme Bootsrap V4 and my NavBar is not Visible except 1 Hyperlink (Brand)

I have also purchased and tried the V3 and NavBar Appears properly but Dropdown in NavBar not works !!!

So I am stuck also ...

 

Mitch




#15843 Visibility and Column Reordering

Posted by flowerbed333 on 06 December 2017 - 09:39 AM in Extra coding / Plugins

Hi,

 

You used dataTable for the rendering of your result.

I used dataTable also in my reporting tool.

In dataTable, 2 extensions are really incredible and fit the requirements of 90% of the users :

- Buttons (with visibility) which allows to hide fieldshttps://datatables.n...nsions/buttons/

- Col Reorder which allows to reorder fields : https://datatables.n...ons/colreorder/

 

These 2 extensions makes dataTable very powerfull and very customizable because settings for these 2 extension are stored in LocalStorage.

Visibility (via Button) allows also to search into hidden fields. Amazing for most of the users.

 

I think that if you implement these 2 extension, your Grocery Crud could be award winning CRUD.

 

PS : I am Business Architect and Analyst. 

 

Mitch

Attached Thumbnails

  • EXT.png