public function hookPublicHead() { queue_css_file('commenting'); queue_js_file('commenting'); queue_js_file('tiny_mce', 'javascripts/vendor/tiny_mce'); queue_js_string("Commenting.pluginRoot = '" . WEB_ROOT . "/commenting/comment/'"); }
protected function queueThemFilthyAssets() { queue_js_file('esc-neatline-ext'); queue_js_file('esc-jquery.fancybox.pack'); queue_css_file('esc-neatline-ext'); queue_css_file('esc-jquery.fancybox'); }
public function hookAdminHead($args) { // Core hookAdminHead taken from ElementTypes plugin $request = Zend_Controller_Front::getInstance()->getRequest(); $module = $request->getModuleName(); if (is_null($module)) { $module = 'default'; } $controller = $request->getControllerName(); $action = $request->getActionName(); if ($module === 'default' && $controller === 'items' && in_array($action, array('add', 'edit'))) { // ------------------------------------------ // An array of dependencies: // Each dependency is represented by a "dependee", a "term", and a "dependent". // ... meaning: If and only if the "dependee"'s value equals the "term", the "dependent" will be visible. // Retrieve dependencies from Database /* */ $json = get_option('conditional_elements_dependencies'); if (!$json) { $json = "[]"; } # else { $json = $this->_removeOutdatedDependencies($json); } /* */ echo "<script>var conditionalElementsDep={$json};</script>"; // ------------------------------------------ queue_js_file('conditionalelements'); } # if ($module === 'default' ... }
/** * Queue public payloads. * * @param array $args Array of arguments, with `exhibit`. */ public function hookNeatlinePublicStatic($args) { if ($args['exhibit']->hasWidget(self::ID)) { queue_css_file('dist/text-public'); queue_js_file('dist/text-public'); } }
public function hookPublicHead($args) { queue_css_file('jcarousel.responsive'); queue_css_file('carousel'); queue_js_file('jcarousel.responsive'); queue_js_file('jquery.jcarousel.min'); }
/** * Adds theme assets to queues. * * - Modernizr * - Respond.js * - Selectivizr * - Google Fonts style sheet * - Theme style sheet */ function queue_theme_assets() { queue_js_file('modernizr.min'); queue_js_file(array('respond.min', 'selectivizr.min'), 'javascripts', array('conditional' => 'lt IE 9')); get_view()->headLink()->prependStylesheet('http://fonts.googleapis.com/css?family=Crimson+Text:400,600,400italic,600italic|Cabin:400,600,400italic', 'screen'); queue_css_file('style'); }
public function hookExhibitBuilderPageHead($args) { if (array_key_exists('lightbox-gallery', $args['layouts']) || array_key_exists('lightbox-file-text', $args['layouts']) || array_key_exists('lightbox-book', $args['layouts'])) { queue_js_file('lightbox.min', 'javascripts/lightbox'); queue_css_file('lightbox'); } }
/** * Queue editor payloads. * * @param array $args Array of arguments, with `exhibit`. */ public function hookNeatlineEditorStatic($args) { if ($args['exhibit']->hasWidget(self::ID)) { queue_css_file('payloads/waypoints-editor'); queue_js_file('payloads/waypoints-editor'); } }
public function hookExhibitBuilderPageHead($args) { queue_css_file('slick'); queue_js_file('slick'); queue_css_file('jquery.fancybox'); queue_css_file('jquery.fancybox-buttons'); queue_js_file('jquery.fancybox'); }
/** * Queue css and javascript files when admin section loads * *@return void */ public function hookAdminHead() { $language = array('PleaseWait' => __('Please wait...'), 'Title' => __('Title'), 'Description' => __('Description'), 'ItemType' => __('Item Type'), 'Item' => __('Item'), 'Field' => __('Field'), 'OldValue' => __('Old Value'), 'NewValue' => __('New Value'), 'ErrorGeneratingPreview' => __('Error generating preview! :('), 'CouldNotGeneratePreview' => __('Apologies, but we could not generate a preview at this time.') . ' ' . __('You may be asking for too many changes at once.') . ' ' . __('Anyway, the bulk edition will be done in the background.'), 'ItemsPreviewRequestTooLong' => __('The items preview request is taking too long!') . ' ' . __('You must be trying to select a ton of items at once.') . ' ' . __('Preview is not possible, but the bulk edition will be done in the background.'), 'FieldsPreviewRequestTooLong' => __('The fields preview request is taking too long!') . ' ' . __('You must be trying to select a ton of fields at once.') . ' ' . __('Preview is not possible, but the bulk edition will be done in the background.'), 'ChangesPreviewRequestTooLong' => __('The changes preview request is taking too long!') . ' ' . __('You must be trying to make a ton of changes at once.') . ' ' . __('Preview is not possible, but the bulk edition will be done in the background.'), 'SelectActionPerform' => __('Please select an action to perform.'), 'NoItemFound' => __('No matching items found.'), 'NoFieldFound' => __('No matching field found.'), 'NoChange' => __('No change or no preview.'), 'PlusItems' => __('Plus %s more items.', '%s'), 'PlusFields' => __('...and corresponding fields from a total of %s items.', '%s'), 'PlusChanges' => __('...and changes for a total of %s items.', '%s'), 'ShowMore' => __('Show more.')); $language = json_encode($language); queue_js_string("Omeka.BulkMetadataEditor = {language: {$language}};"); queue_js_file('BulkMetadataEditor'); queue_css_file('BulkMetadataEditor'); }
/** * Queue editor payloads. * * @param array $args Array of arguments, with `exhibit`. */ public function hookNeatlineEditorStatic($args) { if ($args['exhibit']->hasWidget(self::ID)) { simile_queueSimileApi(); queue_css_file('dist/simile-public'); queue_js_file('dist/simile-editor'); } }
/** * Include exhibit-specific theme assets. * * @param NeatlineExhibit $exhibit The exhibit. */ function nl_queueExhibitTheme($exhibit) { try { queue_css_file('style', null, false, "exhibits/themes/{$exhibit->slug}"); queue_js_file('script', "exhibits/themes/{$exhibit->slug}"); } catch (Exception $e) { } }
function hookPublicHead() { queue_js_file('getUserMedia.min'); queue_css_file('audio_recorder'); queue_css_file('dialog/jquery-ui.min'); queue_css_file('dialog/jquery-ui.theme.min'); queue_css_file('dialog/jquery-ui.structure.min'); }
public function hookPublicHead($args) { if (substr(current_url(), 0, 11) == '/items/show') { queue_js_file('openseadragon.min'); queue_js_file('zoom'); queue_css_file('zoom'); } }
public function reorderAction() { queue_js_file('reorderelementtexts_drag'); queue_css_file('reorderelementtexts_drag'); $data = SELF::checkItemElement(); $this->view->elements = $data["elements"]; $this->view->output = $data["output"]; $this->view->title = $data["title"]; $this->view->elementTitle = $data["elementTitle"]; }
public function hookAdminHead() { $selector = get_option('select2_css_selector'); if ($selector) { queue_js_file('select2.min'); queue_css_file('select2.min'); $selector = preg_replace('/\\s+/', ' ', $selector); $selector = json_encode($selector); queue_js_string("\n Omeka.Select2 = {};\n Omeka.Select2.CssSelector = {$selector};\n "); queue_js_file('select2_apply'); } }
public function hookAdminHead($args) { $request = Zend_Controller_Front::getInstance()->getRequest(); $module = $request->getModuleName(); if (is_null($module)) { $module = 'default'; } $controller = $request->getControllerName(); $action = $request->getActionName(); if ($module === 'default' && $controller === 'items' && in_array($action, array('add', 'edit'))) { queue_js_file('structured_name'); } }
public function hookPublicHead($args) { $request = Zend_Controller_Front::getInstance()->getRequest(); if ($request->getControllerName() == 'items' && $request->getActionName() == 'show') { //add javascript and css for dealing with the user tags only to item show pages $view = $args['view']; //don't know why $view->item isn't giving me the object, but it isn't, so go via request $itemId = $request->getParam('id'); queue_css_file('user-tags'); queue_css_file('jquery-ui'); queue_js_file('user-tags'); $js = "UserTags.webRoot = '" . WEB_ROOT . "'; "; $js .= "UserTags.itemId = " . $itemId . "; "; queue_js_string($js); } }
public function hookAdminHead($args) { // Core hookAdminHead taken from ElementTypes plugin $request = Zend_Controller_Front::getInstance()->getRequest(); $module = $request->getModuleName(); if (is_null($module)) { $module = 'default'; } $controller = $request->getControllerName(); $action = $request->getActionName(); if ($module === 'default' && $controller === 'items' && in_array($action, array('add', 'edit'))) { queue_js_string("\r\n\t\t\t\tvar reorderElementTestsButton = '" . __("Reorder Inputs") . "';\r\n\t\t\t\tvar reorderElementTextsUrl = '" . html_escape(url('reorder-element-texts/index/reorder')) . "';\r\n\t\t\t"); queue_js_file('reorderelementtexts'); } # if ($module === 'default' ... }
* @subpackage solr-search * @copyright 2012 Rector and Board of Visitors, University of Virginia * @license http://www.apache.org/licenses/LICENSE-2.0.html */ ?> <?php queue_css_file('results'); ?> <?php queue_js_file('moment'); queue_js_file('jquery.daterangepicker'); queue_js_string('var search_url = "' . url("solr-search") . '"; var autocompleteChoicesUrl = ' . js_escape(url('solr-search/results/autocomplete')) . ';'); queue_js_file('searchformfunctions'); $key = get_option('geolocation_gmaps_key'); // ? get_option('geolocation_gmaps_key') : 'AIzaSyD6zj4P4YxltcYJZsRVUvTqG_bT1nny30o'; $lang = "nl"; queue_js_url("https://maps.googleapis.com/maps/api/js?sensor=false&libraries=places&key={$key}&language={$lang}"); echo head(array('title' => __('Solr Search'))); ?> <script type="text/javascript" charset="utf-8"> //<![CDATA[ //]]> </script> <h1><?php echo __('Search the Collection');
/** * Add a local JavaScript file or files to the current page. * * All scripts will be included in the page's head. This needs to be * called either before head(), or in a plugin_header hook. * * @package Omeka\Function\View\Asset * @see head_js() * @param string|array $file File to use, if an array is passed, each array * member will be treated like a file. * @param string $dir Directory to search for the file. Keeping the default is * recommended. * @param array $options An array of options. */ function queue_js_file($file, $dir = 'javascripts', $options = array()) { if (is_array($file)) { foreach ($file as $singleFile) { queue_js_file($singleFile, $dir, $options); } return; } queue_js_url(src($file, $dir, 'js'), $options); }
public function hookPublicHead($args) { queue_css_file('sotn'); queue_js_file('corrections'); }
<?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"))); ?>
<?php /** * @version $Id$ * @license http://www.gnu.org/licenses/gpl-3.0.txt * @copyright Center for History and New Media, 2013 * @package Contribution */ queue_css_file('contribution-browse'); queue_js_file('contribution-contributed-item'); queue_js_file('contribution-browse'); contribution_admin_header(array(__('Contributed Items (%d)', $total_results))); // To avoid to determine rights for each record. $allowToManage = is_allowed('Items', 'edit') || is_allowed('Items', 'update') || is_allowed('Items', 'delete'); echo $this->partial('contribution-navigation.php'); ?> <div id="primary"> <?php echo flash(); if (!Omeka_Captcha::isConfigured()) { ?> <p class="alert"><?php echo __("You have not entered your %s API keys under %s. We recommend adding these keys, or the contribution form will be vulnerable to spam.", '<a href="http://recaptcha.net/">reCAPTCHA</a>', "<a href='" . url('settings/edit-security#fieldset-captcha') . "'>" . __('security settings') . "</a>"); ?> </p> <?php } if ($total_results) { ?>
// Builds query string appended to requests for Bootstrap CSS. $theme_query = http_build_query(array('brand-primary' => '#ff7300', 'headings-font-family' => "Georgia,'Times New Roman',serif"), '', '&'); // Defines style settings for the theme. $theme_style = array('logo' => array('header' => '<img width="300" height="124" class="logo-header"' . ' src="' . img('logo/ccam.png') . '"' . ' alt="' . __('Cochrane Cunningham Archive & Museum') . '">', 'navbar' => false, 'footer' => '<img width="190" height="50" class="logo-footer"' . ' src="https://lib.bgsu.edu/assets/img/ul-white.svg"' . ' alt="' . __('BGSU University Libraries') . '">'), 'home' => array('header' => false, 'navbar' => false, 'footer' => false), 'search' => false, 'navbar' => true, 'footer' => true, 'item' => array('browse' => array('sort' => array('Dublin Core,Title' => __('Title'), 'added' => __('Date Added')), 'picture' => true, 'elements' => false, 'description' => true, 'tags' => __('Tags:')), 'show' => array('pictures' => __('Files'), 'elements' => true, 'files' => false, 'collection' => false, 'tags' => __('Tags'), 'citation' => __('Citation')))); // Make changes to theme if displayed as part of a collection or exhibit. if (!empty($exhibit)) { // Change home to exhibit homepage. $theme_style['home']['header'] = record_url($exhibit); // Change navigation to top pages of the exhibit. $theme_style['navbar'] = __DIR__ . '/../nav/exhibit-pages.php'; } elseif (!empty($collection)) { // Change home to collection homepage. $theme_style['home']['header'] = record_url($collection); // Change navbar to link to ways of viewing collection. $theme_style['navbar'] = __DIR__ . '/../nav/items.php'; // Change page search to search across collection. $theme_style['search'] = array('collection' => $collection->id); } // Load Bootstrap and Bootstrap theme files with appropriate variables. queue_css_url('https://lib.bgsu.edu/assets/theme/bootstrap.css?' . $theme_query); queue_css_url('https://lib.bgsu.edu/assets/theme/bootstrap-theme.css?' . $theme_query); // Load main CSS file for the theme. queue_css_file('theme'); // Load CSS file for this style. queue_css_file('style/ccam'); // Load Javascript files for Bootstrap and the theme. queue_js_url('https://lib.bgsu.edu/assets/js/bootstrap.js'); queue_js_file('theme'); // Return style information. return $theme_style;
<?php queue_css_file('commenting'); queue_js_file('commenting'); $pageTitle = __('Comments') . ' ' . __('(%s total)', $total_results); echo head(array('title' => $pageTitle, 'bodyclass' => 'commenting browse')); ?> <div id='primary'> <div class="pagination"><?php echo pagination_links(); ?> </div> <?php echo flash(); if (!Omeka_Captcha::isConfigured()) { ?> <p class="alert"><?php echo __("You have not entered your %s API keys under %s. We recommend adding these keys, or the commenting form will be vulnerable to spam.", '<a href="http://recaptcha.net/">reCAPTCHA</a>', "<a href='" . url('security#recaptcha_public_key') . "'>" . __('security settings') . "</a>"); ?> </p> <?php } ?> <?php if (is_allowed('Commenting_Comment', 'update-approved')) {
<?php queue_js_file('login'); $pageTitle = __('Log In'); echo head(array('bodyclass' => 'login', 'title' => $pageTitle), $header); ?> <h1><?php echo $pageTitle; ?> </h1> <p id="login-links"> <span id="backtosite"><?php echo link_to_home_page(__('Go to Home Page')); ?> </span> | <span id="forgotpassword"><?php echo link_to('users', 'forgot-password', __('Lost your password?')); ?> </span> </p> <?php echo flash(); ?> <?php echo $this->form->setAction($this->url('users/login')); ?> <?php echo foot(array(), $footer);
/** * Display the CSS style and javascript for the exhibit in the admin head */ function exhibit_builder_admin_head() { $request = Zend_Controller_Front::getInstance()->getRequest(); $module = $request->getModuleName(); $controller = $request->getControllerName(); // Check if using Exhibits controller, and add the stylesheet for general display of exhibits if ($module == 'exhibit-builder' && $controller == 'exhibits') { queue_css_file('exhibits', 'screen'); queue_js_file(array('vendor/tiny_mce/tiny_mce', 'exhibits')); } }
fire_plugin_hook('public_head', array('view' => $this)); ?> <!-- Need to add custom and third-party CSS files? Include them here --> <?php queue_css_file('lib/bootstrap.min'); queue_css_file('style'); \queue_css_file('bootstrap-theme'); echo head_css(); ?> <!-- Need more JavaScript files? Include them here --> <?php queue_js_file('lib/bootstrap.min'); queue_js_file('globals'); echo head_js(); ?> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <?php echo body_tag(array('id' => @$bodyid, 'class' => @$bodyclass)); ?> <?php fire_plugin_hook('public_body', array('view' => $this)); ?> <!-- <header> <div class="container">
<?php /** * @package omeka * @subpackage solr-search * @copyright 2012 Rector and Board of Visitors, University of Virginia * @license http://www.apache.org/licenses/LICENSE-2.0.html */ ?> <?php queue_js_file('accordion'); queue_css_file('fields'); ?> <?php echo head(array('title' => __('Solr Search | Field Configuration'))); ?> <div id="solr-fields"> <?php echo $this->partial('admin/partials/navigation.php', array('tab' => 'fields')); ?> <div id="primary"> <h2><?php echo __('Field Configuration'); ?> </h2>