Git Product home page Git Product logo

laravel-administrator's People

Contributors

adamfairholm avatar alexsoft avatar alexxli avatar alinghitu avatar amanpatel avatar andrewdworn avatar brunocascio avatar claar avatar crynobone avatar digidworks avatar dmitriyuch avatar endel avatar evgeny-golubev avatar gilr avatar gwill avatar happydemon avatar janhartigan avatar javichito avatar jijoel avatar judgej avatar lokielse avatar martxel avatar morgon avatar neilcrookes avatar shekarsiri avatar spescina avatar stephenantalis avatar teethgrinder avatar weiserwebdev avatar yusuf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-administrator's Issues

Input missing in adding/editing table with 1 on 1 relationship

I have this code in array $edit in users.php:

'profile' => array(
      'title' => 'Name',
      'type' => 'relationship',
      'name_field' => 'name',
),

and it generates only:

<div class="has_one">
  <label for="edit_field_profile">
    Name:
  </label>
</div>

without accompanying input.

How can i fix this?

There are two tables: users and profiles. They have 1 on 1 relationship with user_id column inside profiles table.

Edit box fails to represent peviously selected value in has_one relationship

I am using a has_one belongs_to relationship model. First it works fine, when i create a new row on the belongs_to model side, and i select an item from the other table. I save it, and it saves, in database too. Even when i click on the row (without any browser refresh), the previously selected item shows selected in the select-option area as it should. But if i refresh, or go to an other administrator page, and return back to this menu: edit box fails to show the selected item, instead shows the 'None' option. Also saves it that way afterwords even other fields are edited...

One row table model for settings like purpose

In some cases, like "general webpage settings" like admin pages I use only one database table row, so no listing, filtering, creating function necessary, but the editing.

Is there a way to "hack" the admin model to generate page this way, so only editing function appears in menu?

If not (as i think) can we build this feature?

Great Thanks for Administrator, i just love it!

Object ModelConfig could not be converted to a string

I guess an '__toString' method is missing in the modelConfig class. When i manually add:

public function __toString()
{
    return $this->name;
}

I don't get the error and Administrator is working (as far as i can see now). I guess this isn't the right way to solve that problem. Any ideas?

Image upload bug using laravel's profiler toolbar

When default profiler toolbar is set to true in laravel's applicatin config file, image gets uploaded properly, but image file name fails to update to table. It's because some extra none-whitespace characters are added by the profiler to the end of response object used in knockout.

Not a big deal, but i got hung on for hours figuring it out.

Just turn off the profiler.

Error when used custom primary key

I set

public static $key = 'user_id';

in my model and i got javascript error in console like this

TypeError: $root[$root.primaryKey] is not a function

Examples

... Although not really an issue.

I feel like some in depth example code / tutorials would really help this bundle, and me :D. I tend to learn by doing and the documentation here, while quite lengthy tends to leave people like me in the dark without something to dig through.

Enum enhancement

I think it will better if we can set display text and value of options by array key,value like this

'options' => array(
    'user' => 'Customer',
    'owner' => 'Merchant',
    'admin' => 'Content Moderator',
    'superadmin' => 'System Administrator'
),

Relationship column doesn't work in some circumstances

When loading a page for a table in admin (in my case /admin/document), I get an error:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'documents.document_type' in 'field list'
SQL: SELECT `documents`.`id`, `documents`.`document_type_id`, `documents`.`company_id`, `documents`.`year`, `documents`.`document_type`, `documents`.`company` FROM `documents` WHERE `id` = ? LIMIT 1

I have a Document model and a DocumentType model and I'm using your preferred method of extending existing models (using admin models).
The strange circumstance, that might cause this error, is: the DocumentType model is in a documenttype.php file and uses the document_types table (public static $table = 'document_types';).

I've also got a similar error when displaying DocumentType in browser, cause it belongs_to Country. There I get the error Unknown column 'document_types.country'

Self-Relation Column and "select"

Morning.

I just tried to create a self-related column (Category) like so:

'parent_category' => array(
            'title' => 'Parent Category',
            'relationship' => 'parent_category',
            'select' => "(:table).name"
        )

and the column is blank. Model looks like the following:

class Category extends \Eloquent {

    public static $table = 'categories';
    public static $timestamps = true;

    public function profiles()
    {
        return $this->has_many_and_belongs_to('Metadata', 'categories_users_metadata');
    }

    public function parent_category()
    {
        return $this->belongs_to('Category', 'parent_id');
    }

    public function child_categories()
    {
        return $this->has_many('Category','parent_id');
    }

}

Am I missing something?

BelongTo Relationship

the belong to relationship filter should be = not like because the foreignKey is a integer not a string

Line 45:

$query->where($this->foreignKey, '=', $this->value);

NOT

$query->where($this->foreignKey, 'LIKE', '%'.$this->value.'%');

Editing / inserting: enter key doesn't submit

When inserting a new record, the enter key doesn't work as expected (submit the form).

I see that the "form" is not a form but a div.edit_form, so maybe you could change that div to a form and then handle everything else in jquery like so:

$(function() {
    $(".edit_form").submit(function() {
        e.preventDefault();
        // do your magic here
    });
});

I don't know, it's just a guess.

Allow for relationship fields to be conditional on other relationship fields

This is going to be a tough one, but the way it should work is:

  • You have box office takes
  • You have films and theaters
  • Each box office take is measured in revenue by film by theater.
  • If you select a film in the box office take form, it should limit the theater options that you have to only those films that are in that theater.

Mass uploading

An idea I just had...let a user upload a bunch of images (or whatever) at once. There would be some mechanism of letting the user keep certain fields persistent to the next entry. This would do a lot in the way of making it easier to manage relationships

Wrong redirects if using a subfolder for an app in the URL

I have my app in /localhost/app, so admin is in /localhost/app/public/admin.

All the links to editing tables are correct (e.g. /localhost/app/public/admin/user), but once I click it, I (think I) get redireted to /localhost/admin/user. The page displays correctly (cause it is showing the right URL), but if I refresh, I get a 404. Is the URL changed with javascript or with a PHP redirect?

If it's a bug, can you fix it?

Error

Hello there,

I constantly get the following error:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM contacts WHERE id = ? LIMIT 1' at line 1

SQL: SELECT FROM contacts WHERE id = ? LIMIT 1

Bindings: array (
0 => false,
)

I simply have installed the bundle, created an 'admin' folder in the models dir, created an file called contact.php in the new dir.

This is the config

'models' => array(
    'contact' => array(
        'title' => 'Contacten',
        'model' => 'Contact',
    ),
),

The Frontend itself is working properly.

Any idea how this is come?

postgresql particularity

Hi,
When you use pgsql, the query contains a group by clause, that's raising an exception (SQLSTATE[42803] column "yourcolumn" must appear in the GROUP BY clause or be used in an aggregate function ).
I fixed it by changing the group_by call with order_by, in ModelHelper class, line 233. That seems to work for me.

Add map type

Hi! I'm loving this bundle! I want to add a Lat&Long type of field. Can anyone point me in the right direction? Thanks a lot!

Suggestion: scroll to top on item click

I have solved this for you :). I'm just not good at github, so read on and maybe you can implement it?

When someone clicks an item on the table, if that item is lower on the page (the page is scrolled down), the view should scroll to the top, cause that's where you can edit that item. To do that, add the following to line 260 of js/admin.js (inside the clickItem event handler):

$('html, body').animate({scrollTop: 0}, 400);

Change the last value (400 ms) to whatever you want for the duration of the scroll animation.

Add wysiwyg type

But I need to figure out how to better position the edit box first :(

Invalid text representation with Postgresql

I have an error :

SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: ""

SQL: SELECT "resultats"."id" FROM "resultats" WHERE "id" = ? LIMIT 1

Bindings: array (
0 => false,
)

it works with an ugly hack on ModelHelper.php :

$model = $classname::find(intval($id), $columns['includedColumns']);

my migration:

Schema::create('resultats',function($table)
{
$table->increments('id');
$table->string('code');
$table->string('name');
$table->string('description')->nullable();
$table->integer('secteur_id');
$table->timestamps();
$table->foreign('secteur_id')->references('id')->on('secteurs');
});

Guillaume.

Filter width

JS generate small width for filter: 21px or 31px
filter_style

Need dropDown and checkbox field

just like Lara Admin they have dropDown and checkbox (and radioButton too but think it can replace with dropDown). I think it'll make FrozenNode more powerful and flexible

and I happy to try to help you write this feature but need some suggestion please :)

Route Issue Im assuming

I've added everything as you instructed but when i click my models name in the admin panel i get a 404 any suggestions?

Self-related fields not being updated

On issue #33 a fix was made in order to allow self-related models (models related to themselves). However, these fields are not being updated (by using the edit form).

It updates the other fields, but it doesn't update the relation's field.

bool field not working correctly

Sorry for my confusing description, I don't think my english is good enough for explain complicated thing 555

but I will try this is my code and all of my bool field is store in db with tinyint (1)

public $edit = array(
    'role' => array(
        'title' => 'Role',
        'type' => 'enum',
        'options' => array(
            'user' => 'User', 
            'owner' => 'Owner', 
            'admin' => 'Admin', 
            'superadmin' => 'Super Admin'
        ),
    ), 
    'account_name' => array(
        'title' => 'Account Name',
        'type' => 'text'
    ),
    'curator_type' => array(
        'title' => 'Curator Type',
        'type' => 'enum',
        'options' => array(
            "00" => 'User', 
            "01" => 'Normal Curator', 
            "02" => 'Fetured Curator'
        ),
    ), 
    'email' => array(
        'title' => 'Email',
        'type' => 'text'
    ),
    'facebook_user' => array(
        'title' => 'Facebook',
        'type' => 'bool',
    ),
    'is_active' => array(
        'title' => 'Active',
        'type' => 'bool',
    ),
    'is_verified' => array(
        'title' => 'Verified',
        'type' => 'bool',
    )
); 
  1. I create new item and checked all my bool checkbox and click 'Create'
  2. I click my new item to open edit window
  3. ok everything fields display correct data and ervery checkbox is checked
  4. I click 'Save' without edit anything
  5. why all of my data in bool field is 0 !!!

How can I create my own admin subpages?

This administrator is great and all, but there are always times when you want to do things differently. Is there a way to add my own subpage (e.g. /admin/complex_user_edit) that I can code myself? Preferably with the same look as the administrator (I know that administrator is coded in Knockout.js, so maybe my page would be standard HTML).

Javascript: Uncaught ReferenceError: loadingOptions is not defined

I have downloaded 2.3 version but now the new item (e.g. new company) link doesn't work (nothing happens) and the filters part of the page is empty.

When I load the model page or the new model page, I get this javascript error: Uncaught ReferenceError: loadingOptions is not defined. Unfortunately, it doesn't say in what line it happens, I know it's strange. I'm using Chrome.

Ckeditor does not effect the database table

When I use CKeditor as textarea editor , table does not update. here are the errors in the developer tools.

Uncaught TypeError: Cannot call method 'unselectable' of null ckeditor.js:255
Uncaught TypeError: Cannot call method 'getSelection' of undefined ckeditor.js:309
Uncaught TypeError: Cannot read property 'frameElement' of undefined ckeditor.js:61
Uncaught TypeError: Cannot call method 'getSelection' of undefined ckeditor.js:309
Uncaught TypeError: Cannot read property 'frameElement' of undefined ckeditor.js:61
Uncaught TypeError: Cannot call method 'setState' of null ckeditor.js:630

Allow users to set number of rows in interface

There would be an option in the config that would default to true enabling users to change it. The interface would use a chosen select box that gives options from 5 to 100. Maybe store a session var so they don't have to keep setting it on every page load.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.