Difference between revisions of "Template:Case Study"

From Creative Commons
Jump to: navigation, search
(De-SMW.)
Line 1: Line 1:
<noinclude>
+
cool<noinclude>
 
This template simplifies the creation of articles about [[Case_Studies|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.
 
This template simplifies the creation of articles about [[Case_Studies|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.
  
Line 26: Line 26:
 
Edit the page to see the template text.
 
Edit the page to see the template text.
 
</noinclude>
 
</noinclude>
<includeonly>{{#if: {{{Image_Header|}}} | <center><div class="limitimage" style="display:block;margin-bottom:20px;padding-bottom:10px;">{{#set: Image Header={{{Image_Header|}}}}}{{{Image_Header|}}} <br />{{#if: {{{Image_attribution|}}} | <span style="font-size:75%;">[[Image_attribution::{{{Image_attribution|}}}]]</span>}} {{#if: {{{Image_license|}}} |<br /><span style="font-size:75%;">[[Image_license::{{{Image_license|}}}]]</span>}}</div></center>| {{Incomplete|Image Header|formedit}}}}<div style="width: auto; max-width:30%;float: right; padding: 15px;margin-top: 0px;border: 1px solid #c0c0c0;background:#f0f0f0;overflow:hidden; display:inline-block;margin-left:20px;margin-bottom:10px;">{{#if:{{{Mainurl|}}}|{{#arraymap:{{{Mainurl|}}}|,|x|<div class="urllabel">'''[[Mainurl::x|Go to URL]]'''</div>|}}}}<div class="cslabel">'''[[Property:Author|License User]]'''</div><span class="csfielddata">{{#if: {{{Author|}}}|{{#arraymap:{{{Author|}}}|,|x|[[Author::x]]}}|[{{fullurl:{{PAGENAME}}|action=formedit}} Add license user]}}</span><div class="cslabel">'''[[Property:User_Status|Type of CC User]]'''</div><span class="csfielddata">{{#if: {{{User_Status|}}}|{{#arraymap:{{{User_Status|}}}|,|x|[[User_Status::x]]}}|[{{fullurl:{{PAGENAME}}|action=formedit}} Add user status]}}</span><div class="cslabel">'''[[Property:License short name|License(s) Used]]'''</div><span class="csfielddata">{{#if: {{{License_short_name|}}}|{{#arraymap:{{{License_short_name|}}}|,|$$|{{#set: License short name=$$}}[http://wiki.creativecommons.org/Special:SearchByProperty?title=Special%3ASearchByProperty&property={{urlencode:License short name}}&value={{urlencode: $$}} $$]}}|{{#if: {{{License short name|}}}|{{#arraymap:{{{License short name|}}}|,|$$|{{#set: License short name=$$}}[http://wiki.creativecommons.org/Special:SearchByProperty?title=Special%3ASearchByProperty&property={{urlencode:License short name}}&value={{urlencode: $$}} $$]}}|[{{fullurl:{{PAGENAME}}|action=formedit}} Add license(s) used]}}}}</span><div class="cslabel">'''[[Property:Format|Media]]'''</div><span class="csfielddata">{{#if: {{{Format|}}}|{{#arraymap:{{{Format|}}}|,|x|[[Format::x]]}}|[{{fullurl:{{PAGENAME}}|action=formedit}} Add format]}}</span><div class="cslabel">'''[[Property:CC adoption date|CC adoption date]]'''</div><span class="csfielddata">{{#if: {{{CC adoption date|}}}|{{#arraymap:{{{CC adoption date|}}}|,|x|[[CC adoption date::x]]}}|[{{fullurl:{{PAGENAME}}|action=formedit}} Add date]}}</span><div class="cslabel">'''[[Property:Country|Country]]'''</div><span class="csfielddata">{{#if: {{{Country|}}}|{{#arraymap:{{{Country|}}}|,|&&|{{#set:Country=&&}}{{#ifexist: &&|[[&&]]|&&}}}}|[{{fullurl:{{PAGENAME}}|action=formedit}} Add country]}}</span><div class="cslabel">'''[[Property:Tag|Tags]]'''</div><span class="csfielddata">{{#if: {{{Tag|}}}|{{#arraymap:{{{Tag|}}}|,|$$|{{#set: Tag=$$}}[http://wiki.creativecommons.org/Special:SearchByProperty?title=Special%3ASearchByProperty&property=Tag&value={{urlencode: $$}} $$]}}, [{{fullurl:{{PAGENAME}}|action=formedit}} add tags]|[{{fullurl:{{PAGENAME}}|action=formedit}} Add tag(s)]}}</span>{{CS_Trans|{{{translations|}}}}}{{#if:{{{importance|}}}|{{#if: {{{quality|}}}|{{#set: Has review status=Reviewed}}|{{#set:Has review status=Needs quality evaluation}}}}|{{#if: {{{quality|}}}|{{#set:Has review status=Needs importance evaluation}}|{{#set:Has review status=Needs full evaluation}}}}}}{{Quality|{{#if: {{{importance|}}}|[[Has importance::{{{importance|}}}]]|}}|{{#if: {{{quality|}}}|[[Has quality::{{{quality|}}}]]|}}}}{{#if: {{{alt case study title|}}}|{{#set:Case study title={{{alt case study title|}}}}}|{{#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>{{ #if: {{{Description|}}} | {{#set: Description={{{Description|}}}}}<div style="font-size:1.3em;text-align:justify;line-height:1.3em;;margin-bottom:20px;">{{{Description|}}}</div>| (no description) }}{{ #if: {{{Quote|}}} | <span style="font-size:1.1em;line-height:1.1em;text-align:justify;">"[[Quote::{{{Quote}}}]]"</span> |<small>[{{fullurl:{{PAGENAME}}|action=formedit}} Add quote]</small> }} {{ #if: {{{Quote_Attribution|}}} | <span style="font-size:1.1em;"> &mdash; [[Quote_Attribution::{{{Quote_Attribution}}}]]</span> |}}__NOTOC__
+
<includeonly>
 +
<center><div class="limitimage" style="display:block;margin-bottom:20px;padding-bottom:10px;">{{{Image_Header|}}} <br />
 +
<span style="font-size:75%;">[[Image_attribution::{{{Image_attribution|}}}]]</span>
 +
<span style="font-size:75%;">[[Image_license::{{{Image_license|}}}]]</span>
 +
</div></center>
 +
<div style="width: auto; max-width:30%;float: right; padding: 15px;margin-top: 0px;border: 1px solid #c0c0c0;background:#f0f0f0;overflow:hidden; display:inline-block;margin-left:20px;margin-bottom:10px;">
 +
<div class="urllabel">'''[[Mainurl::x|Go to URL]]'''</div>
 +
<div class="cslabel">'''[[Property:Author|License User]]'''</div>
 +
<span class="csfielddata">{{{Author|}}} Add license user]}}</span>
 +
<div class="cslabel">'''[[Property:User_Status|Type of CC User]]'''</div>
 +
<!-- <span class="csfielddata">{{{User_Status|}}}</span> -->
 +
<div class="cslabel">'''[[Property:License short name|License(s) Used]]'''</div>
 +
<span class="csfielddata"> [http://wiki.creativecommons.org/Special:SearchByProperty?title=Special%3ASearchByProperty&property={{urlencode:License short name}}&value={{urlencode: {{{License_short_name|}}}}} {{{License_short_name|}}}]}}</span>
 +
<div class="cslabel">'''[[Property:Format|Media]]'''</div>
 +
<span class="csfielddata">{{{Format|}}}</span>
 +
<div class="cslabel">'''[[Property:CC adoption date|CC adoption date]]'''</div>
 +
<span class="csfielddata">{{{CC adoption date|}}}</span>
 +
<div class="cslabel">'''[[Property:Country|Country]]'''</div>
 +
<span class="csfielddata">{{{Country|}}}</span>
 +
<div class="cslabel">'''[[Property:Tag|Tags]]'''</div>
 +
<span class="csfielddata">{{{Tag|}}}</span>
 +
{{CS_Trans|{{{translations|}}}}}
 +
{{Quality {{{quality|}}}|{{{importance|}}}}}
 +
<!-- {{{alt case study title|}}}}} -->
 +
</div>
 +
<div style="font-size:1.3em;text-align:justify;line-height:1.3em;;margin-bottom:20px;">{{{Description|(no description)}}}</div>
 +
<span style="font-size:1.1em;line-height:1.1em;text-align:justify;">"[[Quote::{{{Quote}}}]]"</span>
 +
<span style="font-size:1.1em;"> &mdash; [[Quote_Attribution::{{{Quote_Attribution}}}]]</span>
 +
__NOTOC__
 
[[Category:Casestudy]]
 
[[Category:Casestudy]]
 
</includeonly>
 
</includeonly>

Revision as of 20:37, 15 June 2015

cool 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=
|CC adoption date=
|Format=
|Country=
|importance=
|quality=
|}}

Edit the page to see the template text.