Пример #1
0
 public function editSettingsAction()
 {
     $form = new Omeka_Form_GeneralSettings();
     $bootstrap = $this->getInvokeArg('bootstrap');
     $derivatives = $bootstrap->getResource('Filederivatives');
     if (isset($derivatives) && !$derivatives->getStrategy() instanceof Omeka_File_Derivative_Strategy_ExternalImageMagick) {
         $form->removeElement('path_to_convert');
     }
     $form->setDefaults($bootstrap->getResource('Options'));
     fire_plugin_hook('general_settings_form', array('form' => $form));
     $form->removeDecorator('Form');
     $this->view->form = $form;
     if ($this->getRequest()->isPost()) {
         if ($form->isValid($_POST)) {
             $options = $form->getValues();
             // Everything except the CSRF hash should correspond to a
             // valid option in the database.
             unset($options['settings_csrf']);
             foreach ($options as $key => $value) {
                 set_option($key, $value);
             }
             $this->_helper->flashMessenger(__('The general settings have been updated.'), 'success');
             $this->_helper->redirector('edit-settings');
         } else {
             $this->_helper->flashMessenger(__('There were errors found in your form. Please edit and resubmit.'), 'error');
         }
     }
 }
/**
 * Include static files for the editor.
 *
 * @param NeatlineExhibit The exhibit.
 */
function nl_queueNeatlineEditor($exhibit)
{
    nl_queueGoogleMapsApi();
    queue_css_file('dist/neatline-editor');
    queue_js_file('dist/neatline-editor');
    queue_js_file('dist/ckeditor/ckeditor');
    queue_js_file('bootstrap');
    fire_plugin_hook('neatline_editor_static', array('exhibit' => $exhibit));
}
Пример #3
0
 public function init()
 {
     parent::init();
     $this->setAction(WEB_ROOT . '/commenting/comment/add');
     $this->setAttrib('id', 'comment-form');
     $user = current_user();
     /************************************************************
      *REVISIONS
      * Ver        Date       Author          Description
      * --------  ----------  --------------  ----------------------
      * 1.0       09/02/2015  mrs175          1. added validators/form limitations for author name, email, and comment
      ************************************************************/
     //Validators
     //------------------------------------------------------------------
     $notEmptyValidator = array('validator' => 'NotEmpty', 'breakChainOnFailure' => true, 'options' => array('messages' => array(Zend_Validate_NotEmpty::IS_EMPTY => __('Please fill in this box.'), Zend_Validate_NotEmpty::INVALID => __('Please only use letters numbers and punctuation.'))));
     $alphaNumericValidator = array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '#^[a-zA-Z0-9.*@+!\\-_%\\#\\^&$ ]*$#u', 'messages' => array(Zend_Validate_Regex::INVALID => __('Please only use these special characters for your name: + ! @ # $ % ^ & * . - _'), Zend_Validate_Regex::ERROROUS => __('Please only use these special characters for your name: + ! @ # $ % ^ & * . - _'), Zend_Validate_Regex::NOT_MATCH => __('Please only use these special characters for your name: + ! @ # $ % ^ & * . - _'))));
     //form element options
     //----------------------------------------------------------
     $nameOptions = array('label' => __('Name (required)'), 'required' => true, 'size' => '25', 'maxlength' => '25', 'validators' => array($notEmptyValidator, $alphaNumericValidator));
     $emailOptions = array('label' => __('Email (required)'), 'required' => true, 'size' => '100', 'maxlength' => '70', 'validators' => array($notEmptyValidator));
     $commentOptions = array('label' => __('1500 character limit'), 'id' => 'comment-form-body', 'rows' => "8", 'cols' => "50", 'maxlength' => '1500', 'required' => true, 'filters' => array(array('StripTags', array('allowTags' => array('p', 'span', 'em', 'strong', 'a', 'ul', 'ol', 'li'), 'allowAttribs' => array('style', 'href')))), 'validators' => array($notEmptyValidator));
     //Adding Elements to the form
     //-------------------------------------------------------------------------------
     //auto-filling the email and name boxes for logged in users
     //then making them read only, so logged in users must use their registered name and email
     if ($user) {
         $emailOptions['value'] = $user->email;
         $emailOptions['readonly'] = true;
         $emailOptions['onfocus'] = "this.blur()";
         $nameOptions['value'] = $user->name;
         $nameOptions['readonly'] = true;
         $nameOptions['onfocus'] = "this.blur()";
     }
     $this->addElement('text', 'author_name', $nameOptions);
     $this->addElement('text', 'author_email', $emailOptions);
     $this->addElement('textarea', 'body', $commentOptions);
     $emailValidator = new Zend_Validate_EmailAddress();
     $emailValidator->setMessage('Please enter an email address like stuff@email.com');
     $this->getElement('author_email')->addValidator($emailValidator, true, array());
     if (get_option('recaptcha_public_key') && get_option('recaptcha_private_key')) {
         $this->addElement('captcha', 'captcha', array('label' => __("Please verify you're a human"), 'captcha' => array('captcha' => 'ReCaptcha', 'pubkey' => get_option('recaptcha_public_key'), 'privkey' => get_option('recaptcha_private_key'), 'ssl' => true)));
         $this->getElement('captcha')->removeDecorator('ViewHelper');
     }
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $params = $request->getParams();
     $record_id = $this->_getRecordId($params);
     $record_type = $this->_getRecordType($params);
     $this->addElement('hidden', 'record_id', array('value' => $record_id, 'decorators' => array('ViewHelper')));
     $this->addElement('hidden', 'path', array('value' => $request->getPathInfo(), 'decorators' => array('ViewHelper')));
     if (isset($params['module'])) {
         $this->addElement('hidden', 'module', array('value' => $params['module'], 'decorators' => array('ViewHelper')));
     }
     $this->addElement('hidden', 'record_type', array('value' => $record_type, 'decorators' => array('ViewHelper')));
     fire_plugin_hook('commenting_form', array('comment_form' => $this));
     $this->addElement('submit', 'submit', array('label' => __('Submit')));
 }
Пример #4
0
 /**
  * @return Zend_Controller_Router_Rewrite
  */
 public function init()
 {
     $router = parent::init();
     $front = $this->getBootstrap()->getResource('Frontcontroller');
     if ($front->getParam('api')) {
         // The API route is the only valid route for an API request.
         $router->addRoute('api', new Omeka_Controller_Router_Api());
     } else {
         $router->addConfig(new Zend_Config_Ini(CONFIG_DIR . '/routes.ini', 'routes'));
         fire_plugin_hook('define_routes', array('router' => $router));
         $this->_addHomepageRoute($router);
     }
     return $router;
 }
Пример #5
0
 public function applySearchFilters($select, $params, $retrieveInfos = false)
 {
     // For Url /search?query...
     // Set the query string if not passed.
     if (!isset($params['query'])) {
         $params['query'] = '';
     }
     // Set the query type if not passed.
     if (!isset($params['query_type'])) {
         $params['query_type'] = 'full_text';
     }
     // Set the base select statement.
     $select->reset(Zend_Db_Select::COLUMNS);
     $select->columns(array('record_type', 'record_id', 'title'));
     // Set the where clause according to the query type.
     if ('exact_match' == $params['query_type']) {
         $where = '`search_texts`.`text` LIKE ?';
         $params['query'] = "%{$params['query']}%";
     } else {
         if ('boolean' == $params['query_type']) {
             $where = 'MATCH (`search_texts`.`text`) AGAINST (? IN BOOLEAN MODE)';
         } else {
             $where = 'MATCH (`search_texts`.`text`) AGAINST (?)';
         }
     }
     $select->where($where, $params['query']);
     // Must fire the "search_sql" hook here instead of relying on the native
     // "search_text_browse_sql" hook to ensure that the subsequent WHERE
     // clauses are not reset. This hook can be used when a custom search
     // strategy is added using the "search_query_types" filter.
     fire_plugin_hook('search_sql', array('select' => $select, 'params' => $params));
     // Search only those record types that are configured to be searched.
     $searchRecordTypes = get_custom_search_record_types();
     if ($searchRecordTypes) {
         $select->where('`search_texts`.`record_type` IN (?)', array_keys($searchRecordTypes));
     }
     // Search on an specific record type.
     if (isset($params['record_types'])) {
         $select->where('`search_texts`.`record_type` IN (?)', $params['record_types']);
     }
     // Restrict access to private records.
     $showNotPublic = Zend_Registry::get('bootstrap')->getResource('Acl')->isAllowed(current_user(), 'Search', 'showNotPublic');
     if (!$showNotPublic) {
         $select->where('`search_texts`.`public` = 1');
     }
     if ($retrieveInfos) {
         $select->joinLeft(array('hierarchies' => 'omeka_hierarchies'), 'search_texts.record_id = hierarchies.id', array('hierarchies.atom_top_parent_id', 'hierarchies.atom_id', 'search_texts.record_id as id'));
     }
 }
Пример #6
0
 public function render($content)
 {
     $type = $this->getType();
     $record = $this->getRecord();
     //hooks echo the content, so stuff the hook results into an output buffer
     //then put that ob content into a variable
     ob_start();
     fire_plugin_hook("admin_" . $type . "_panel_buttons", array('view' => $this, 'record' => $record));
     $buttonsHtml = ob_get_contents();
     ob_end_clean();
     ob_start();
     fire_plugin_hook("admin_" . $type . "_panel_fields", array('view' => $this, 'record' => $record));
     $fieldsHtml = ob_get_contents();
     ob_end_clean();
     //this div was supplied by ActionPanelHook to allow for this replacement
     $html = str_replace("<div id='button-field-line'></div>", $buttonsHtml, $content);
     return $html . $fieldsHtml;
 }
Пример #7
0
 public function editNavigationAction()
 {
     require_once APP_DIR . '/forms/Navigation.php';
     $form = new Omeka_Form_Navigation();
     fire_plugin_hook('navigation_form', array('form' => $form));
     $this->view->form = $form;
     if ($this->getRequest()->isPost()) {
         if ($form->isValid($_POST)) {
             $form->saveFromPost();
             $this->_helper->flashMessenger(__('The navigation settings have been updated.'), 'success');
             $this->_helper->redirector('edit-navigation');
         } else {
             $this->_helper->flashMessenger(__('The navigation settings were not saved because of missing or invalid values.  All changed values have been restored.'), 'error');
             foreach ($form->getMessages() as $msg) {
                 $this->_helper->flashMessenger($msg, 'error');
             }
         }
     }
 }
Пример #8
0
 public function editAction()
 {
     $this->view->addHelperPath(USER_PROFILES_DIR . '/helpers', 'UserProfiles_View_Helper_');
     $allTypes = $this->_helper->db->getTable('UserProfilesType')->findAll();
     $typeId = $this->getParam('type');
     //if no typeId
     if (!$typeId) {
         $typeId = $allTypes['0']->id;
     }
     $profileType = $this->_helper->db->getTable('UserProfilesType')->find($typeId);
     $userId = $this->_getParam('id');
     if ($userId) {
         $user = $this->_helper->db->getTable('User')->find($userId);
     } else {
         $user = current_user();
         $userId = $user->id;
     }
     $this->view->user = $user;
     $userProfile = $this->_helper->db->getTable()->findByUserIdAndTypeId($userId, $typeId);
     if (!$userProfile) {
         $userProfile = new UserProfilesProfile();
         $userProfile->setOwner($user);
         $userProfile->type_id = $typeId;
         $userProfile->setRelationData(array('subject_id' => $userId));
     }
     if (!is_allowed($userProfile, 'edit')) {
         throw new Omeka_Controller_Exception_403();
     }
     if ($this->_getParam('submit')) {
         $userProfile->setPostData($_POST);
         if ($userProfile->save(false)) {
             fire_plugin_hook('user_profiles_save', array('post' => $_POST, 'profile' => $userProfile, 'type' => $profileType));
             $this->redirect("user-profiles/profiles/user/id/{$userId}/type/{$typeId}");
         } else {
             $this->_helper->flashMessenger($userProfile->getErrors());
         }
     }
     $this->view->userprofilesprofile = $userProfile;
     $this->view->userprofilestype = $profileType;
     $this->view->profile_types = apply_filters('user_profiles_type', $allTypes);
 }
Пример #9
0
 /**
  * Determine whether or not to filter form submissions for various controllers.
  * 
  * @param Zend_Controller_Request_Abstract $request
  * @return void
  **/
 public function preDispatch(Zend_Controller_Request_Abstract $request)
 {
     // Don't purify if the request is not a post
     if (!$request->isPost()) {
         return;
     }
     // Don't purify if the post is empty
     $post = $request->getPost();
     if (empty($post)) {
         return;
     }
     // Don't purify if the purifier is not enabled
     if (get_option('html_purifier_is_enabled') != '1') {
         return;
     }
     // Don't purify if there is no purifier
     $htmlPurifierFilter = new Omeka_Filter_HtmlPurifier();
     $purifier = Omeka_Filter_HtmlPurifier::getHtmlPurifier();
     if (!$purifier) {
         return;
     }
     // To process the items form, implement a 'filterItemsForm' method
     if ($this->isFormSubmission($request)) {
         $controllerName = $request->getControllerName();
         $filterMethodName = 'filter' . ucwords($controllerName) . 'Form';
         if (method_exists($this, $filterMethodName)) {
             $this->{$filterMethodName}($request, $htmlPurifierFilter);
         }
     }
     // Let plugins hook into this to process form submissions in their own way.
     fire_plugin_hook('html_purifier_form_submission', array('purifier' => $purifier));
     // No processing for users form, since it's already properly filtered by
     // User::filterPostData(). No processing for tags form, none of the tags
     // should be HTML. The only input on the tags form is the 'new_tag'
     // field on the edit page. No processing on the item-types form since
     // there are no HTML fields.
 }
Пример #10
0
 public function perform()
 {
     if (!($itemIds = $this->_options['itemIds'])) {
         return;
     }
     $delete = $this->_options['delete'];
     $metadata = $this->_options['metadata'];
     $custom = $this->_options['custom'];
     foreach ($itemIds as $id) {
         $item = $this->_getItem($id);
         if ($delete == '1') {
             $item->delete();
         } else {
             foreach ($metadata as $key => $value) {
                 if ($value === '') {
                     unset($metadata[$key]);
                 }
             }
             update_item($item, $metadata);
             fire_plugin_hook('items_batch_edit_custom', array('item' => $item, 'custom' => $custom));
         }
         release_object($item);
     }
 }
 public function init()
 {
     parent::init();
     $this->setAction(WEB_ROOT . '/commenting/comment/add');
     $this->setAttrib('id', 'comment-form');
     $user = current_user();
     $urlOptions = array('label' => __('Website'));
     $emailOptions = array('label' => __('Email (required)'), 'required' => true, 'validators' => array(array('validator' => 'EmailAddress')));
     $nameOptions = array('label' => __('Your name'));
     if ($user) {
         $emailOptions['value'] = $user->email;
         $nameOptions['value'] = $user->name;
     }
     $this->addElement('text', 'author_name', $nameOptions);
     $this->addElement('text', 'author_url', $urlOptions);
     $this->addElement('text', 'author_email', $emailOptions);
     $this->addElement('textarea', 'body', array('label' => __('Comment'), 'description' => __("Allowed tags:") . " &lt;p&gt;, &lt;a&gt;, &lt;em&gt;, &lt;strong&gt;, &lt;ul&gt;, &lt;ol&gt;, &lt;li&gt;", 'id' => 'comment-form-body', 'rows' => 6, 'required' => true, 'filters' => array(array('StripTags', array('allowTags' => array('p', 'span', 'em', 'strong', 'a', 'ul', 'ol', 'li'), 'allowAttribs' => array('style', 'href'))))));
     //assume registered users are trusted and don't make them play recaptcha
     if (!$user && get_option('recaptcha_public_key') && get_option('recaptcha_private_key')) {
         $this->addElement('captcha', 'captcha', array('label' => __("Please verify you're a human"), 'captcha' => array('captcha' => 'ReCaptcha', 'pubkey' => get_option('recaptcha_public_key'), 'privkey' => get_option('recaptcha_private_key'), 'ssl' => true)));
         $this->getElement('captcha')->removeDecorator('ViewHelper');
     }
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $params = $request->getParams();
     $record_id = $this->_getRecordId($params);
     $record_type = $this->_getRecordType($params);
     $this->addElement('hidden', 'record_id', array('value' => $record_id, 'decorators' => array('ViewHelper')));
     $this->addElement('hidden', 'path', array('value' => $request->getPathInfo(), 'decorators' => array('ViewHelper')));
     if (isset($params['module'])) {
         $this->addElement('hidden', 'module', array('value' => $params['module'], 'decorators' => array('ViewHelper')));
     }
     $this->addElement('hidden', 'record_type', array('value' => $record_type, 'decorators' => array('ViewHelper')));
     $this->addElement('hidden', 'parent_comment_id', array('id' => 'parent-id', 'value' => null, 'decorators' => array('ViewHelper')));
     fire_plugin_hook('commenting_form', array('comment_form' => $this));
     $this->addElement('submit', 'submit', array('label' => __('Submit')));
 }
Пример #12
0
 public function editSettingsAction()
 {
     require_once APP_DIR . '/forms/GeneralSettings.php';
     $form = new Omeka_Form_GeneralSettings();
     $form->setDefaults($this->getInvokeArg('bootstrap')->getResource('Options'));
     fire_plugin_hook('general_settings_form', array('form' => $form));
     $form->removeDecorator('Form');
     $this->view->form = $form;
     if ($this->getRequest()->isPost()) {
         if ($form->isValid($_POST)) {
             $options = $form->getValues();
             // Everything except the CSRF hash should correspond to a
             // valid option in the database.
             unset($options['settings_csrf']);
             foreach ($options as $key => $value) {
                 set_option($key, $value);
             }
             $this->_helper->flashMessenger(__('The general settings have been updated.'), 'success');
             $this->_helper->redirector('edit-settings');
         } else {
             $this->_helper->flashMessenger(__('There were errors found in your form. Please edit and resubmit.'), 'error');
         }
     }
 }
} else {
    ?>
    <h2><?php 
    echo __('You have no collections.');
    ?>
</h2>
    <?php 
    if (is_allowed('Collections', 'add')) {
        ?>
        <p><?php 
        echo __('Get started by adding your first collection.');
        ?>
</p>
        <a href="<?php 
        echo html_escape(url('collections/add'));
        ?>
" class="add big green button"><?php 
        echo __('Add a Collection');
        ?>
</a>
    <?php 
    }
}
?>

<?php 
fire_plugin_hook('admin_collections_browse', array('collections' => $collections, 'view' => $this));
?>

<?php 
echo foot();
Пример #14
0
?>

    <div class="field">
        <div class="two columns alpha">
        <?php 
echo $this->formLabel('featured', __('Featured/Non-Featured'));
?>
        </div>
        <div class="five columns omega inputs">
        <?php 
echo $this->formSelect('featured', @$_REQUEST['featured'], array(), label_table_options(array('1' => __('Only Featured Items'), '0' => __('Only Non-Featured Items'))));
?>
        </div>
    </div>
    <?php 
fire_plugin_hook('admin_items_search', array('view' => $this));
?>
    </div>
    <?php 
if (!isset($buttonText)) {
    $buttonText = __('Search for items');
}
?>
    <?php 
if (isset($useSidebar) && $useSidebar) {
    ?>
    <div class="three columns omega">
        <div id="save" class="panel">
            <input type="submit" class="submit big green button" name="submit_search" id="submit_search_advanced" value="<?php 
    echo $buttonText;
    ?>
Пример #15
0
}
?>

    <!-- The following prints a citation for this item. -->
    <div id="item-citation" class="element">
        <h3><?php 
echo __('Citation');
?>
</h3>
        <div class="element-text"><?php 
echo metadata('item', 'citation', array('no_escape' => true));
?>
</div>
    </div>
       <?php 
fire_plugin_hook('public_items_show', array('view' => $this, 'item' => $item));
?>


    <ul class="item-pagination navigation">
        <li id="previous-item" class="previous"><?php 
echo link_to_previous_item_show();
?>
</li>
        <li id="next-item" class="next"><?php 
echo link_to_next_item_show();
?>
</li>
    </ul>

</div> <!-- End of Primary. -->
Пример #16
0
    <section class="three columns omega">
        <div id="save" class="panel">
            <input type="submit" class="big green button" name="submit" value="<?php 
echo __('Save Changes');
?>
">
            <?php 
if (is_allowed('ItemTypes', 'delete')) {
    ?>
                <?php 
    echo link_to($item_type, 'delete-confirm', __('Delete'), array('class' => 'big red button delete-confirm'));
    ?>
            <?php 
}
?>
            <?php 
fire_plugin_hook("admin_item_types_panel_buttons", array('view' => $this, 'record' => $item_type));
?>
            <?php 
fire_plugin_hook("admin_item_types_panel_fields", array('view' => $this, 'record' => $item_type));
?>
        </div>
    </section>
</form>

<script type="text/javascript">
Omeka.addReadyCallback(Omeka.ItemTypes.enableSorting);
Omeka.addReadyCallback(Omeka.ItemTypes.addHideButtons);
</script>
<?php 
echo foot();
Пример #17
0
$recentItems = get_theme_option('Homepage Recent Items');
if ($recentItems === null || $recentItems === '') {
    $recentItems = 3;
} else {
    $recentItems = (int) $recentItems;
}
if ($recentItems) {
    ?>
<div id="recent-items">
    <h2><?php 
    echo __('Recently Added Items');
    ?>
</h2>
    <?php 
    echo recent_items($recentItems);
    ?>
    <p class="view-items-link"><a href="<?php 
    echo html_escape(url('items'));
    ?>
"><?php 
    echo __('View All Items');
    ?>
</a></p>
</div><!--end recent-items -->
<?php 
}
fire_plugin_hook('public_home', array('view' => $this));
?>

<?php 
echo foot();
Пример #18
0
</p>
                <?php 
}
?>
                <p><?php 
echo __('Proudly powered by <a href="http://omeka.org">Omeka</a>.');
?>
</p>
                <a href="http://neh.gov" class="logo"><img src="<?php 
echo img('neh_50_logo_black.png');
?>
" title="NEH logo"></a>
            </div>

            <?php 
fire_plugin_hook('public_footer', array('view' => $this));
?>

        </footer>

    </div><!-- end wrap -->

    <script>
    jQuery(document).ready(function() {

        Omeka.showAdvancedForm();
        Omeka.skipNav();
        Emiglio.megaMenu();

        jQuery("#top-nav").accessibleMegaMenu({
            /* prefix for generated unique id attributes, which are required
Пример #19
0
echo __('Add Collection');
?>
" />

            <?php 
fire_plugin_hook("admin_collections_panel_buttons", array('view' => $this, 'record' => $collection));
?>

            <div id="public-featured">
                <?php 
echo $this->formLabel('public', __('Public'));
?>
                <?php 
echo $this->formCheckbox('public', $collection->public, array(), array('1', '0'));
?>

                <?php 
echo $this->formLabel('featured', __('Featured'));
?>
                <?php 
echo $this->formCheckbox('featured', $collection->featured, array(), array('1', '0'));
?>
            </div>
            <?php 
fire_plugin_hook("admin_collections_panel_fields", array('view' => $this, 'record' => $collection));
?>
        </div>
    </section>
</form>
<?php 
echo foot();
Пример #20
0
<?php

queue_js_file('settings');
echo head(array('title' => __('Settings'), 'bodyclass' => 'settings edit-settings'));
echo common('settings-nav');
echo flash();
?>

<form method="post">
    <section class="seven columns alpha">
        <?php 
echo $this->form;
?>
        <?php 
fire_plugin_hook('admin_settings_form', array('form' => $form, 'view' => $this));
?>
    </section>
    <section class="three columns omega">
        <div id="save" class="panel">
            <?php 
echo $this->formSubmit('submit', __('Save Changes'), array('class' => 'submit big green button'));
?>
        </div>
    </section>
</form>
<script type="text/javascript">
    jQuery(document).ready(function () {
        Omeka.Settings.checkImageMagick(
            <?php 
echo js_escape(url(array("controller" => "settings", "action" => "check-imagemagick")));
?>
Пример #21
0
</div>
	<div id="footer">
	
		
		    <?php 
if ($footerText = get_theme_option('Footer Text')) {
    ?>
        <p><?php 
    echo $footerText;
    ?>
</p>
        <?php 
}
?>
    <?php 
fire_plugin_hook('public_footer');
?>
		<ul class="pagination">
	
		</ul>
		<div class="row">
			<div class="footer-menu large-4 columns">
			
			<h4>About</h4>
		<ul class="link-list">
			<li><a href="http://omeka.org" id="omeka-logo" name="omeka-logo">Powered by Omeka</a></li> <li> <a href="http://omeka.org/codex/">Documentation</a></li> <li> <a href="http://omeka.org/forums/">Support Forums</a></li>
		</ul>
		</div>
		<div class="footer-menu large-4 columns">
			<h4>Menu</h4>
			<ul class="link-list"
Пример #22
0
 protected function _getUserForm(User $user, $ua = null)
 {
     $hasActiveElement = $user->exists() && $this->_helper->acl->isAllowed('change-status', $user);
     $form = new Omeka_Form_User(array('hasRoleElement' => $this->_helper->acl->isAllowed('change-role', $user), 'hasActiveElement' => $hasActiveElement, 'user' => $user, 'usersActivations' => $ua));
     $form->removeDecorator('Form');
     fire_plugin_hook('users_form', array('form' => $form, 'user' => $user));
     return $form;
 }
    echo $this->formSelect('public', @$_REQUEST['public'], array(), label_table_options(array('1' => __('Only Public Items'), '0' => __('Only Non-Public Items'))));
    ?>
          </div>
        </div>
      <?php 
}
?>

      <div class="field">
        <?php 
echo $this->formLabel('featured', __('Featured/Non-Featured'));
?>
        <div class="inputs">
        <?php 
echo $this->formSelect('featured', @$_REQUEST['featured'], array(), label_table_options(array('1' => __('Only Featured Items'), '0' => __('Only Non-Featured Items'))));
?>
        </div>
      </div>
      
      <?php 
fire_plugin_hook('public_items_search', array('view' => $this));
?>
    </div>
    
    <div>
      
    </div>
    
  </form>
</div>
Пример #24
0
                </div>
            <?php 
    }
    ?>

            <?php 
    echo fire_plugin_hook('public_items_browse_each', array('view' => $this, 'item' => $item));
    ?>

            </div><!-- end class="item-meta" -->
        </div><!-- end class="item hentry" -->
    <?php 
}
?>
    <?php 
echo fire_plugin_hook('public_items_browse', array('items' => $items, 'view' => $this));
?>

    <?php 
echo pagination_links();
?>
</div>
<div id="secondary">
    <!-- Featured Item -->
    <div id="featured-item" class="featured">
        <h2><?php 
echo __('Featured Item');
?>
</h2>
        <?php 
echo random_featured_items(1);
Пример #25
0
/**
 * Get the output of fire_plugin_hook() as a string.
 *
 * @package Omeka\Function\Plugin
 * @uses fire_plugin_hook()
 * @param string $name The hook name.
 * @param array $args Arguments to be passed to the hook implementations.
 * @return string
 */
function get_plugin_hook_output($name, array $args = array())
{
    ob_start();
    fire_plugin_hook($name, $args);
    $content = ob_get_contents();
    ob_end_clean();
    return $content;
}
Пример #26
0
    ?>
</h2>
        <div class="element-text">
            <ul>
                <li><?php 
    echo metadata('collection', array('Dublin Core', 'Contributor'), array('delimiter' => '</li><li>'));
    ?>
</li>
            </ul>
        </div>
    </div><!-- end collectors -->
    <?php 
}
?>
    <?php 
echo fire_plugin_hook('public_collections_show', array('view' => $this, 'collection' => $collection));
?>
</div>
<div id="secondary">
    <div id="collection-items">
        <?php 
$collectionItems = get_records('item', array('collection' => $collectionId), 3);
?>
        <?php 
foreach (loop('items', $collectionItems) as $item) {
    ?>

            <h3><?php 
    echo link_to_item(metadata($item, array('Dublin Core', 'Title')), array('class' => 'permalink'), 'show', $item);
    ?>
</h3>
Пример #27
0
/**
 * Display the CSS layout for the exhibit in the public head
 */
function exhibit_builder_public_head($args)
{
    $request = Zend_Controller_Front::getInstance()->getRequest();
    $module = $request->getModuleName();
    if ($module == 'exhibit-builder') {
        queue_css_file('exhibits');
        if ($exhibitPage = get_current_record('exhibit_page', false)) {
            $blocks = $exhibitPage->ExhibitPageBlocks;
            $layouts = array();
            foreach ($blocks as $block) {
                $layout = $block->getLayout();
                if (!array_key_exists($layout->id, $layouts)) {
                    $layouts[$layout->id] = true;
                    try {
                        queue_css_url($layout->getAssetUrl('layout.css'));
                    } catch (InvalidArgumentException $e) {
                        // no CSS for this layout
                    }
                }
            }
            fire_plugin_hook('exhibit_builder_page_head', array('view' => $args['view'], 'layouts' => $layouts));
        }
    }
}
Пример #28
0
            ?>
</span>
        <?php 
        }
        ?>
        </p>
        <div class='contribution-userprofile <?php 
        echo $profile->exists() ? "exists" : "";
        ?>
'>
        <p class="user-profiles-profile-description"><?php 
        echo $profileType->description;
        ?>
</p>
        <fieldset name="user-profiles">
        <?php 
        foreach ($profileType->Elements as $element) {
            echo $this->profileElementForm($element, $profile);
        }
        ?>
        </fieldset>
        </div>
        <?php 
    }
    ?>

<?php 
    // Allow other plugins to append to the form (pass the type to allow decisions
    // on a type-by-type basis).
    fire_plugin_hook('contribution_type_form', array('type' => $type, 'view' => $this));
}
Пример #29
0
            
            <nav class="navbar navbar-default pull-right">
              <button  class="navbar-toggle collapsed" data-toggle="collapse" aria-expanded="false" aria-controls="navbar" data-target="#main-nav-wrap">menu</button>
              <nav id="main-nav-wrap" class="collapse navbar-collapse">
<!--                 <ul class="nav navbar-nav">
                  <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
                      Hartford Voices <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu">
                      <li><a href="exhibit-landing.html">Joe Bun Keo</a></li>
                      <li><a href="exhibit-landing.html">Joel Salisbury</a></li>                    
                    </ul>
                  </li>
                  <li><a href="#">Find Your Voice</a></li>
                  <li><a href="#">Collections</a></li>
                  <li><a href="#">About</a></li>
                </ul> -->
                <?php 
echo public_nav_main_bootstrap();
?>
              </nav>
            </nav>
          </div>
        </div>
      </div>
    </header>
  
        <?php 
fire_plugin_hook('public_content_top', array('view' => $this));
Пример #30
0
?>
</label>
                <div class="inputs five columns omega">
                    <?php 
echo $this->formText('metadata[tags]', null, array('size' => 32));
?>
                    <p class="explanation"><?php 
echo __('List of tags to add to all checked items, separated by %s.', option('tag_delimiter'));
?>
</p>
                </div>
            </div>
        </fieldset>

        <?php 
fire_plugin_hook('admin_items_batch_edit_form', array('view' => $this));
?>
    
        <?php 
if ($showItemFields) {
    ?>
        <fieldset>
            <h2><?php 
    echo __('Delete Items');
    ?>
</h2>
            <p class="explanation"><?php 
    echo __('Check if you wish to delete selected items.');
    ?>
</p>
            <div class="field">