Skip to content
Snippets Groups Projects
Commit 74ce6907 authored by Eric Rasmussen's avatar Eric Rasmussen
Browse files

[gh-125] Merging testing into staging -c1184 -c1188

git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x/staging@1189 20a16fea-79d4-4915-8869-1ea9d5ebf173
parent 1f6de348
No related branches found
No related tags found
No related merge requests found
......@@ -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"
......@@ -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';
......
......@@ -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;
......
<?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 ?>:&nbsp;</<?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>
......@@ -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>
......
......@@ -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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment