Vorlage:Webmo staff: Unterschied zwischen den Versionen

Aus ZUM-Unterrichten
KKeine Bearbeitungszusammenfassung
Markierung: 2017-Quelltext-Bearbeitung
KKeine Bearbeitungszusammenfassung
Markierung: 2017-Quelltext-Bearbeitung
 
(5 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 9: Zeile 9:
|wiki_db_id=Integer<!--- created only upon account creation by CargoUserManagement extension -->
|wiki_db_id=Integer<!--- created only upon account creation by CargoUserManagement extension -->
|username=String<!--- created only upon account creation by CargoUserManagement extension -->
|username=String<!--- created only upon account creation by CargoUserManagement extension -->
|first_name=String<!-- editable via form by wiki users -->
|vorname=String<!-- editable via form by wiki users -->
|last_name=String<!-- editable via form by wiki users -->
|nachname=String<!-- editable via form by wiki users -->
|fullname=String<!-- editable via form by wiki users -->
|name=String<!-- editable via form by wiki users -->
|phone=Integer<!-- editable via form by wiki users -->
|ueber_mich=String<!-- editable via form by wiki users -->
|position=String<!-- editable via form by wiki users -->
|location=String<!-- editable via form by wiki users -->
}}</noinclude><includeonly>
}}</noinclude><includeonly>
{{#vardefine:staffPageID|{{#cargo_query:tables=webmo_staff|fields=_pageID|where=username="{{PAGENAME}}"|default=|no html}}}}
{{#vardefine:staffPageID|{{#cargo_query:tables=webmo_staff|fields=_pageID|where=username="{{PAGENAME}}"|default=|no html}}}}
<h2>Staff details</h2>
<div class="grid">
<div class="grid">
<div class="width-1-3">
<div class="width-1-1">
<table class="nice-table">
=== Über mich ===
<tr><td>Position:</td><td>{{{position|}}}</td></tr>
{{{ueber_mich|}}}
<tr><td>Location:</td>
<td>{{#cargo_query:tables=webmo_location|fields=_pageName, country, street, postal_code, locality
    |where=_pageID="{{PAGEID}}" |format=template |template=webmo project country |order by=_ID |default=}}</td></tr>
<tr><td>Phone:</td><td>{{{phone|}}}</td></tr>
<tr><td>Email:</td><td>{{#getEmail:{{{username|}}}}}</td></tr>
</table>
</div>
</div>
</div>
</div>
<h2>Assigned responsibilities</h2>
<h3>{{int:webmo-outcomes}}</h3>
{{#cargo_query:
tables=webmo_outcome
|fields=
name_short
|where=responsible_person="{{#var:staffPageID}}" OR responsible_person2="{{#var:staffPageID}}"
|no html
|default=<em>{{int:webmo-no-responsibilities}}</em>
}}
<br/><br/>
<h3>{{int:webmo-outputs}}</h3>
{{#cargo_query:
tables=webmo_output
|fields=
name_short
|where=responsible_person="{{#var:staffPageID}}" OR responsible_person2="{{#var:staffPageID}}"
|no html
|default=<em>{{int:webmo-no-responsibilities}}</em>
}}
<br/><br/>
<h3>{{int:webmo-indicators}}</h3>
{{#cargo_query:
tables=webmo_indicator
|fields=
name_short
|where=responsible_person="{{#var:staffPageID}}" OR responsible_person2="{{#var:staffPageID}}"
|no html
|default=<em>{{int:webmo-no-responsibilities}}</em>
}}
<br/><br/>
<h3>{{int:webmo-activities}}</h3>
{{#cargo_query:
tables=webmo_activity
|fields=
name_short
|where=responsible_person="{{#var:staffPageID}}" OR responsible_person2="{{#var:staffPageID}}"
|no html
|default=<em>{{int:webmo-no-responsibilities}}</em>
}}


{{#cargo_store:
{{#cargo_store:
Zeile 80: Zeile 26:
|wiki_db_id={{{wiki db id|}}}
|wiki_db_id={{{wiki db id|}}}
|username={{{username|}}}
|username={{{username|}}}
|first_name={{{first name|}}}
|vorname={{{vorname|}}}
|last_name={{{last name|}}}
|nachname={{{nachname|}}}
|fullname={{{first name|}}} {{{last name|}}}
|name={{{vorname|}}} {{{nachname|}}}
|phone={{{phone|}}}
|ueber_mich={{{ueber mich|}}}
|position={{{position|}}}
|location={{{location|}}}
}}
}}


[[Category:Nutzer]]
[[Category:Nutzer]]


{{#vardefine:name|{{#cargo_query:tables=webmo_staff|fields=fullname|where=webmo_staff.username="{{{username}}}"|no html|default=}}}}
{{#vardefine:name|{{#cargo_query:tables=webmo_staff|fields=name|where=webmo_staff.username="{{{username}}}"|no html|default=}}}}
{{DISPLAYTITLE:{{#if:{{#var:name}}|{{#var:name}}|{{{username}}}}}}}
{{DISPLAYTITLE:{{#if:{{#var:name}}|{{#var:name}}|{{{username}}}}}}}
__NOEDITSECTION__
__NOEDITSECTION__
__NOTOC__  
__NOTOC__  
</includeonly>
</includeonly>

Aktuelle Version vom 4. September 2018, 13:05 Uhr

This is the template:webmo staff. It fills the page User:webmo_staff.username.

Please note: Each user page is created automatically by the CargoUserManagement extension when a staff member/user creates a wiki account upon invitation or the Special:CreateAccount page. The extension fills the fields webmo_staff.wiki_db_id and webmo_staff.username. The remaining fields can be edited by the user herself via the form:webmo staff. New fields can be added to the webmo_staff table and won't interfere with the CargoUserManagement extension.

Note:
1) the form:webmo staff does not create user pages.
2) For reasons of consistency the email is not stored in the CargoDB. For example, if a user changes her user settings in the Wiki preferences, the CargoDB would not update automatically and old emails will pop up here and there. When needed, the email can be retrieved via the CargoUserManagement parser function {{#getEmail:username}} from the Wiki DB directly.

{{#cargo_declare: _table=webmo_staff |wiki_db_id=Integer |username=String |vorname=String |nachname=String |name=String |ueber_mich=String }}