Difference between revisions of "API:EPrints/Box"

From EPrints Documentation
Jump to: navigation, search
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<!-- Pod2Wiki=_preamble_  
 
<!-- Pod2Wiki=_preamble_  
This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost.
+
This page has been automatically generated from the EPrints 3.4 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost.
  -->{{API}}{{Pod2Wiki}}{{API:Source|file=perl_lib/EPrints/Box.pm|package_name=EPrints::Box}}[[Category:API|BOX]][[Category:API:EPrints/Box|BOX]]<div><!-- Edit below this comment -->
+
  -->{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/Box.pm|package_name=EPrints::Box}}[[Category:API|BOX]]<div><!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name -->
 
<!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name -->
 
==NAME==
 
==NAME==
'''EPrints::Box''' - Class to render cute little collapsable/expandable Web 2.0ish boxes.
+
'''EPrints::Box''' - Class to render cute little collapsable/expandable Web 2.0ish boxes.
 +
 
 +
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_description -->
 +
==DESCRIPTION==
 +
This just provides a function to render boxes in the EPrints style.
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
Line 16: Line 27:
 
</div>
 
</div>
 
<!-- Pod2Wiki=head_synopsis -->
 
<!-- Pod2Wiki=head_synopsis -->
==SYNOPSIS==
+
===SYNOPSIS===
 
   use EPrints;
 
   use EPrints;
 
    
 
    
Line 28: Line 39:
 
   );  
 
   );  
 
    
 
    
 
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<span style='display:none'>User Comments</span>
 
<span style='display:none'>User Comments</span>
Line 36: Line 46:
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
 
</div>
 
</div>
<!-- Pod2Wiki=head_description -->
+
<!-- Pod2Wiki=head_methods -->
==DESCRIPTION==
+
==METHODS==
This just provides a function to render boxes in the EPrints style.
 
 
 
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<span style='display:none'>User Comments</span>
 
<span style='display:none'>User Comments</span>
Line 48: Line 56:
 
</div>
 
</div>
 
<!-- Pod2Wiki=item_render -->
 
<!-- Pod2Wiki=item_render -->
===$box_xhtmldom = EPrints::Box::render( %options )===
+
===render===
  
Render a collapsable/expandable box to which content can be added. The box is in keeping with the eprints style
+
$box_xhtmldom = EPrints::Box::render( %options )
 +
Render a collapsable/expandable box to which content can be added. The box is in keeping with the eprints style.
  
 
Required Options:
 
Required Options:
 +
 +
'''<tt>$options{handle}</tt>''' - Current <tt>$handle</tt>.
 +
 +
'''<tt>$options{id}</tt>''' - ID attibute of the box. E.g. &lt;div id="my_box"&gt;
 +
 +
'''<tt>$options{title}</tt>''' - XHTML DOM of the title of the box. N.B. The exact  object will be used not a clone of the object.
 +
 +
'''<tt>$options{content}</tt>''' - XHTML DOM of the content of the box. N.B. The  exact object will be used not a clone of the object.
 +
 +
Optional Options:
 +
 +
'''<tt>$options{collapsed}</tt>''' -Should the box start rolled up. Defaults to  <tt>false</tt>.
 +
 +
'''<tt>$options{content_style}</tt>''' - The CSS style to apply to the content box.  E.g. <tt>overflow-y: auto; height: 300px;</tt>
 +
 +
'''<tt>$options{show_icon_url}</tt>''' - The URL of the icon to use instead of the  '''[+]'''
 +
 +
'''<tt>$options{hide_icon_url}</tt>''' - The URL of the icon to use instead of the  '''[-]'''
  
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
Line 63: Line 90:
 
<!-- Pod2Wiki=head_copyright -->
 
<!-- Pod2Wiki=head_copyright -->
 
==COPYRIGHT==
 
==COPYRIGHT==
 +
{{API:Copyright}}
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<span style='display:none'>User Comments</span>
 
<span style='display:none'>User Comments</span>

Latest revision as of 11:06, 4 March 2022

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


API: Core API

Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki


NAME

EPrints::Box - Class to render cute little collapsable/expandable Web 2.0ish boxes.

User Comments


DESCRIPTION

This just provides a function to render boxes in the EPrints style.

User Comments


SYNOPSIS

 use EPrints;
 
 # an XHTML DOM box with a title and some content that starts rolled up.
 EPrints::Box(
      handle => $handle,
          id => "my_box",
       title => $my_title_dom,
     content => $my_content_dom,
   collapsed => 1,
 ); 
 

User Comments


METHODS

User Comments


render

$box_xhtmldom = EPrints::Box::render( %options )

Render a collapsable/expandable box to which content can be added. The box is in keeping with the eprints style.

Required Options:

$options{handle} - Current $handle.

$options{id} - ID attibute of the box. E.g. <div id="my_box">

$options{title} - XHTML DOM of the title of the box. N.B. The exact object will be used not a clone of the object.

$options{content} - XHTML DOM of the content of the box. N.B. The exact object will be used not a clone of the object.

Optional Options:

$options{collapsed} -Should the box start rolled up. Defaults to false.

$options{content_style} - The CSS style to apply to the content box. E.g. overflow-y: auto; height: 300px;

$options{show_icon_url} - The URL of the icon to use instead of the [+]

$options{hide_icon_url} - The URL of the icon to use instead of the [-]

User Comments


COPYRIGHT

© Copyright 2022 University of Southampton.

EPrints 3.4 is supplied by EPrints Services.

http://www.eprints.org/eprints-3.4/

LICENSE

This file is part of EPrints 3.4 http://www.eprints.org/.

EPrints 3.4 and this file are released under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation unless otherwise stated.

EPrints 3.4 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with EPrints 3.4. If not, see http://www.gnu.org/licenses/.

User Comments