Difference between revisions of "Template:Portal"

From Earth Science Information Partners (ESIP)
 
(36 intermediate revisions by the same user not shown)
Line 31: Line 31:
 
   |;
 
   |;
 
   |@
 
   |@
   |<span class="nowrap small mr-2"><i class=" fas fa-hashtag small"></i> @</span>
+
   |<span class="nowrap small mr-2"><i class=" fas fa-hashtag small"></i>@</span>
 
   |
 
   |
 
}}
 
}}
</div><!--
+
</div>
 +
</div>
 +
</div>
 +
{{#arraymap: {{{Portal blocks|}}}
 +
    |,
 +
    |@
 +
    |<!--
  
### ADD CONTENT BUTTONS
+
### NEWS
  
--><div class="card-footer d-block d-md-flex justify-content-between"><!--
+
  -->{{#switch: @
 
+
        |News =
-->{{#arraymap: {{{Portal blocks|}}}
+
<div class="card-deck">{{News filter
 +
    |Portal={{ROOTPAGENAME}}
 +
    |News status=On
 +
    |Hide bottom panel=Yes
 +
    |Hide news feeds=Yes
 +
  }}
 +
</div>
 +
        |#default =
 +
      }}
 +
    |
 +
  }}
 +
<div class="card-deck mt-3">{{#arraymap: {{{Portal blocks|}}}
 
     |,
 
     |,
 
     |@
 
     |@
 
     |{{#switch: @
 
     |{{#switch: @
        |News = {{#formlink: form=News
+
         |Events =<!--
          |link text=<span class="mw-ui-button mw-ui-quiet w-100 w-md-auto mb-2 mb-md-0">Add News</span>
 
          |News[Portal]={{PAGENAME}}
 
        }}
 
         |Events = {{#formlink: form=Event
 
          |link text=<span class="mw-ui-button mw-ui-quiet w-100 w-md-auto mb-2 mb-md-0">Add Event</span>
 
          |Event[Portal]={{PAGENAME}}
 
        }}
 
        |Resources = {{#formlink: form=Resources
 
          |link text=<span class="mw-ui-button mw-ui-quiet w-100 w-md-auto mb-2 mb-md-0">Add Resources</span>
 
          |Resources[Portal]={{PAGENAME}}
 
        }}
 
    |
 
  }}
 
</div>
 
</div>
 
</div><!--
 
 
 
### NEWS
 
 
 
-->{{#ifeq: {{{Portal news|}}}|Yes
 
    |<div class="card-deck">{{News filter|Portal={{ROOTPAGENAME}}|News status=On}}</div>
 
  }}</div>
 
<div class="card-deck mt-3"><!--
 
  
 
### EVENTS  
 
### EVENTS  
  
-->{{#ifeq: {{{Portal events|}}}|Yes
+
--><div id="events-front" class="card mb-3 mr-md-0 shadow-sm">
    |<div class="card mb-3 shadow-sm">
 
 
       <div class="card-header">
 
       <div class="card-header">
      <div class="lead font-weight-bold">Events</div>
+
        <div class="lead font-weight-bold">{{#formlink: form=Event
 +
          |link text=<i class="fas fa-plus-circle float-right text-dark" title="Create new event"></i>
 +
          |Events[Portal]={{PAGENAME}}
 +
        }}<!-- -->Events</div>
 
       </div>
 
       </div>
       <div class="card-body">
+
       <div class="p-2 pt-0">
{{#ask: [[Category:Events]][[Portal::{{PAGENAME}}]]|format=ul }}
+
{{#ask:  
* ...
+
  [[Category:Events]]
* ...
+
  [[Portal::{{PAGENAME}}]]
* ...
+
  |?Event duration label=Date
 +
  |headers=plain
 +
  |format=table
 +
  |class=datatable
 +
  |mainlabel=Event
 +
}}
 
       </div>
 
       </div>
 
       </div>
 
       </div>
    }}<!--
+
        |Resources =<!--
  
 
### RESOURCES
 
### RESOURCES
  
-->{{#ifeq: {{{Portal resources|}}}|Yes
+
--><div class="card mb-3 shadow-sm">
    |<div class="card mb-3 shadow-sm">
 
 
       <div class="card-header">
 
       <div class="card-header">
      <div class="lead font-weight-bold">Resources</div>
+
        <div class="lead font-weight-bold">{{#if: {{#show: {{PAGENAME}}/Resources |?Modification date }}
 +
          |{{#formlink: form=Resources
 +
              |link text=<i class="fas fa-pencil-alt text-dark float-right" title="Edit Resources page"></i>
 +
              |target={{PAGENAME}}/Resources
 +
              |returnto={{PAGENAME}}
 +
              |reload
 +
            }}
 +
          |{{#formlink: form=Resources
 +
              |link text=<i class="fas fa-plus-circle text-dark float-right" title="Create Resources page"></i>
 +
              |Resources[Portal]={{PAGENAME}}
 +
              |returnto={{PAGENAME}}
 +
              |reload
 +
            }}
 +
          }}<!-- -->Resources</div>
 
       </div>
 
       </div>
 
       <div class="card-body">
 
       <div class="card-body">
* ...
+
{{#if: {{#show: {{FULLPAGENAME}}/Resources |?Modification date }}
* ...
+
  |{{:{{FULLPAGENAME}}/Resources}}
* ...
+
}}
 
       </div>
 
       </div>
 
       </div>
 
       </div>
 
   }}
 
   }}
</div><!--
+
  |
 +
}}
 +
</div>
 +
<div class="card-deck">{{#arraymap: {{{Portal blocks|}}}
 +
    |,
 +
    |@
 +
    |{{#switch: @
 +
        |GoogleDocs =<!--
 +
 
 +
### GOOGLE DOCS
 +
 
 +
--><div class="card mb-3 mr-md-0 shadow-sm">
 +
<div class="card-header">
 +
<div class="lead font-weight-bold">Google Documents</div>
 +
</div>
 +
<div class="card-body">{{#forminput: form=Googledoc
 +
    |super_page={{PAGENAME}}/GD
 +
    |Googledoc[Portal title]={{PAGENAME}}
 +
    |button text=Create or edit description
 +
    |placeholder=Enter the name of a document ...
 +
  }}
 +
{{#ask:
 +
  [[Category:Google documents]]
 +
  [[Portal::{{PAGENAME}}]]
 +
  |format=ul
 +
}}
 +
</div>
 +
</div>
 +
}}
 +
  |
 +
}}<!--
  
 
### COMMITTEE
 
### COMMITTEE
  
 
--><div id="committee" class="card mb-3 shadow-sm">
 
--><div id="committee" class="card mb-3 shadow-sm">
<div class="card-header"><span class="mw-ui-button float-right small">Edit</span>
+
    <div class="card-header">
<div class="lead font-weight-bold">{{{Committee|}}}</div>
+
      <div class="lead font-weight-bold">{{{Committee|}}}</div>
</div>
+
    </div>
<div class="card-body">
+
    <div class="card-body">{{{Members}}}</div>
Contact data pulled from the Committee / Committee members...
+
  </div>
</div>
 
 
</div>
 
</div>
 
</includeonly><noinclude>
 
</includeonly><noinclude>
 
Portal page layout and semantics.
 
Portal page layout and semantics.
 
</noinclude>
 
</noinclude>

Latest revision as of 03:57, July 23, 2020

Portal page layout and semantics.