non security modules update

This commit is contained in:
Bachir Soussi Chiadmi
2015-04-20 16:32:07 +02:00
parent 6a8d30db08
commit 37fbabab56
466 changed files with 32690 additions and 9652 deletions

View File

@@ -3,7 +3,7 @@
<div class='clearfix features-components'>
<div class='column'>
<div class='info'>
<h3><?php print $name ?></h3>
<?php print $lock_feature ?><h3><?php print $name ?></h3>
<div class='description'><?php print $description ?></div>
<?php print $dependencies ?>
</div>

View File

@@ -81,6 +81,7 @@ function template_preprocess_features_admin_components(&$vars) {
// Other elements
$vars['buttons'] = drupal_render($form['buttons']);
$vars['form'] = $form;
$vars['lock_feature'] = theme('features_lock_link', array('feature' => $form['#feature']->name));
}
/**
@@ -109,6 +110,36 @@ function theme_features_module_status($vars) {
return "<span class=\"$class\">$text</span>";
}
/**
* Themes a lock link
*/
function theme_features_lock_link($vars) {
drupal_add_library('system', 'ui');
drupal_add_library('system', 'drupal.ajax');
$component = $vars['component'] ? $vars['component'] : '';
if ($component && features_component_is_locked($component)) {
return l(t('Component locked'), 'admin/structure/features/settings', array(
'attributes' => array(
'class' => 'features-lock-icon ui-icon ui-icon-locked',
'title' => t('This component is locked on a global level.'),
),
'fragment' => 'edit-lock-components',
));
}
$feature = $vars['feature'];
$is_locked = features_feature_is_locked($feature, $component);
$options = array(
'attributes' => array(
'class' => array('use-ajax features-lock-icon ui-icon ' . ($is_locked ? ' ui-icon-locked' : ' ui-icon-unlocked')),
'id' => 'features-lock-link-' . $feature . ($component ? '-' . $component : ''),
'title' => $is_locked ? t('This item is locked and features will not be rebuilt or reverted.') : t('This item is unlocked and will be rebuilt/reverted as normal.'),
),
'query' => array('token' => drupal_get_token('features/' . $feature . '/' . $component)),
);
$path = "admin/structure/features/" . $feature . "/lock/nojs" . ($component ? '/' . $component: '');
return l($is_locked ? t('UnLock') : t('Lock'), $path, $options);
}
/**
* Themes a module status display.
*/