developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 9 years ago

Closed 8 years ago

#846 closed enhancement (wontfix)

CRUD $what template variable

Reported by: dsdenes Owned by: laurentj
Priority: low Milestone:
Component: jelix:controllers Version: trunk
Severity: normal Keywords: crud what locale template
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:

Description

Feature in CRUD forms to be able to personalize better the titles/links. In the basic CRUD classes there is a default assign to $what (default.what) You can redefine the crud afterfunctions and reassign the variable:

    protected function _index($resp, $tpl) {
        $tpl-> assign('what', jLocale::get('news~admin.what'));
    }    
    
    protected function _create($form, $resp, $tpl) {
        $tpl-> assign('what', jLocale::get('news~admin.what'));
    }    
    
    protected function _editupdate($form, $resp, $tpl) {
        $tpl-> assign('what', jLocale::get('news~admin.what'));
    }    

    protected function _view($form, $resp, $tpl) {
        $tpl-> assign('what', jLocale::get('news~admin.what'));
    } 

Patch supplied.

Attachments (1)

crud_what.patch (5.2 KB) - added by dsdenes 9 years ago.

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by dsdenes

comment:1 Changed 9 years ago by laurentj

you can personnalize localized string by using your own templates or by redefining properties files. I don't think this "what" variable is a good idea. the CRUD controller is already too complex.

comment:2 Changed 8 years ago by laurentj

  • Component changed from jelix:core to jelix:controllers
  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.