Commit Graph

9 Commits

Author SHA1 Message Date
Dan Harrin cd86c62b94
Relation Manager Customisation Improvements (#4444)
This change allows for easy customisation of the relation manager titles and toolbar buttons.

For buttons - define your custom strings directly in the standard `toolbarButtons` syntax...

```
toolbarButtons:
    create: acme.blog::lang.subcategory.CreateButtonText
    delete: # omit the string to fall back to the default button text
```

...and the old syntax still works...

```
toolbarButtons: create|delete
```

For titles - define different strings for each mode (form, list or pivot)...

```
title:
    form: acme.blog::lang.subcategory.FormTitle
    list: acme.blog::lang.subcategory.ListTitle
```

This feature provides developer convenience, for example in this situation where I have a relation manager that is used to assign user permissions to a project:
Before
![Screenshot 2019-07-10 at 09 28 22](https://user-images.githubusercontent.com/41773797/60953626-6bc0de80-a2f5-11e9-8001-04e816ad6967.png)
After
![Screenshot 2019-07-10 at 09 32 51](https://user-images.githubusercontent.com/41773797/60953773-b9d5e200-a2f5-11e9-93a9-69238ea696aa.png)

This PR contains no breaking changes.
2020-03-27 12:56:07 -06:00
Samuel Georges 51bef96db9 More styling changes and other minor improvements 2016-04-21 04:52:21 +10:00
Samuel Georges e48963b1e9 Improve mode detection for relations by using an event target 2015-02-28 19:33:11 +11:00
Samuel Georges 7c1de4f728 Add export action to ListController behavior 2015-01-27 20:02:20 +11:00
Samuel Georges b58666b4a0 Massive improvements to RelationController, most button types are available 2015-01-25 13:02:06 +11:00
Samuel Georges 39daf773bc Implement hasOne RelationController type 2015-01-21 19:47:38 +11:00
Sam Georges f21eaf05a3 Minor 2014-08-07 20:42:39 +10:00
felix 7fd9e267a9 add Translation to backend
switch
relation create_button
relation add_button
2014-08-07 12:58:17 +04:00
Sam Georges 71a5dd67ab Welcome to the world, October :-) 2014-05-14 23:24:20 +10:00