Difference between revisions of "Template:Case Study"

From Creative Commons
Jump to: navigation, search
Line 24: Line 24:
 
</noinclude>
 
</noinclude>
 
<includeonly>__NOTOC__
 
<includeonly>__NOTOC__
<center>{{#if: {{{Image_Header|}}} | <div style="display:block;margin-bottom:10px;border-bottom:1px solid #c0c0c0;">[[Image Header::{{{Image_Header|}}}]] <br />{{#if: {{{Image_attribution}}} | <span style="font-size:75%;">[[Image_attribution::{{{Image_attribution}}}]]</span>}} {{#if: {{{Image_license|}}} | <span style="font-size:75%;">[[Image_license::{{{Image_license}}}]]</span>}}</div>| {{Incomplete|Image Header|formedit}}}}</center><br />
+
<center>{{#if: {{{Image_Header|}}} | <div style="display:block;margin-bottom:10px;border-bottom:1px solid #c0c0c0;padding-bottom:10px;">[[Image Header::{{{Image_Header|}}}]] <br />{{#if: {{{Image_attribution}}} | <span style="font-size:75%;">[[Image_attribution::{{{Image_attribution}}}]]</span>}} {{#if: {{{Image_license|}}} | <span style="font-size:75%;">[[Image_license::{{{Image_license}}}]]</span>}}</div>| {{Incomplete|Image Header|formedit}}}}</center><br />
 
<div style="width: auto; max-width:33%;float: right; padding: 10px; padding-top: 5px; margin-top: 0px;border: 1px solid #E0E0E0;background:#f6f6f6;overflow: hidden;padding-bottom:20px; display:inline-block;margin-left:20px;">{{#if:{{{Mainurl|}}}|{{#arraymap:{{{Mainurl|}}}|,|x|{{#set:Mainurl=x}}}}|}}
 
<div style="width: auto; max-width:33%;float: right; padding: 10px; padding-top: 5px; margin-top: 0px;border: 1px solid #E0E0E0;background:#f6f6f6;overflow: hidden;padding-bottom:20px; display:inline-block;margin-left:20px;">{{#if:{{{Mainurl|}}}|{{#arraymap:{{{Mainurl|}}}|,|x|{{#set:Mainurl=x}}}}|}}
 
<div class="odepolabel">'''[[Property:Author|Author/Organisation]]'''</div><span class="fielddata">{{#arraymap:{{{Author|}}}|,|x|[[Author::x]]}}</span><div class="odepolabel">'''[[Property:User_Status|User Status]]'''</div><span class="fielddata">{{#arraymap:{{{User_Status|}}}|,|x|[[User_Status::x]]}}</span><div class="odepolabel">'''[[Property:License short name|Licenses used]]'''</div><span class="fielddata">{{#arraymap:{{{License short name|}}}|,|x|[[License short name::x]]}}</span><div class="odepolabel">'''[[Property:Format|Media]]'''</div><span class="fielddata">{{#arraymap:{{{Format|}}}|,|x|[[Format::x]]}}</span><div class="odepolabel">'''[[Property:Country|Country]]'''</div><span class="fielddata">{{#arraymap:{{{Country|}}}|,|x|[[Country::x]]}}</span><div class="odepolabel">'''[[Property:Tag|Tags]]'''</div><span class="fielddata">{{#arraymap:{{{Tag|}}}|,|$$|[[Tag::$$]]}}</span>{{#ifeq: {{#sub:{{PAGENAME}}|0|4}}|Case|{{#set:Case study title={{#titleparts:{{PAGENAME}}|1|2}}}}|{{#set:Case study title={{PAGENAME}}}}}}{{#if: {{{License|}}}|{{#arraymap:{{{License|}}}|,|x|{{#set:License=x}}|}}|}}
 
<div class="odepolabel">'''[[Property:Author|Author/Organisation]]'''</div><span class="fielddata">{{#arraymap:{{{Author|}}}|,|x|[[Author::x]]}}</span><div class="odepolabel">'''[[Property:User_Status|User Status]]'''</div><span class="fielddata">{{#arraymap:{{{User_Status|}}}|,|x|[[User_Status::x]]}}</span><div class="odepolabel">'''[[Property:License short name|Licenses used]]'''</div><span class="fielddata">{{#arraymap:{{{License short name|}}}|,|x|[[License short name::x]]}}</span><div class="odepolabel">'''[[Property:Format|Media]]'''</div><span class="fielddata">{{#arraymap:{{{Format|}}}|,|x|[[Format::x]]}}</span><div class="odepolabel">'''[[Property:Country|Country]]'''</div><span class="fielddata">{{#arraymap:{{{Country|}}}|,|x|[[Country::x]]}}</span><div class="odepolabel">'''[[Property:Tag|Tags]]'''</div><span class="fielddata">{{#arraymap:{{{Tag|}}}|,|$$|[[Tag::$$]]}}</span>{{#ifeq: {{#sub:{{PAGENAME}}|0|4}}|Case|{{#set:Case study title={{#titleparts:{{PAGENAME}}|1|2}}}}|{{#set:Case study title={{PAGENAME}}}}}}{{#if: {{{License|}}}|{{#arraymap:{{{License|}}}|,|x|{{#set:License=x}}|}}|}}

Revision as of 18:52, 17 August 2010

This template simplifies the creation of articles about Case Studies. When inserted in a directory's page, it creates a decorative table with information about the content provided. It also takes care of annotating the given data semantically, so that users can easily find it or query it in other articles. Do not try to read this page's source code for learning table syntax – there are far easier ways of creating tables in MediaWiki.

To use this template, insert the following at the beginning of your page. All fields are optional and should be omitted if no information is available. The page name should reflect the name of the Case Study. It should be called in the following format:

{{Case Study
|Description=
|Quote=
|Quote Attribution=
|Image Header=
|Image attribution=
|Image license=
|Mainurl=
|Author=
|User Status=
|Tag=
|License short name=
|License=
|Format=
|Country=
|}}

Edit the page to see the template text.