Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 28 23:09
    abbadon1334 synchronize #1706
  • Nov 28 23:09

    abbadon1334 on add-psr7

    Add some comments to explain be… (compare)

  • Nov 28 18:14
    mvorisek synchronize #934
  • Nov 28 18:14

    mvorisek on never_select_twice

    DEBUG test each DB vendor separ… DEBUG dump queries nicely DEBUG render twice unstable for… and 5 more (compare)

  • Nov 28 18:06

    mvorisek on debug_clone_refval

    (compare)

  • Nov 28 18:03
    mvorisek ready_for_review #938
  • Nov 28 18:03
    mvorisek labeled #938
  • Nov 28 18:01
    mvorisek review_requested #938
  • Nov 28 18:01
    mvorisek review_requested #938
  • Nov 28 17:02
    mvorisek synchronize #938
  • Nov 28 17:02

    mvorisek on fix_corrupted_2nd_render

    fix typo in test fix bug in migrator when refere… fix migrator for Model::table w… and 10 more (compare)

  • Nov 28 16:56

    mvorisek on test-ref

    (compare)

  • Nov 28 16:56
    mvorisek synchronize #938
  • Nov 28 16:56

    mvorisek on fix_corrupted_2nd_render

    fix random test stan (compare)

  • Nov 28 16:55

    mvorisek on test-ref

    failing test case - reason bad … adjust to the latest data apply fix from PR 909 and 7 more (compare)

  • Nov 28 16:53
    mvorisek synchronize #938
  • Nov 28 16:53

    mvorisek on fix_corrupted_2nd_render

    strict render immutability DEBUG render twice unstable for… run testTableWithSchema test wi… and 1 more (compare)

  • Nov 28 16:48
    mvorisek synchronize #938
  • Nov 28 16:48

    mvorisek on fix_corrupted_2nd_render

    fix stan fix random test (compare)

  • Nov 28 16:37
    mvorisek synchronize #938
PhilippGrashoff
@PhilippGrashoff
like this you can add conditions to the reference model
mkrecek234
@mkrecek234
Hi everyone, I have issues to get a) the ui ribbon label decorator working in a grid. With the standard hook getHTMLtags HTML looks right but the left part of the ribbon is missing. b) I can't get date format changed to German style 01.03.2020 - the $config['locale']['date'] does not have any effect on my grid. Can't find anything else on the net. Any help?
mkrecek234
@mkrecek234
BTW - same issue that the dropdown icons for a filtered grid are not visible - using the most recent Agile UI 2.0.4
PhilippGrashoff
@PhilippGrashoff
Hi, to switch to a german date format you have to set it in atk4\ui\Persistence\UI
An instance of that object is always in App. the property name is persistence_ui
so you can set it like $app->persistence_ui->date_format = 'd.m.Y';
mkrecek234
@mkrecek234
Thanks a lot - $app->ui_persistence->date_format worked 👍
Any idea on the UI issues above? Seems to be a CSS issue as the left ribbon part going around the grid is missing - and also the dropdown arrows in the grid header row are not shown (but working)
Svetlozar Kondakov
@skondakov

Hi everyone, I have issues to get a) the ui ribbon label decorator working in a grid. With the standard hook getHTMLtags HTML looks right but the left part of the ribbon is missing. b) I can't get date format changed to German style 01.03.2020 - the $config['locale']['date'] does not have any effect on my grid. Can't find anything else on the net. Any help?

Hello, did you try $this->app->ui_persistence->datetime_format

ahh sorry
this seems answered already
mkrecek234
@mkrecek234
Does anyone have a hint for me why the atk4/ui-develop demo shows nice € amounts, and my version with 'Money' field type does not show € signs? I could not find any trace where to configure that :-(
PhilippGrashoff
@PhilippGrashoff
its also in Persistence/UI IIRC
Svetlozar Kondakov
@skondakov
@mkrecek234 did you try $this->app->ui_persistence->currency
?
Thomas Stokkeland
@stokkeland
i always set $this->ui_persistence->currency = '$';
FabulousGee
@FabulousGee

Hi, though I do not really understand your use case, if you want to add extra conditions to a reference model, do it like this:

            $this->hasMany('Notification', [
                function() {
                    return (new Notification($this->persistence))->addCondition('model_class', get_class($this));
                },
                'their_field' => 'model_id']);

Thanks @PhilippGrashoff for the hint but unfortunately this doesn't work as expected either. I had the problem several times already when trying other workarounds: Fatal Error atk4\data\Exception: Field does not exist
I know that the error normally indicates that the field I am trying to use does not exist in this model so I double and triple checked - it IS there and the name is correct... Indicates that something is wrong already...

As for the use case, we maybe we could try the other way round and talk about the correct way to build the relations first.
Given I want to have two pages in my app. One page shows all existing/created people in a CRUD (PeopleModel). People have a name and a boolean flag "employee". Then there is a second model, the NoteModel which represents a small text attached to a single employee (so it is attached to a PeopleModel with employee = true with the hasOne relation)
The second page should show all notes that are available. With the CRUD right there I want to be able to create new notes for employees only. For now, the table only held employee's notes but when creating a new note, all entities are shown (not only employees) This is why I wanted to add the condition.
Maybe I am wrong with my design in general?

PhilippGrashoff
@PhilippGrashoff
Hi,
If this exception rises, that would mean that Model->init() wasnt executed. That happens when no persistence is passed, e.g:
new SomeModel() //init() not executed
new SomeModel($somePersistence) //like $this->persistence or $app->db. init() is executed
aaaah thanks for the explanation, makes sense
PhilippGrashoff
@PhilippGrashoff
$this->hasOne(
    'people_model_id', 
    [
        function() {
            return (new PeopleModel($this->persistence))->addCondition('employee', 'true');
        },
        'caption' => 'Whateveryoulike' //though hasOne() nowadays pulls caption from referenced model I think
    ]
);
if the field NoteModel is called people_model_id that should do it
try join the new discord chat for faster answers, much more going on there: https://discord.gg/TefeSe
FabulousGee
@FabulousGee

Thanks, that did the trick... I was using another variant of inserting persistence ($this->app->db). I tried "this->persistence" now and it works like a charm. Seems like I have to switch using this variant for the future :-)
So thanks again for the help and patience!

Will look into discord - thx for the heads up!
Stay healthy!

PhilippGrashoff
@PhilippGrashoff
np youre welcome
very strange, I cant see why $this->app->db shouldnt do the same
will point to exactly the same object
mkrecek234
@mkrecek234
Hi Philipp, can you send me another invite for Discord? Guys, looking for a library to send emails eg. via SMTP. Anyone has code already for that?
mkrecek234
@mkrecek234
What I still miss is to add an individual Action Button for delete into a grid - I know, for the pro it is simple, but I struggle to add this (other than adding a addColumn('delete') which does not look nice. I wish we had more code examples for defining actions of buttons (inside a grid, or in the menu of a grid) - this still puzzles me: eg change a record, save it and then show a jsNotify after the modal was close. Delete record. Change field of record and store without modal. All certainly easy, but the examples always only give a alert. 2. What also is corrupted is the rendering of the 'id' inside a link: $table->addColumn('name', new \atk4\ui\TableColumn\Link(['details', 'id' => '{$id}'])); it opens detail, but does not include the link (example ui-develop/table.php)
PhilippGrashoff
@PhilippGrashoff
Marco 'Lubber' Wienkoop
@lubber-de
@mkrecek234 SwiftMailer or PHPMailer are the standards since ages with and do also support SMTP. Both are equally good IMHO https://packagist.org/packages/swiftmailer/swiftmailer
https://packagist.org/packages/phpmailer/phpmailer
Thomas Stokkeland
@stokkeland
horizontal menus.. is there any way to make them wrap/stack on narrow screens?
UI 1.7
PhilippGrashoff
@PhilippGrashoff
@stokkeland sorry for the late reply. I'd check what Fomantic UI offers here, they surely have a solution for this. And if you are lucky, you just have to add 1 or 2 classes to the menu
Thomas Stokkeland
@stokkeland
oh yeah.. from their site looks like it supports stackable, it didnt work when i tried adding just the class, but i'll look into it further
Bagus A Priambada
@iam-adty
how to add our own css class / styles?
Bagus A Priambada
@iam-adty
how to override template used by view?
PhilippGrashoff
@PhilippGrashoff
HI @iam-adty, its best if you join our new Discord chat, there is much more going on than here: https://discord.gg/QVKSk2B
1 reply
Marc Fargas
@telenieko
Hi! Is there a list of supported backends of Agile Data? (db types it can talk to)
BTW the online UI demo has some pages on error: table2.php, interactive/ console, modal and loader.php atleast
PhilippGrashoff
@PhilippGrashoff
Hi Marc, best join our Discord channel, there is much more going on there: https://discord.gg/QVKSk2B
1 reply
太极
@ttken
Hi how to change language?
looks not support muit language
PhilippGrashoff
@PhilippGrashoff
Hi, come to our discord channel, this here is abandoned: https://discord.gg/hubZWuBF3K
grigigor
@grigigor
Hi guys, does anyone know how to set $grid-> addAction (...) as DropDown? I found example here https://ui.agiletoolkit.org/demos/data-action/jsactionsgrid.php . But in my case, I don't have the addActionMenuItem, so I can only use the usual addAction.
derryckf
@derryckf
I'm using a three table join with CRUD and everything is working fine except the save and update function. The relational table used to implement many to many relationship fails with a null index field because the first table in the join hasn't been populated with the news/updated record prior to atk4 trying to update/add another record to the middle table. As this is a fundamental requirement of a RDB I was wondering if anyone could point me to an example of describe how this is implemented in ATK4
Fulvio Carvalhido
@inluxc
Hi there, im trying to follow the example, but i get the following error:
Critical Error
Error: Call to undefined method Atk4\Ui\Form::addField()
{
"require": {
"atk4/ui": "^3.0"
}
}
FabulousGee
@FabulousGee

Hi there, im trying to follow the example, but i get the following error:
Critical Error
Error: Call to undefined method Atk4\Ui\Form::addField()

I believe that the example is not quite up to date... Which one did you follow, do you have a link ready?
As for the error: try to use addControl instead. The method addField has been deprecated in December 2020

Also, please come over to the discord channel since this Gitter is pretty much abandoned... https://discord.gg/hubZWuBF3K
Fulvio Carvalhido
@inluxc
Cool thanks