Difference between revisions of "API:EPrints/Box"
Line 62: | Line 62: | ||
Required Options: | Required Options: | ||
+ | |||
+ | <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=item_c_options_handle --> | ||
+ | ===c_options_handle=== | ||
+ | |||
+ | <tt>$options{handle}</tt> | ||
+ | Current <tt>$handle</tt>. | ||
+ | |||
+ | <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=item_c_options_id --> | ||
+ | ===c_options_id=== | ||
+ | |||
+ | <tt>$options{id}</tt> | ||
+ | ID attibute of the box. E.g. <div id="my_box"> | ||
+ | |||
+ | <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=item_c_options_title --> | ||
+ | ===c_options_title=== | ||
+ | |||
+ | <tt>$options{title}</tt> | ||
+ | XHTML DOM of the title of the box. Note the exact object will be used not a clone of the object. | ||
+ | |||
+ | <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=item_c_options_content --> | ||
+ | ===c_options_content=== | ||
+ | |||
+ | <tt>$options{content}</tt> | ||
+ | XHTML DOM of the content of the box. Note the exact object will be used not a clone of the object. | ||
+ | |||
+ | <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=item_c_options_collapsed --> | ||
+ | ===c_options_collapsed=== | ||
+ | |||
+ | <tt>$options{collapsed}</tt> | ||
+ | Should the box start rolled up. Default to <tt>false</tt>. | ||
+ | |||
+ | <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=item_c_options_content_style --> | ||
+ | ===c_options_content_style=== | ||
+ | |||
+ | <tt>$options{content_style}</tt> | ||
+ | The CSS style to apply to the content box. E.g. <tt>overflow-y: auto; height: 300px;</tt> | ||
+ | |||
+ | <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=item_c_options_show_icon_url --> | ||
+ | ===c_options_show_icon_url=== | ||
+ | |||
+ | <tt>$options{show_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%; '> | ||
+ | <span style='display:none'>User Comments</span> | ||
+ | <!-- Edit below this comment --> | ||
+ | |||
+ | |||
+ | <!-- Pod2Wiki= --> | ||
+ | </div> | ||
+ | <!-- Pod2Wiki=item_c_options_hide_icon_url --> | ||
+ | ===c_options_hide_icon_url=== | ||
+ | |||
+ | <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%; '> |
Revision as of 10:55, 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
Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki
Contents
NAME
EPrints::Box - Class to render cute little collapsable/expandable Web 2.0ish boxes.
DESCRIPTION
This just provides a function to render boxes in the EPrints style.
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, );
METHODS
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:
c_options_handle
$options{handle}
Current $handle.
c_options_id
$options{id}
ID attibute of the box. E.g. <div id="my_box">
c_options_title
$options{title}
XHTML DOM of the title of the box. Note the exact object will be used not a clone of the object.
c_options_content
$options{content}
XHTML DOM of the content of the box. Note the exact object will be used not a clone of the object.
c_options_collapsed
$options{collapsed}
Should the box start rolled up. Default to false.
c_options_content_style
$options{content_style}
The CSS style to apply to the content box. E.g. overflow-y: auto; height: 300px;
c_options_show_icon_url
$options{show_icon_url}
The URL of the icon to use instead of the [+]
c_options_hide_icon_url
$options{hide_icon_url}
The URL of the icon to use instead of the [-]
COPYRIGHT
© Copyright 2000-2024 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/.