Recipe-ingredient
From SemanticOrganization
Messages
"semorg-recipe-ingredient-template": "semorg-recipe-ingredient", "semorg-form-recipe-ingredient-add-button-text": "Add Ingredient", "semorg-form-recipe-ingredient-template": "recipe-ingredient", "semorg-form-recipe-ingredient-rows": "amount, ingredient, note, recipe", "semorg-list-recipe-ingredient-headers": "recipe-ingredient-amount, recipe-ingredient-ingredient, recipe-ingredient-note, recipe-ingredient-recipe", "semorg-field-recipe-ingredient-amount-name": "Amount", "semorg-field-recipe-ingredient-amount-parameters": "", "semorg-field-recipe-ingredient-amount-size": "10", "semorg-field-recipe-ingredient-amount-placeholder": "Amount", "semorg-field-recipe-ingredient-ingredient-name": "Ingredient", "semorg-field-recipe-ingredient-ingredient-parameters": "values from property=Semorg-recipe-ingredient-ingredient", "semorg-field-recipe-ingredient-ingredient-input-type": "combobox", "semorg-field-recipe-ingredient-ingredient-placeholder": "Ingredient", "semorg-field-recipe-ingredient-note-name": "Note", "semorg-field-recipe-ingredient-note-parameters": "", "semorg-field-recipe-ingredient-recipe-name": "Recipe", "semorg-field-recipe-ingredient-recipe-parameters": "",
Form
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{{info |create title={{int:semorg-form-recipe-ingredient-create-title}} |edit title={{int:semorg-form-recipe-ingredient-edit-title}}<span class="d-none">: <page name></span> |page name= }}} {{semorg-form-template|recipe-ingredient}} {{semorg-form-standard-inputs}} </includeonly>
as embedded:
Use this code, if this is not meant to be a standalone feature but rather a supplement that should be embedded in other forms. Add this line to a form definition that includes a field with the parameter holds template
. The second parameter of the semorg-form-template-embed
call should be the target field, specified with <feature>[<field>]
(e.g. meeting-group[files]
or {{int:semorg-meeting-group-template}}[files]
to respect template customization).
{{semorg-form-template-embed|recipe-ingredient|}}
Category
Category:Semorg-recipe-ingredient
{{semorg-category}}
Template
Template:Semorg-recipe-ingredient
<noinclude>{{semorg-bundle}}</noinclude><includeonly>[[Category:{{int:semorg-recipe-ingredient-category}}]]{{#semorg-set:recipe-ingredient |amount={{{amount|}}} |ingredient={{{ingredient|}}} |note={{{note|}}} |recipe={{{recipe|}}} }}{{#semorg-detail:recipe-ingredient}}{{#semorg-table:recipe-ingredient |amount={{{amount|}}} |ingredient={{{ingredient|}}} |note={{{note|}}} |recipe={{{recipe|}}} }}</includeonly>
Row Template
Template:Semorg-recipe-ingredient-row
<noinclude>{{semorg-bundle}}</noinclude><includeonly><tr> <td>[[{{{target|}}}]]</td> <td>{{{amount|}}}</td> <td>{{{ingredient|}}}</td> <td>{{{note|}}}</td> <td>{{{recipe|}}}</td> {{semorg-showedit |target={{{target|}}} }} </tr></includeonly>
Overview Page Template
Template:Semorg-recipe-ingredient-overview
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{#semorg-list:recipe-ingredient |heading={{int:semorg-recipe-ingredient-page-name}} |formlink={{#semorg-forminput:recipe-ingredient}} |links={{{links|}}} |query={{{query|}}} |sort={{{sort|}}} |order={{{order|}}} |limit={{{limit|}}} |filter links={{{filter links|}}} |filters={{{filters|}}} |category={{{category|}}} |headers={{{headers|}}} |row template={{{row template|}}} |tableclass={{{tableclass|}}} |title={{{title|}}} |sums={{{sums|}}} |csv={{{csv|}}} |default={{{default|}}} |returnto={{{returnto|}}} |help={{{help|}}} }}</includeonly>
Overview Page
[[]]
{{semorg-recipe-ingredient-overview}}
Property Registration
Add the following line to LocalSettings.php
:
$wgSemorgAdditionalProperties['recipe-ingredient'] = [ "id" => "RI","fields" => ["amount" => [ "id" => "AM","type" => "txt" ],"ingredient" => [ "id" => "IN","type" => "txt" ],"note" => [ "id" => "NO","type" => "txt" ],"recipe" => [ "id" => "RE","type" => "wpg" ], ] ];