--- Begin Message ---Hello. I am using Magritte to generate reports for a pharo class. I want to customize generated components in order to have a better design.My class is Match Object subclass: #Match instanceVariableNames: 'date_match hour_match status actions stadium comments teams goals1 goals2 competition' classVariableNames: '' category: MyProject-Entity' Descriptions for some variables. Stadium is also a Class. Match>>descriptionStadium <magritteDescription> ^ MASingleOptionDescription new label: 'Stadium'; priority: 305; accessor: #stadium; options: Team allStadiumsName; componentClass: TBSMagritteSelectListComponent; beRequired; yourself Match>>descriptionTeams <magritteDescription> ^ MAMultipleOptionDescription new label: 'Teams'; priority: 805; accessor: #teams; options: Team allTeamsName; componentClass: MAMultiselectListComponent; yourself The generated component in the form is not very pretty. I want to have multiple checkbox. Match>>descriptionStatus <magritteDescription> ^ MASingleOptionDescription new label: 'Status'; priority: 505; accessor: #status; options: #('Pas en cours' 'En Cours' 'Mi-temps' 'Terminé'); componentClass: TBSMagritteSelectListComponent; yourself For the report I use the class SEMatchReport TBSMagritteReport subclass: #SEMatchReport instanceVariableNames: 'report' classVariableNames: '' category: 'MyProject-Components' SEMatchReport class>>from | report matchs commandColumn | matchs := Match selectAll. report:= self rows: matchs description: (self filteredDescriptionsFrom: matchs anyOne). commandColumn := MACommandColumn new. (SEMatchReport new session isSimpleAdmin) ifTrue: [ report addColumn: (commandColumn addCommandOn: report selector: #editMatch: text: 'Modifier'; yourself; addCommandOn: report selector: #addAction: text: 'Ajouter une action'; yourself ) ] ifFalse: [ report addColumn: (commandColumn addCommandOn: report selector: #editMatch: text: 'Modifier'; yourself; addCommandOn: report selector: #deleteMatch: text: 'Supprimer'; yourself; addCommandOn: report selector: #addAction: text: 'Ajouter une action'; yourself ) ]. ^ report I want to put some bootstrapp icons near commandColumn actions. like pencil or delete on 'Supprimer'. SEMatchReport class>>filteredDescriptionsFrom: aMatch ^ aMatch magritteDescription select: [ :each | #(date_match hour_match stadium goals1 goals2 teams) includes: each accessor selector ] I notice that on the generated report on column stadium we have aStadium. We don't have the value (the name). I don't know how to mention it in the filtered descriptions. Change the color of lines in the report, etc. All that things. Sorry for the bad english. Thanks. Asbath
--- End Message ---
[Pharo-users] Magritte extension
Asbath Sama biyalou via Pharo-users Thu, 16 Mar 2017 23:56:32 -0700
- [Pharo-users] Magritte extension Asbath Sama biyalou via Pharo-users
- Re: [Pharo-users] Magritte extens... stepharong
- Re: [Pharo-users] Magritte extens... DiegoLont
- Re: [Pharo-users] Magritte ex... Ben Coman
- Re: [Pharo-users] Magritt... Diego Lont
- Re: [Pharo-users] Mag... p...@highoctane.be
- Re: [Pharo-users... Diego Lont
- Re: [Pharo-users] Magritte ex... Diego Lont
- Re: [Pharo-users] Magritt... Ben Coman
- Re: [Pharo-users] Mag... Diego Lont
- Re: [Pharo-users] Magritte extens... Mariano Martinez Peck