Now all modules are in core modules folder

This commit is contained in:
Manuel Cillero 2017-08-08 12:14:45 +02:00
parent 5ba1cdfa0b
commit 05b6a91b0c
1907 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,39 @@
<?php
?>
<div>
<?php print $help; ?>
</div>
<?php if ($rows): ?>
<table id="content-display-overview" class="sticky-enabled">
<thead>
<tr>
<th><?php print t('Field'); ?></th>
<?php if ($basic): ?>
<th><?php print t('Label'); ?></th>
<?php endif; ?>
<?php foreach ($contexts as $key => $value): ?>
<th><?php print $value['title']; ?></th>
<th><?php print t('Exclude'); ?></th>
<?php endforeach; ?>
</tr>
</thead>
<tbody>
<?php
$count = 0;
foreach ($rows as $row): ?>
<tr class="<?php print $count % 2 == 0 ? 'odd' : 'even'; ?>">
<td><?php print $row->indentation; ?><span class="<?php print $row->label_class; ?>"><?php print $row->human_name; ?></span></td>
<?php if ($basic): ?>
<td><?php print $row->label; ?></td>
<?php endif; ?>
<?php foreach ($contexts as $context => $title): ?>
<td><?php print $row->{$context}->format; ?></td>
<td><?php print $row->{$context}->exclude; ?></td>
<?php endforeach; ?>
</tr>
<?php $count++;
endforeach; ?>
</tbody>
</table>
<?php print $submit; ?>
<?php endif; ?>

View file

@ -0,0 +1,101 @@
<?php
?>
<div>
<?php print $help; ?>
</div>
<table id="content-field-overview" class="sticky-enabled">
<thead>
<tr>
<th><?php print t('Label'); ?></th>
<th><?php print t('Weight'); ?></th>
<th><?php print t('Name'); ?></th>
<th><?php print t('Type'); ?></th>
<th><?php print t('Operations'); ?></th>
</tr>
</thead>
<tbody>
<?php
$count = 0;
foreach ($rows as $row): ?>
<tr class="<?php print $count % 2 == 0 ? 'odd' : 'even'; ?> <?php print $row->class ?>">
<?php
switch ($row->row_type):
case 'field': ?>
<td>
<?php print $row->indentation; ?>
<span class="<?php print $row->label_class; ?>"><?php print $row->label; ?></span>
</td>
<td><?php print $row->weight . $row->parent . $row->hidden_name; ?></td>
<td><?php print $row->field_name; ?></td>
<td><?php print $row->type; ?></td>
<td><?php print $row->configure; ?>&nbsp;&nbsp;<?php print $row->remove; ?></td>
<?php break;
case 'group': ?>
<td>
<?php print $row->indentation; ?>
<span class="<?php print $row->label_class; ?>"><?php print $row->label; ?></span>
</td>
<td><?php print $row->weight . $row->parent . $row->hidden_name; ?></td>
<td><?php print $row->group_name; ?></td>
<td><?php print $row->group_type; ?></td>
<td><?php print $row->configure; ?>&nbsp;&nbsp;<?php print $row->remove; ?></td>
<?php break;
case 'extra': ?>
<td>
<?php print $row->indentation; ?>
<span class="<?php print $row->label_class; ?>"><?php print $row->label; ?></span>
</td>
<td><?php print $row->weight . $row->parent . $row->hidden_name; ?></td>
<td colspan="2"><?php print $row->description; ?></td>
<td><?php print $row->configure; ?>&nbsp;&nbsp;<?php print $row->remove; ?></td>
<?php break;
case 'separator': ?>
<td colspan="5" class="region"><?php print t('Add'); ?></td>
<?php break;
case 'add_new_field': ?>
<td>
<?php print $row->indentation; ?>
<div class="<?php print $row->label_class; ?>">
<div class="content-new"><?php print theme('advanced_help_topic', 'content', 'add-new-field') . t('New field'); ?></div>
<?php print $row->label; ?>
</div>
</td>
<td><div class="content-new">&nbsp;</div><?php print $row->weight . $row->parent . $row->hidden_name; ?></td>
<td><div class="content-new">&nbsp;</div><?php print $row->field_name; ?></td>
<td><div class="content-new">&nbsp;</div><?php print $row->type; ?></td>
<td><div class="content-new">&nbsp;</div><?php print $row->widget_type; ?></td>
<?php break;
case 'add_existing_field': ?>
<td>
<?php print $row->indentation; ?>
<div class="<?php print $row->label_class; ?>">
<div class="content-new"><?php print theme('advanced_help_topic', 'content', 'add-existing-field') . t('Existing field'); ?></div>
<?php print $row->label; ?>
</div>
</td>
<td><div class="content-new">&nbsp;</div><?php print $row->weight . $row->parent . $row->hidden_name; ?></td>
<td colspan="2"><div class="content-new">&nbsp;</div><?php print $row->field_name; ?></td>
<td><div class="content-new">&nbsp;</div><?php print $row->widget_type; ?></td>
<?php break;
case 'add_new_group': ?>
<td>
<?php print $row->indentation; ?>
<div class="<?php print $row->label_class; ?>">
<div class="content-new"><?php print theme('advanced_help_topic', 'content', 'add-new-group') . t('New group'); ?></div>
<?php print $row->label; ?>
</div>
</td>
<td><div class="content-new">&nbsp;</div><?php print $row->weight . $row->parent . $row->hidden_name; ?></td>
<td><div class="content-new">&nbsp;</div><?php print $row->group_name; ?></td>
<td><div class="content-new">&nbsp;</div><?php print $row->group_type; ?></td>
<td><div class="content-new">&nbsp;</div><?php print $row->group_option; ?></td>
<?php break;
endswitch; ?>
</tr>
<?php $count++;
endforeach; ?>
</tbody>
</table>
<?php print $submit; ?>

View file

@ -0,0 +1,48 @@
<?php
/**
* @file content-field.tpl.php
* Default theme implementation to display the value of a field.
*
* Available variables:
* - $node: The node object.
* - $field: The field array.
* - $items: An array of values for each item in the field array.
* - $teaser: Whether this is displayed as a teaser.
* - $page: Whether this is displayed as a page.
* - $field_name: The field name.
* - $field_type: The field type.
* - $field_name_css: The css-compatible field name.
* - $field_type_css: The css-compatible field type.
* - $label: The item label.
* - $label_display: Position of label display, inline, above, or hidden.
* - $field_empty: Whether the field has any valid value.
*
* Each $item in $items contains:
* - 'view' - the themed view for that item
*
* @see template_preprocess_content_field()
*/
?>
<?php if (!$field_empty) : ?>
<div class="field field-type-<?php print $field_type_css ?> field-<?php print $field_name_css ?>">
<?php if ($label_display == 'above') : ?>
<div class="field-label"><?php print t($label) ?>:&nbsp;</div>
<?php endif;?>
<div class="field-items">
<?php $count = 1;
foreach ($items as $delta => $item) :
if (!$item['empty']) : ?>
<div class="field-item <?php print ($count % 2 ? 'odd' : 'even') ?>">
<?php if ($label_display == 'inline') { ?>
<div class="field-label-inline<?php print($delta ? '' : '-first')?>">
<?php print t($label) ?>:&nbsp;</div>
<?php } ?>
<?php print $item['view'] ?>
</div>
<?php $count++;
endif;
endforeach;?>
</div>
</div>
<?php endif; ?>

View file

@ -0,0 +1,21 @@
/* Node form display */
.node-form .content-multiple-table td.content-multiple-drag {
padding-left:0;
padding-right:0.5em;
}
.node-form .content-multiple-table td.content-multiple-drag a.tabledrag-handle{
padding-left:.5em;
}
/* 'Manage fields' overview */
#content-field-overview-form .advanced-help-link,
#content-display-overview-form .advanced-help-link {
margin: 4px 0 0 4px;
}
table#content-field-overview .label-add-new-field,
table#content-field-overview .label-add-existing-field,
table#content-field-overview .label-add-new-group {
float: right;
}

View file

@ -0,0 +1,132 @@
/* Node display */
.field .field-label,
.field .field-label-inline,
.field .field-label-inline-first {
font-weight:bold;
}
.field .field-label-inline,
.field .field-label-inline-first {
display:inline;
}
.field .field-label-inline {
visibility:hidden;
}
/* Node form display */
.node-form .content-multiple-table td.content-multiple-drag {
width:30px;
padding-right:0;/*LTR*/
}
.node-form .content-multiple-table td.content-multiple-drag a.tabledrag-handle{
padding-right:.5em;/*LTR*/
}
.node-form .content-add-more .form-submit{
margin:0;
}
.content-multiple-remove-button {
display: block;
float: right;
height: 14px;
width: 16px;
margin: 2px 0 1px 0;
padding: 0;
background:transparent url(../images/remove.png) no-repeat 0 0;
border-bottom: #C2C9CE 1px solid;
border-right: #C2C9CE 1px solid;
}
.content-multiple-remove-button:hover {
background-position: 0 -14px;
}
.content-multiple-removed-row .content-multiple-remove-button {
background-position: 0 -28px;
}
.content-multiple-removed-row .content-multiple-remove-button:hover {
background-position: 0 -42px;
}
html.js .content-multiple-removed-row {
background-color: #ffffcc;
}
.content-multiple-weight-header,
.content-multiple-remove-header,
.content-multiple-remove-cell,
.content-multiple-table td.delta-order {
text-align: center;
}
html.js .content-multiple-weight-header,
html.js .content-multiple-remove-header span,
html.js .content-multiple-table td.delta-order,
html.js .content-multiple-remove-checkbox {
display: none;
}
.node-form .number {
display:inline;
width:auto;
}
.node-form .text {
width:auto;
}
/* CSS overrides for Views-based autocomplete results.
- #autocomplete uses "white-space:pre", which is no good with
Views' template-based rendering
- Field titles are rendered with <label> in default templates,
but we don't want the 'form' styling it gets under .form-item
*/
.form-item #autocomplete .reference-autocomplete {
white-space:normal;
}
.form-item #autocomplete .reference-autocomplete label {
display:inline;
font-weight:normal;
}
/* 'Manage fields' overview */
#content-field-overview-form .advanced-help-link,
#content-display-overview-form .advanced-help-link {
margin: 4px 4px 0 0;/*LTR*/
}
#content-field-overview-form .label-group,
#content-display-overview-form .label-group,
#content-copy-export-form .label-group {
font-weight: bold;
}
table#content-field-overview .label-add-new-field,
table#content-field-overview .label-add-existing-field,
table#content-field-overview .label-add-new-group {
float: left;/*LTR*/
}
table#content-field-overview tr.content-add-new .tabledrag-changed {
display: none;
}
table#content-field-overview tr.content-add-new .description {
margin-bottom: 0;
}
table#content-field-overview .content-new {
font-weight: bold;
padding-bottom: .5em;
}
/* 'Advanced help' pages */
.advanced-help-topic h3,
.advanced-help-topic h4,
.advanced-help-topic h5,
.advanced-help-topic h6 {
margin:1em 0 .5em 0;
}
.advanced-help-topic dd {
margin-bottom: .5em;
}
.advanced-help-topic span.code {
background-color:#EDF1F3;
font-family:"Bitstream Vera Sans Mono",Monaco,"Lucida Console",monospace;
font-size:0.9em;
padding:1px;
}
.advanced-help-topic .content-border {
border:1px solid #AAA
}

144
modules/cck/theme/theme.inc Normal file
View file

@ -0,0 +1,144 @@
<?php
/**
* @file
* Theme preprocess function for content-admin-field-overview-form.tpl.php.
*/
function template_preprocess_content_field_overview_form(&$vars) {
$form = &$vars['form'];
$vars['help'] = theme('advanced_help_topic', 'content', 'manage-fields') . t('Add fields and groups to the content type, and arrange them on content display and input forms.');
if (module_exists('fieldgroup')) {
$vars['help'] .= '<br/>'. t('You can add a field to a group by dragging it below and to the right of the group.');
}
if (!module_exists('advanced_help')) {
$vars['help'] .= '<br/>' . t('Note: Installing the <a href="!adv_help">Advanced help</a> module will let you access more and better help.', array('!adv_help' => 'http://drupal.org/project/advanced_help'));
}
$order = _content_overview_order($form, $form['#field_rows'], $form['#group_rows']);
$rows = array();
// Identify the 'new item' keys in the form, they look like
// _add_new_field, add_new_group.
$keys = array_keys($form);
$add_rows = array();
foreach ($keys as $key) {
if (substr($key, 0, 4) == '_add') {
$add_rows[] = $key;
}
}
while ($order) {
$key = reset($order);
$element = &$form[$key];
// Only display the 'Add' separator if the 'add' rows are still
// at the end of the table.
if (!isset($added_separator)) {
$remaining_rows = array_diff($order, $add_rows);
if (empty($remaining_rows) && empty($element['#depth'])) {
$row = new stdClass();
$row->row_type = 'separator';
$row->class = 'tabledrag-leaf region';
$rows[] = $row;
$added_separator = TRUE;
}
}
$row = new stdClass();
// Add target classes for the tabledrag behavior.
$element['weight']['#attributes']['class'] = 'field-weight';
$element['parent']['#attributes']['class'] = 'group-parent';
$element['hidden_name']['#attributes']['class'] = 'field-name';
// Add target classes for the update selects behavior.
switch ($element['#row_type']) {
case 'add_new_field':
$element['type']['#attributes']['class'] = 'content-field-type-select';
$element['widget_type']['#attributes']['class'] = 'content-widget-type-select';
break;
case 'add_existing_field':
$element['field_name']['#attributes']['class'] = 'content-field-select';
$element['widget_type']['#attributes']['class'] = 'content-widget-type-select';
$element['label']['#attributes']['class'] = 'content-label-textfield';
break;
}
foreach (element_children($element) as $child) {
$row->{$child} = drupal_render($element[$child]);
}
$row->label_class = 'label-'. strtr($element['#row_type'], '_', '-');
$row->row_type = $element['#row_type'];
$row->indentation = theme('indentation', isset($element['#depth']) ? $element['#depth'] : 0);
$row->class = 'draggable';
$row->class .= isset($element['#disabled_row']) ? ' menu-disabled' : '';
$row->class .= isset($element['#add_new']) ? ' content-add-new' : '';
$row->class .= isset($element['#leaf']) ? ' tabledrag-leaf' : '';
$row->class .= isset($element['#root']) ? ' tabledrag-root' : '';
$rows[] = $row;
array_shift($order);
}
$vars['rows'] = $rows;
$vars['submit'] = drupal_render($form);
// Add tabledrag behavior.
drupal_add_tabledrag('content-field-overview', 'match', 'parent', 'group-parent', 'group-parent', 'field-name', TRUE, 10);
drupal_add_tabledrag('content-field-overview', 'order', 'sibling', 'field-weight');
// Add settings for the update selects behavior.
$js_fields = array();
foreach (array_keys(content_existing_field_options($form['#type_name'])) as $field_name) {
$field = content_fields($field_name);
$js_fields[$field_name] = array('label' => $field['widget']['label'], 'type' => $field['type'], 'widget' => $field['widget']['type']);
}
drupal_add_js(array('contentWidgetTypes' => content_widget_type_options(), 'contentFields' => $js_fields), 'setting');
drupal_add_js(drupal_get_path('module', 'content') .'/js/content.admin.js');
}
/**
* Theme preprocess function for content-admin-display-overview-form.tpl.php.
*/
function template_preprocess_content_display_overview_form(&$vars) {
$form = &$vars['form'];
$contexts_selector = $form['#contexts'];
$vars['basic'] = $contexts_selector == 'basic';
$vars['contexts'] = content_build_modes($contexts_selector);
if ($contexts_selector == 'basic') {
$help = t("Configure how this content type's fields and field labels should be displayed when it's viewed in teaser and full-page mode.");
}
else {
$help = t("Configure how this content type's fields should be displayed when it's rendered in the following contexts.");
}
$help .= ' '. t("Use the 'Exclude' checkbox to exclude an item from the !content value passed to the node template.", array('!content' => '$content'));
$vars['help'] = $help;
$order = _content_overview_order($form, $form['#fields'], $form['#groups']);
if (empty($order)) {
$vars['rows'] = array();
$vars['submit'] = '';
return;
}
$rows = array();
foreach ($order as $key) {
$element = &$form[$key];
$row = new stdClass();
foreach (element_children($element) as $child) {
if (empty($row->{$child})) $row->{$child} = new stdClass();
if (!array_key_exists('exclude', $element[$child])) {
$row->{$child} = drupal_render($element[$child]);
}
else {
$row->{$child}->format = drupal_render($element[$child]['format']);
$row->{$child}->exclude = drupal_render($element[$child]['exclude']);
}
}
$row->label_class = in_array($key, $form['#groups']) ? 'label-group' : 'label-field';
$row->indentation = theme('indentation', isset($element['#depth']) ? $element['#depth'] : 0);
$rows[] = $row;
}
$vars['rows'] = $rows;
$vars['submit'] = drupal_render($form);
}