diff --git a/sites/all/modules/unl/features/unl_news/unl_news.info b/sites/all/modules/unl/features/unl_news/unl_news.info index 68885c2d95fe9298547d9e97a737ea0fece99ee6..b11e59266d359e34bc0700424f9774c771e7a68f 100644 --- a/sites/all/modules/unl/features/unl_news/unl_news.info +++ b/sites/all/modules/unl/features/unl_news/unl_news.info @@ -14,4 +14,4 @@ name = "UNL News" package = "Features" php = "5.2.4" project = "unl_news" -version = "7.x-1.0-beta5" +version = "7.x-1.0-beta6" diff --git a/sites/all/modules/unl/features/unl_news/unl_news.views_default.inc b/sites/all/modules/unl/features/unl_news/unl_news.views_default.inc index 70fad5e850d76732946661c3f343bcb9a00a1a19..1aad6e740bd4a976c68cb18c2e2c9ceaf5d45207 100644 --- a/sites/all/modules/unl/features/unl_news/unl_news.views_default.inc +++ b/sites/all/modules/unl/features/unl_news/unl_news.views_default.inc @@ -52,6 +52,11 @@ function unl_news_views_default_views() { $handler->display->display_options['fields']['title']['hide_empty'] = 0; $handler->display->display_options['fields']['title']['empty_zero'] = 0; $handler->display->display_options['fields']['title']['link_to_node'] = 1; + /* Sort criterion: Content: Sticky */ + $handler->display->display_options['sorts']['sticky']['id'] = 'sticky'; + $handler->display->display_options['sorts']['sticky']['table'] = 'node'; + $handler->display->display_options['sorts']['sticky']['field'] = 'sticky'; + $handler->display->display_options['sorts']['sticky']['order'] = 'DESC'; /* Sort criterion: Content: Post date */ $handler->display->display_options['sorts']['created']['id'] = 'created'; $handler->display->display_options['sorts']['created']['table'] = 'node'; diff --git a/sites/all/modules/unl/unl.module b/sites/all/modules/unl/unl.module index e31c4cedd6afef6ed28f7d4b484704349a62b226..3c112335314b5310194f229e732c55ded6c89d65 100644 --- a/sites/all/modules/unl/unl.module +++ b/sites/all/modules/unl/unl.module @@ -302,7 +302,7 @@ function unl_menu() { 'type' => MENU_LOCAL_TASK, 'file' => 'unl_migration.php', ); - + $items['admin/content/unl/reset'] = array( 'title' => 'Reset Site', 'description' => 'Remove all nodes, menu items, etc from this site.', @@ -330,8 +330,8 @@ function unl_menu() { 'page callback' => 'unl_still_alive', 'access callback' => TRUE, ); - - // UNL + + // UNL $items['admin/config/system/unl'] = array( 'title' => 'UNL', 'description' => 'Configure UNL System Settings', @@ -637,10 +637,6 @@ function unl_form_alter(&$form, $form_state, $form_id) { // Also hide the "Promoted to front page" option $form['options']['promote']['#prefix'] = '<div style="display:none;">'; $form['options']['promote']['#suffix'] = '</div>'; - - // Also hide the "Sticky at top of lists" option - $form['options']['sticky']['#prefix'] = '<div style="display:none;">'; - $form['options']['sticky']['#suffix'] = '</div>'; } // Add the Roles checkboxes to the user edit form for users with ability to 'Administer users' but not 'Administer permissions' (Code below partially taken from user.module) @@ -972,7 +968,7 @@ function unl_init() { drupal_goto($primary_base_url . current_path()); } } - + if (variable_get('unl_use_base_tag', TRUE)) { $base_tag = array( '#type' => 'html_tag', @@ -984,7 +980,7 @@ function unl_init() { drupal_add_html_head($base_tag, 'base'); } drupal_add_js(array('unl' => array('use_base_tag' => variable_get('unl_use_base_tag', TRUE))), 'setting'); - + _unl_handle_directory_index(); } @@ -1285,11 +1281,11 @@ function unl_stream_wrappers_alter(&$wrappers) { class UnlPublicStreamWrapper extends DrupalPublicStreamWrapper { function getExternalUrl() { $url = $GLOBALS['base_url']; - + if (!variable_get('unl_clean_file_url')) { $url .= '/' . self::getDirectoryPath(); } - + $path = str_replace('\\', '/', $this->getTarget()); $url .= '/' . drupal_encode_path($path); return $url; diff --git a/sites/all/themes/unl_wdn/field--field-unl-newsimg.tpl.php b/sites/all/themes/unl_wdn/field--field-unl-newsimg.tpl.php new file mode 100644 index 0000000000000000000000000000000000000000..208c0ffc1b2cfff18d0892fb1a80feb8cd27c86f --- /dev/null +++ b/sites/all/themes/unl_wdn/field--field-unl-newsimg.tpl.php @@ -0,0 +1,56 @@ +<?php + +/** + * @file field--field-unl-newsimg.tpl.php + * unl_wdn template implementation to display the value of a news img field. + * + * Available variables: + * - $items: An array of field values. Use render() to output them. + * - $label: The item label. + * - $label_hidden: Whether the label display is set to 'hidden'. + * - $label_html_tag: The html tag to use for the label, h2, h3, div, etc. + * - $classes: String of classes that can be used to style contextually through + * CSS. It can be manipulated through the variable $classes_array from + * preprocess functions. The default values can be one or more of the + * following: + * - field: The current template type, i.e., "theming hook". + * - field-name-[field_name]: The current field name. For example, if the + * field name is "field_description" it would result in + * "field-name-field-description". + * - field-type-[field_type]: The current field type. For example, if the + * field type is "text" it would result in "field-type-text". + * - field-label-[label_display]: The current label position. For example, if + * the label position is "above" it would result in "field-label-above". + * + * Other variables: + * - $element['#object']: The entity to which the field is attached. + * - $element['#view_mode']: View mode, e.g. 'full', 'teaser'... + * - $element['#field_name']: The field name. + * - $element['#field_type']: The field type. + * - $element['#field_language']: The field language. + * - $element['#field_translatable']: Whether the field is translatable or not. + * - $element['#label_display']: Position of label display, inline, above, or + * hidden. + * - $field_name_css: The css-compatible field name. + * - $field_type_css: The css-compatible field type. + * - $classes_array: Array of html class attribute values. It is flattened + * into a string within the variable $classes. + * + * @see template_preprocess_field() + * @see theme_field() + */ +?> +<div class="<?php print $classes; ?>"<?php print $attributes; ?>> + <?php if (!$label_hidden) : ?> + <<?php print $label_html_tag; ?> class="field-label"<?php print $title_attributes; ?>><?php print $label ?>: </<?php print $label_html_tag; ?>> + <?php endif; ?> + <div class="field-items"<?php print $content_attributes; ?>> + <?php if ($element['#view_mode'] == "teaser") : ?> + <div class="field-item even"<?php print $item_attributes[0]; ?>><?php print render($items[0]); ?></div> + <?php else : ?> + <?php foreach ($items as $delta => $item) : ?> + <div class="field-item <?php print $delta % 2 ? 'odd' : 'even'; ?>"<?php print $item_attributes[$delta]; ?>><?php print render($item); ?></div> + <?php endforeach; ?> + <?php endif; ?> + </div> +</div> diff --git a/sites/all/themes/unl_wdn/node--unl-newsitem.tpl.php b/sites/all/themes/unl_wdn/node--unl-newsitem.tpl.php index f906141a0b9c732cf0b2c042c8b8102fa20bccbf..e1d94e4f3c25d7a5d96be5e1cf88a4026737d847 100644 --- a/sites/all/themes/unl_wdn/node--unl-newsitem.tpl.php +++ b/sites/all/themes/unl_wdn/node--unl-newsitem.tpl.php @@ -52,15 +52,17 @@ // We hide the comments and links now so that we can render them later. hide($content['comments']); hide($content['links']); - print render($content["body"]); // If more than one image is available, show the addtional images if ($view_mode == 'full' && isset($content["field_unl_newsimg"][1])) { + print render($content["body"]); unset($content["field_unl_newsimg"][0]); print render($content["field_unl_newsimg"]); } else if ($view_mode == 'teaser') { print render($content["field_unl_newsimg"]); + print render($content["body"]); } + ?> </div> diff --git a/sites/all/themes/unl_wdn/style.css b/sites/all/themes/unl_wdn/style.css index fbd45a1e2f4e0dee47cf50db8628076c460337c3..f533e2f166991018a8e4eb6b11ce7b466ad4ce7c 100644 --- a/sites/all/themes/unl_wdn/style.css +++ b/sites/all/themes/unl_wdn/style.css @@ -190,5 +190,5 @@ ul.links.inline {padding-left: 0 !important;} } .view-teaser .field-type-image .field-item { float: left; - margin-right: 20px; + margin: 0 20px 30px 0; }