Progress Graph: Difference between revisions
(rm legend (is in template)) |
(added mapping for dropdown menu + docu (notes and usage)) |
||
Line 11: | Line 11: | ||
{| class="formtable" | {| class="formtable" | ||
! Course: | ! Course: | ||
| {{{field|course|input type=dropdown|default=Q468|values=Q171, Q468 | <!-- specifies the input for the form --> | ||
| {{{field|course|input type=dropdown|default=Q468|values=Q171, Q468, Q926, Q923| mapping template=Map Dropdown}}} | |||
|} | |} | ||
{{{end template}}} | {{{end template}}} | ||
Line 17: | Line 18: | ||
Shows you all the items, that you have completed or are interested in, for a specific course. | Shows you all the items, that you have completed or are interested in, for a specific course. | ||
You need to be logged in to see your personalized graph. | You need to be logged in to see your personalized graph. | ||
</includeonly> | </includeonly> | ||
<noinclude> | |||
== Notes == | |||
The dropdown menu uses a template to map values to a label. See [https://graphit.ur.de/wiki/Template:Map_Dropdown here]. | |||
The template uses an unnamed parameter to switch between values and their "aliases". | |||
If you want to add another course to the dropdown menu, you need to... | |||
* add a value to the list of '''values''' in the ''formtable'' above | |||
** values have the form <code>Q923</code>, i.e. the qid of an item | |||
* Go to the linked template and add a new field, e.g. <code> | Q923=CGBV 24SS</code> | |||
** where <code>Q923</code> value previously added to the ''formtabel'' | |||
** and <code>CGBV 24SS</code> is the label you later want to display in the dropdown menu | |||
See the [https://www.mediawiki.org/wiki/Extension:Page_Forms/Values,_mappings_and_autocompletion#Autocompleting_on_outside_values docs] | |||
* tried to use external data for the values, but it didn't seem to set any variables inside the form. The same query worked otherwise. | |||
** used this [https://tinyurl.com/2bftq37d query] | |||
== Usage == | |||
can be included in pages like this: | |||
<pre style="background-color:#F5F5F5;"> | |||
{{#queryformlink:form=Progress Graph|link text=Click here|link type=button|tooltip=Personalized Progress Graph}} | |||
</pre> | |||
or see the [https://www.mediawiki.org/wiki/Extension:Page_Forms/Linking_to_forms docs] | |||
</noinclude> |
Revision as of 08:26, 17 April 2024
This is the "Progress Graph" form. To create a page with this form, enter the page name below; if a page with that name already exists, you will be sent to a form to edit that page.
Notes
The dropdown menu uses a template to map values to a label. See here.
The template uses an unnamed parameter to switch between values and their "aliases".
If you want to add another course to the dropdown menu, you need to...
- add a value to the list of values in the formtable above
- values have the form
Q923
, i.e. the qid of an item
- values have the form
- Go to the linked template and add a new field, e.g.
| Q923=CGBV 24SS
- where
Q923
value previously added to the formtabel - and
CGBV 24SS
is the label you later want to display in the dropdown menu
- where
See the docs
- tried to use external data for the values, but it didn't seem to set any variables inside the form. The same query worked otherwise.
- used this query
Usage
can be included in pages like this:
{{#queryformlink:form=Progress Graph|link text=Click here|link type=button|tooltip=Personalized Progress Graph}}
or see the docs