├── badistro.profile ├── themes └── custom │ └── badistrotheme │ ├── js │ └── BAdistro.js │ ├── logo.png │ ├── favicon.ico │ ├── img │ ├── .DS_Store │ ├── social-cc.png │ ├── social-fb.png │ ├── social-fl.png │ ├── social-gp.png │ ├── social-rss.png │ ├── social-tw.png │ ├── social-yt.png │ ├── social-user.png │ ├── social-fb.svg │ ├── social-fl.svg │ ├── social-user.svg │ ├── social-rss.svg │ ├── social-tw.svg │ ├── social-gp.svg │ ├── social-cc.svg │ └── social-yt.svg │ ├── screenshot.png │ ├── layouts │ ├── tres-columnas │ │ ├── tres-columnas.png │ │ ├── tres-columnas.inc │ │ └── tres-columnas.tpl.php │ ├── columna-sidebar │ │ ├── columna-sidebar.png │ │ ├── columna-sidebar.css │ │ ├── columna-sidebar.inc │ │ └── columna-sidebar.tpl.php │ ├── una-columna-estrecha │ │ ├── una-columna-estrecha.inc │ │ └── una-columna-estrecha.tpl.php │ └── pagina-principal │ │ ├── pagina-principal.inc │ │ └── pagina-principal.tpl.php │ ├── badistrotheme.info │ ├── templates │ ├── footer.php │ ├── header.php │ ├── html.tpl.php │ └── page.tpl.php │ └── template.php ├── modules └── custom │ ├── badistro_bloques │ ├── templates │ │ ├── badistro_bloques_links.tpl.php │ │ ├── badistro_bloques_texto.tpl.php │ │ ├── badistro_bloques_titulo.tpl.php │ │ ├── badistro_bloques_separador.tpl.php │ │ ├── badistro_bloques_campo_siglas_area.tpl.php │ │ ├── badistro_bloques_campo_categoria_noticia.tpl.php │ │ ├── badistro_bloques_listado_vertical_item.tpl.php │ │ ├── badistro_bloques_listado_horizontal_item.tpl.php │ │ ├── badistro_bloques_listado_destacado_vertical_item.tpl.php │ │ ├── badistro_bloques_campo_costo.tpl.php │ │ ├── badistro_bloques_alerta.tpl.php │ │ ├── badistro_bloques_listado_destacado_horizontal_item.tpl.php │ │ ├── badistro_bloques_campo_requisitos.tpl.php │ │ ├── badistro_bloques_listado_vacio.tpl.php │ │ ├── badistro_bloques_galeria_imagenes_min.tpl.php │ │ ├── badistro_bloques_listado_vertical.tpl.php │ │ ├── badistro_bloques_listado_con_imagen_horizontal_item.tpl.php │ │ ├── badistro_bloques_listado_con_imagen_vertical_item.tpl.php │ │ ├── badistro_bloques_shortcut.tpl.php │ │ ├── badistro_bloques_listado_con_imagen_vertical.tpl.php │ │ ├── badistro_bloques_campo_tipo_tramite.tpl.php │ │ ├── badistro_bloques_campo_tags.tpl.php │ │ ├── badistro_bloques_imagen_destacada.tpl.php │ │ ├── badistro_bloques_redes_sociales_compartir.tpl.php │ │ ├── badistro_bloques_campo_links_relacionados.tpl.php │ │ ├── badistro_bloques_galeria_imagenes_min_item.tpl.php │ │ ├── badistro_bloques_campo_paginas_relacionadas.tpl.php │ │ ├── badistro_bloques_listado_con_imagen_horizontal.tpl.php │ │ ├── badistro_bloques_listado_horizontal.tpl.php │ │ ├── badistro_bloques_redes_sociales_timeline_twitter.tpl.php │ │ ├── badistro_bloques_listado_destacado_horizontal.tpl.php │ │ ├── badistro_bloques_listado_destacado_vertical.tpl.php │ │ ├── badistro_bloques_redes_sociales_timeline_facebook.tpl.php │ │ └── badistro_bloques_carrousel.tpl.php │ ├── badistro_bloques.info │ ├── js │ │ ├── tw.js │ │ └── fb-sdk.js │ ├── plugins │ │ └── content_types │ │ │ ├── separador.inc │ │ │ ├── imagen_destacada.inc │ │ │ ├── campo.inc │ │ │ ├── imagen.inc │ │ │ ├── alerta.inc │ │ │ ├── titulo.inc │ │ │ ├── galeria_imagenes.inc │ │ │ ├── texto.inc │ │ │ ├── shortcut.inc │ │ │ ├── carrousel.inc │ │ │ ├── redes_sociales.inc │ │ │ └── listado.inc │ ├── badistro_bloques.inc │ └── badistro_bloques.module │ ├── badistro_cck │ ├── badistro_cck.module │ ├── badistro_cck.features.user_role.inc │ ├── badistro_cck.features.taxonomy.inc │ ├── badistro_cck.features.user_permission.inc │ ├── badistro_cck.features.filter.inc │ ├── badistro_cck.features.menu_custom.inc │ ├── badistro_cck.features.inc │ ├── badistro_cck.info │ ├── badistro_cck.features.fe_block_settings.inc │ ├── badistro_cck.features.menu_links.inc │ └── badistro_cck.views_default.inc │ ├── badistro_areas │ ├── badistro_areas.module │ ├── badistro_areas.features.inc │ ├── badistro_areas.info │ ├── badistro_areas.pages_default.inc │ └── badistro_areas.features.field_instance.inc │ ├── badistro_paginas │ ├── badistro_paginas.module │ ├── badistro_paginas.info │ ├── badistro_paginas.features.inc │ ├── badistro_paginas.pages_default.inc │ └── badistro_paginas.features.field_instance.inc │ ├── badistro_noticias │ ├── badistro_noticias.module │ ├── badistro_noticias.features.inc │ ├── badistro_noticias.features.taxonomy.inc │ └── badistro_noticias.info │ └── badistro_tramites │ ├── badistro_tramites.module │ ├── badistro_tramites.features.taxonomy.inc │ ├── badistro_tramites.info │ └── badistro_tramites.features.inc ├── drupal-org-core.make ├── .gitignore ├── LICENSE.md ├── drupal-org.make ├── badistro.info ├── badistro.install ├── scripts └── build.sh └── README.md /badistro.profile: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /themes/custom/badistrotheme/js/BAdistro.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/custom/badistro_bloques/templates/badistro_bloques_links.tpl.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /drupal-org-core.make: -------------------------------------------------------------------------------- 1 | api = 2 2 | core = 7.x 3 | projects[drupal][version] = 7.41 -------------------------------------------------------------------------------- /modules/custom/badistro_bloques/templates/badistro_bloques_texto.tpl.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /modules/custom/badistro_bloques/badistro_bloques.info: -------------------------------------------------------------------------------- 1 | name = Bloques 2 | core = 7.x 3 | package = BA Distro -------------------------------------------------------------------------------- /modules/custom/badistro_bloques/templates/badistro_bloques_separador.tpl.php: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /modules/custom/badistro_bloques/templates/badistro_bloques_campo_siglas_area.tpl.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /themes/custom/badistrotheme/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/argob/AR-Distro/HEAD/themes/custom/badistrotheme/logo.png -------------------------------------------------------------------------------- /themes/custom/badistrotheme/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/argob/AR-Distro/HEAD/themes/custom/badistrotheme/favicon.ico -------------------------------------------------------------------------------- /themes/custom/badistrotheme/img/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/argob/AR-Distro/HEAD/themes/custom/badistrotheme/img/.DS_Store -------------------------------------------------------------------------------- /themes/custom/badistrotheme/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/argob/AR-Distro/HEAD/themes/custom/badistrotheme/screenshot.png -------------------------------------------------------------------------------- /themes/custom/badistrotheme/img/social-cc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/argob/AR-Distro/HEAD/themes/custom/badistrotheme/img/social-cc.png -------------------------------------------------------------------------------- /themes/custom/badistrotheme/img/social-fb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/argob/AR-Distro/HEAD/themes/custom/badistrotheme/img/social-fb.png -------------------------------------------------------------------------------- /themes/custom/badistrotheme/img/social-fl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/argob/AR-Distro/HEAD/themes/custom/badistrotheme/img/social-fl.png -------------------------------------------------------------------------------- /themes/custom/badistrotheme/img/social-gp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/argob/AR-Distro/HEAD/themes/custom/badistrotheme/img/social-gp.png -------------------------------------------------------------------------------- /themes/custom/badistrotheme/img/social-rss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/argob/AR-Distro/HEAD/themes/custom/badistrotheme/img/social-rss.png -------------------------------------------------------------------------------- /themes/custom/badistrotheme/img/social-tw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/argob/AR-Distro/HEAD/themes/custom/badistrotheme/img/social-tw.png -------------------------------------------------------------------------------- /themes/custom/badistrotheme/img/social-yt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/argob/AR-Distro/HEAD/themes/custom/badistrotheme/img/social-yt.png -------------------------------------------------------------------------------- /modules/custom/badistro_bloques/templates/badistro_bloques_campo_categoria_noticia.tpl.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /modules/custom/badistro_bloques/templates/badistro_bloques_listado_vertical_item.tpl.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /themes/custom/badistrotheme/img/social-user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/argob/AR-Distro/HEAD/themes/custom/badistrotheme/img/social-user.png -------------------------------------------------------------------------------- /modules/custom/badistro_bloques/templates/badistro_bloques_listado_horizontal_item.tpl.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /modules/custom/badistro_cck/badistro_cck.module: -------------------------------------------------------------------------------- 1 | 2 |3 | 4 |
5 | 6 | -------------------------------------------------------------------------------- /modules/custom/badistro_bloques/templates/badistro_bloques_campo_costo.tpl.php: -------------------------------------------------------------------------------- 1 |4 | 5 |
6 | 7 |5 | Facebook 6 |7 |
-
-
- ',
33 | 'filter_html_help' => 1,
34 | 'filter_html_nofollow' => 0,
35 | ),
36 | ),
37 | 'filter_autop' => array(
38 | 'weight' => 2,
39 | 'status' => 1,
40 | 'settings' => array(),
41 | ),
42 | 'filter_htmlcorrector' => array(
43 | 'weight' => 10,
44 | 'status' => 1,
45 | 'settings' => array(),
46 | ),
47 | ),
48 | );
49 |
50 | // Exported format: Full HTML.
51 | $formats['full_html'] = array(
52 | 'format' => 'full_html',
53 | 'name' => 'Full HTML',
54 | 'cache' => 1,
55 | 'status' => 1,
56 | 'weight' => 1,
57 | 'filters' => array(
58 | 'filter_url' => array(
59 | 'weight' => 0,
60 | 'status' => 1,
61 | 'settings' => array(
62 | 'filter_url_length' => 72,
63 | ),
64 | ),
65 | 'filter_autop' => array(
66 | 'weight' => 1,
67 | 'status' => 1,
68 | 'settings' => array(),
69 | ),
70 | 'filter_htmlcorrector' => array(
71 | 'weight' => 10,
72 | 'status' => 1,
73 | 'settings' => array(),
74 | ),
75 | ),
76 | );
77 |
78 | // Exported format: Plain text.
79 | $formats['plain_text'] = array(
80 | 'format' => 'plain_text',
81 | 'name' => 'Plain text',
82 | 'cache' => 1,
83 | 'status' => 1,
84 | 'weight' => 10,
85 | 'filters' => array(
86 | 'filter_html_escape' => array(
87 | 'weight' => 0,
88 | 'status' => 1,
89 | 'settings' => array(),
90 | ),
91 | 'filter_url' => array(
92 | 'weight' => 1,
93 | 'status' => 1,
94 | 'settings' => array(
95 | 'filter_url_length' => 72,
96 | ),
97 | ),
98 | 'filter_autop' => array(
99 | 'weight' => 2,
100 | 'status' => 1,
101 | 'settings' => array(),
102 | ),
103 | ),
104 | );
105 |
106 | return $formats;
107 | }
108 |
--------------------------------------------------------------------------------
/scripts/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e
3 |
4 | #
5 | # Build the distribution using the same process used on Drupal.org
6 | #
7 | # Usage: scripts/build.sh [-y]
from the profile main directory.
8 | #
9 |
10 | confirm () {
11 | read -r -p "${1:-Are you sure? [Y/n]} " response
12 | case $response in
13 | [yY][eE][sS]|[yY])
14 | true
15 | ;;
16 | *)
17 | false
18 | ;;
19 | esac
20 | }
21 |
22 | # Figure out directory real path.
23 | realpath () {
24 | TARGET_FILE=$1
25 |
26 | cd `dirname $TARGET_FILE`
27 | TARGET_FILE=`basename $TARGET_FILE`
28 |
29 | while [ -L "$TARGET_FILE" ]
30 | do
31 | TARGET_FILE=`readlink $TARGET_FILE`
32 | cd `dirname $TARGET_FILE`
33 | TARGET_FILE=`basename $TARGET_FILE`
34 | done
35 |
36 | PHYS_DIR=`pwd -P`
37 | RESULT=$PHYS_DIR/$TARGET_FILE
38 | echo $RESULT
39 | }
40 |
41 | usage() {
42 | echo "Usage: build.sh [-y] " >&2
43 | echo "Use -y to skip deletion confirmation" >&2
44 | exit 1
45 | }
46 |
47 | DESTINATION=$1
48 | ASK=true
49 |
50 | while getopts ":y" opt; do
51 | case $opt in
52 | y)
53 | DESTINATION=$2
54 | ASK=false
55 | ;;
56 | \?)
57 | echo "Invalid option: -$OPTARG" >&2
58 | usage
59 | ;;
60 | esac
61 | done
62 |
63 | if [ "x$DESTINATION" == "x" ]; then
64 | usage
65 | fi
66 |
67 | if [ ! -f drupal-org.make ]; then
68 | echo "[error] Run this script from the distribution base path."
69 | exit 1
70 | fi
71 |
72 | DESTINATION=$(realpath $DESTINATION)
73 |
74 | case $OSTYPE in
75 | darwin*)
76 | TEMP_BUILD=`mktemp -d -t tmpdir`
77 | ;;
78 | *)
79 | TEMP_BUILD=`mktemp -d`
80 | ;;
81 | esac
82 | # Drush make expects destination to be empty.
83 | rmdir $TEMP_BUILD
84 |
85 | if [ -d $DESTINATION ]; then
86 | echo "Removing existing destination: $DESTINATION"
87 | if $ASK; then
88 | confirm && chmod -R 777 $DESTINATION && rm -rf $DESTINATION
89 | if [ -d $DESTINATION ]; then
90 | echo "Aborted."
91 | exit 1
92 | fi
93 | else
94 | chmod -R 777 $DESTINATION && rm -rf $DESTINATION
95 | fi
96 | echo "done"
97 | fi
98 |
99 | # Build the profile.
100 | echo "Building the profile..."
101 | vendor/bin/drush make --no-cache --no-core --contrib-destination="." drupal-org.make tmp
102 |
103 | # Build a drupal-org-core.make file if it doesn't exist.
104 | if [ ! -f drupal-org-core.make ]; then
105 | cat >> drupal-org-core.make < 'devel',
16 | 'title' => 'Development',
17 | 'description' => 'Development link',
18 | );
19 | // Exported menu: main-menu.
20 | $menus['main-menu'] = array(
21 | 'menu_name' => 'main-menu',
22 | 'title' => 'Main menu',
23 | 'description' => 'The Main menu is used on many sites to show the major sections of the site, often in a top navigation bar.',
24 | );
25 | // Exported menu: management.
26 | $menus['management'] = array(
27 | 'menu_name' => 'management',
28 | 'title' => 'Management',
29 | 'description' => 'The Management menu contains links for administrative tasks.',
30 | );
31 | // Exported menu: menu-acerca-de-este-sitio.
32 | $menus['menu-acerca-de-este-sitio'] = array(
33 | 'menu_name' => 'menu-acerca-de-este-sitio',
34 | 'title' => 'Acerca de este sitio',
35 | 'description' => '',
36 | );
37 | // Exported menu: menu-paginas-relacionadas.
38 | $menus['menu-paginas-relacionadas'] = array(
39 | 'menu_name' => 'menu-paginas-relacionadas',
40 | 'title' => 'Páginas relacionadas',
41 | 'description' => '',
42 | );
43 | // Exported menu: menu-redes-sociales.
44 | $menus['menu-redes-sociales'] = array(
45 | 'menu_name' => 'menu-redes-sociales',
46 | 'title' => 'Redes sociales',
47 | 'description' => '',
48 | );
49 | // Exported menu: navigation.
50 | $menus['navigation'] = array(
51 | 'menu_name' => 'navigation',
52 | 'title' => 'Navigation',
53 | 'description' => 'The Navigation menu contains links intended for site visitors. Links are added to the Navigation menu automatically by some modules.',
54 | );
55 | // Exported menu: user-menu.
56 | $menus['user-menu'] = array(
57 | 'menu_name' => 'user-menu',
58 | 'title' => 'User menu',
59 | 'description' => 'The User menu contains links related to the user\'s account, as well as the \'Log out\' link.',
60 | );
61 | // Translatables
62 | // Included for use with string extractors like potx.
63 | t('Acerca de este sitio');
64 | t('Development');
65 | t('Development link');
66 | t('Main menu');
67 | t('Management');
68 | t('Navigation');
69 | t('Páginas relacionadas');
70 | t('Redes sociales');
71 | t('The Main menu is used on many sites to show the major sections of the site, often in a top navigation bar.');
72 | t('The Management menu contains links for administrative tasks.');
73 | t('The Navigation menu contains links intended for site visitors. Links are added to the Navigation menu automatically by some modules.');
74 | t('The User menu contains links related to the user\'s account, as well as the \'Log out\' link.');
75 | t('User menu');
76 |
77 |
78 | return $menus;
79 | }
80 |
--------------------------------------------------------------------------------
/modules/custom/badistro_bloques/plugins/content_types/titulo.inc:
--------------------------------------------------------------------------------
1 | TRUE,
5 | 'title' => t('Título'),
6 | 'description' => t('Crea un encabezado h1-h6.'),
7 | 'category' => t('BA Distro'),
8 | 'edit form' => 'badistro_bloques_titulo_edit_form',
9 | 'render callback' => 'badistro_bloques_titulo_render',
10 | 'admin info' => 'badistro_bloques_titulo_admin_info',
11 | 'defaults' => array(
12 | 'tag' => 'success',
13 | 'texto' => NULL,
14 | 'sobreescribir_titulo' => 0
15 | )
16 | );
17 |
18 | function badistro_bloques_titulo_edit_form($form, &$form_state){
19 | $form['tag'] = array(
20 | '#title' => t('Tag'),
21 | '#type' => 'select',
22 | '#default_value' => $form_state['conf']['tag'],
23 | '#options' => array(
24 | 'h1' => t('H1'),
25 | 'h2' => t('H2'),
26 | 'h3' => t('H3'),
27 | 'h4' => t('H4'),
28 | 'h5' => t('H5'),
29 | 'h6' => t('H6'),
30 | ),
31 | );
32 |
33 | $form['sobreescribir_titulo'] = array(
34 | '#title' => t('Sobreescribir título'),
35 | '#type' => 'checkbox',
36 | '#default_value' => $form_state['conf']['sobreescribir_titulo'],
37 | );
38 |
39 | $form['texto'] = array(
40 | '#title' => t('Contenido'),
41 | '#type' => 'textfield',
42 | '#default_value' => $form_state['conf']['texto'],
43 | '#states' => array(
44 | 'disabled' => array(
45 | ':input[name="sobreescribir_titulo"]' => array('checked' => FALSE),
46 | ),
47 | 'required' => array(
48 | ':input[name="sobreescribir_titulo"]' => array('checked' => TRUE),
49 | )
50 | ),
51 | );
52 |
53 | return $form;
54 | }
55 |
56 | /**
57 | * The submit form stores the data in $conf.
58 | */
59 | function badistro_bloques_titulo_edit_form_submit($form, &$form_state) {
60 | foreach (array_keys($form_state['plugin']['defaults']) as $key) {
61 | if (isset($form_state['values'][$key])) {
62 | $form_state['conf'][$key] = $form_state['values'][$key];
63 | }
64 | }
65 | }
66 |
67 | function badistro_bloques_titulo_render($subtype, $conf, $panel_args, $context = NULL){
68 | $block = new stdClass();
69 | $block->title = '';
70 | $node = tituloDeNodoDisponible($conf['sobreescribir_titulo']) ? node_load(arg(1)) : '';
71 | $block->content = theme(
72 | 'badistro_bloques_titulo',
73 | array(
74 | 'tag' => theme('html_tag', array('element' => array('#tag' => $conf['tag'], '#attributes' => array('class' => 'activities-sidbar'), '#value' => tituloDeNodoDisponible($conf['sobreescribir_titulo']) ? $node->title : $conf['texto'],
75 | ),
76 | )
77 | )
78 | )
79 | );
80 | return $block;
81 | }
82 |
83 | function tituloDeNodoDisponible($sobreescribir){
84 | return (!$sobreescribir && arg(0) == 'node' && is_numeric(arg(1)));
85 | }
86 |
87 | function badistro_bloques_titulo_admin_info($subtype, $conf, $contexts){
88 | if (!empty($conf)) {
89 | $block = new stdClass;
90 | $block->title = $conf['override_title'] ? $conf['override_title_text'] : t('Título');
91 | $block->content = t('@texto.', array('@texto' => $conf['texto']));
92 | return $block;
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/themes/custom/badistrotheme/templates/html.tpl.php:
--------------------------------------------------------------------------------
1 | language contains its textual representation.
11 | * $language->dir contains the language direction. It will either be 'ltr' or
12 | * 'rtl'.
13 | * - $rdf_namespaces: All the RDF namespace prefixes used in the HTML document.
14 | * - $grddl_profile: A GRDDL profile allowing agents to extract the RDF data.
15 | * - $head_title: A modified version of the page title, for use in the TITLE
16 | * tag.
17 | * - $head_title_array: (array) An associative array containing the string parts
18 | * that were used to generate the $head_title variable, already prepared to be
19 | * output as TITLE tag. The key/value pairs may contain one or more of the
20 | * following, depending on conditions:
21 | * - title: The title of the current page, if any.
22 | * - name: The name of the site.
23 | * - slogan: The slogan of the site, if any, and if there is no title.
24 | * - $head: Markup for the HEAD section (including meta tags, keyword tags, and
25 | * so on).
26 | * - $styles: Style tags necessary to import all CSS files for the page.
27 | * - $scripts: Script tags necessary to load the JavaScript files and settings
28 | * for the page.
29 | * - $page_top: Initial markup from any modules that have altered the
30 | * page. This variable should always be output first, before all other dynamic
31 | * content.
32 | * - $page: The rendered page content.
33 | * - $page_bottom: Final closing markup from any modules that have altered the
34 | * page. This variable should always be output last, after all other dynamic
35 | * content.
36 | * - $classes String of classes that can be used to style contextually through
37 | * CSS.
38 | *
39 | * @see bootstrap_preprocess_html()
40 | * @see template_preprocess()
41 | * @see template_preprocess_html()
42 | * @see template_process()
43 | *
44 | * @ingroup themeable
45 | */
46 | ?>
48 | >
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
59 |
60 |
61 | >
62 |
63 |
66 |
67 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/modules/custom/badistro_cck/badistro_cck.features.inc:
--------------------------------------------------------------------------------
1 | "1");
13 | }
14 | }
15 |
16 | /**
17 | * Implements hook_views_api().
18 | */
19 | function badistro_cck_views_api($module = NULL, $api = NULL) {
20 | return array("api" => "3.0");
21 | }
22 |
23 | /**
24 | * Implements hook_image_default_styles().
25 | */
26 | function badistro_cck_image_default_styles() {
27 | $styles = array();
28 |
29 | // Exported image style: gallery_large.
30 | $styles['gallery_large'] = array(
31 | 'label' => 'Gallery Large',
32 | 'effects' => array(
33 | 6 => array(
34 | 'name' => 'image_scale_and_crop',
35 | 'data' => array(
36 | 'width' => 750,
37 | 'height' => 350,
38 | ),
39 | 'weight' => 1,
40 | ),
41 | ),
42 | );
43 |
44 | // Exported image style: gallery_thumb.
45 | $styles['gallery_thumb'] = array(
46 | 'label' => 'Gallery Thumb',
47 | 'effects' => array(
48 | 5 => array(
49 | 'name' => 'image_scale_and_crop',
50 | 'data' => array(
51 | 'width' => 525,
52 | 'height' => 426,
53 | ),
54 | 'weight' => 1,
55 | ),
56 | ),
57 | );
58 |
59 | // Exported image style: imagen_destacada.
60 | $styles['imagen_destacada'] = array(
61 | 'label' => 'Imagen destacada',
62 | 'effects' => array(
63 | 8 => array(
64 | 'name' => 'image_scale',
65 | 'data' => array(
66 | 'width' => 1965,
67 | 'height' => '',
68 | 'upscale' => 1,
69 | ),
70 | 'weight' => 1,
71 | ),
72 | 10 => array(
73 | 'name' => 'image_crop',
74 | 'data' => array(
75 | 'width' => 1965,
76 | 'height' => 300,
77 | 'anchor' => 'center-top',
78 | ),
79 | 'weight' => 2,
80 | ),
81 | ),
82 | );
83 |
84 | // Exported image style: list.
85 | $styles['list'] = array(
86 | 'label' => 'List',
87 | 'effects' => array(
88 | 3 => array(
89 | 'name' => 'image_scale_and_crop',
90 | 'data' => array(
91 | 'width' => 130,
92 | 'height' => 100,
93 | ),
94 | 'weight' => 1,
95 | ),
96 | ),
97 | );
98 |
99 | // Exported image style: original.
100 | $styles['original'] = array(
101 | 'label' => 'Original',
102 | 'effects' => array(
103 | 7 => array(
104 | 'name' => 'image_scale',
105 | 'data' => array(
106 | 'width' => 1920,
107 | 'height' => '',
108 | 'upscale' => 0,
109 | ),
110 | 'weight' => 1,
111 | ),
112 | ),
113 | );
114 |
115 | // Exported image style: wide.
116 | $styles['wide'] = array(
117 | 'label' => 'Wide',
118 | 'effects' => array(
119 | 2 => array(
120 | 'name' => 'image_scale_and_crop',
121 | 'data' => array(
122 | 'width' => 2000,
123 | 'height' => 659,
124 | ),
125 | 'weight' => 1,
126 | ),
127 | ),
128 | );
129 |
130 | return $styles;
131 | }
132 |
--------------------------------------------------------------------------------
/modules/custom/badistro_bloques/plugins/content_types/galeria_imagenes.inc:
--------------------------------------------------------------------------------
1 | TRUE,
5 | 'title' => t('Galería de Imágenes'),
6 | 'description' => t('Muestra las imágenes de una noticia y/o trámite.'),
7 | 'category' => t('BA Distro'),
8 | 'render callback' => 'badistro_bloques_galeria_imagenes_render',
9 | 'edit form' => 'badistro_bloques_galeria_imagenes_edit_form',
10 | 'admin info' => 'badistro_bloques_galeria_imagenes_admin_info',
11 | 'defaults' => array(
12 | 'tipo' => 'min'
13 | )
14 | );
15 |
16 | /**
17 | * 'admin info' callback for panel pane.
18 | */
19 | function badistro_bloques_galeria_imagenes_admin_info($subtype, $conf, $contexts) {
20 | if (!empty($conf)) {
21 | $block = new stdClass;
22 | $block->title = $conf['override_title'] ? $conf['override_title_text'] : t('Galería de imágenes');
23 | $block->content = t('Galería de imágenes');
24 | return $block;
25 | }
26 | }
27 |
28 | /**
29 | * 'Edit form' callback for the content type.
30 | */
31 | function badistro_bloques_galeria_imagenes_edit_form($form, &$form_state) {
32 |
33 | $form['tipo'] = array(
34 | '#type' => 'select',
35 | '#title' => t('Tipo'),
36 | '#default_value' => $form_state['conf']['tipo'],
37 | '#options' => array(
38 | 'min' => t('Miniatura'),
39 | ),
40 | );
41 |
42 | return $form;
43 | }
44 |
45 | /**
46 | * The submit form stores the data in $conf.
47 | */
48 | function badistro_bloques_galeria_imagenes_edit_form_submit($form, &$form_state) {
49 | foreach (array_keys($form_state['plugin']['defaults']) as $key) {
50 | if (isset($form_state['values'][$key])) {
51 | $form_state['conf'][$key] = $form_state['values'][$key];
52 | }
53 | }
54 | }
55 | function badistro_bloques_galeria_imagenes_render($subtype, $conf, $panel_args, $context = NULL){
56 | $block = new stdClass();
57 | $block->title = '';
58 |
59 | if(arg(0) == 'node' && is_numeric(arg(1))){
60 | $node = node_load(arg(1));
61 | if(isset($node->field_imagenes) && !empty($node->field_imagenes)){
62 | foreach (field_get_items('node', $node, 'field_imagenes', NULL) as $key => $imagen) {
63 | $imagenes[$key]['thumb'] = theme_image_style(
64 | array(
65 | 'style_name' => 'gallery_thumb',
66 | 'path' => $imagen['uri'],
67 | 'width' => '',
68 | 'height' => '',
69 | 'attributes' => array(
70 | 'data-toggle' => "modal",
71 | 'data-target' => ".badistro-bloques-galeria-imagenes-" . $key
72 | )
73 | )
74 | );
75 | $imagenes[$key]['original'] = theme_image_style(
76 | array(
77 | 'style_name' => 'gallery_large',
78 | 'path' => $imagen['uri'],
79 | 'width' => '',
80 | 'height' => '',
81 | 'attributes' => array()
82 | )
83 | );
84 | $imagenes[$key]['render'] = theme(
85 | 'badistro_bloques_galeria_imagenes_' . $conf['tipo'] . '_item',
86 | array(
87 | "thumb" => $imagenes[$key]['thumb'],
88 | "original" => $imagenes[$key]['original'],
89 | "key" => $key
90 | )
91 | );
92 | }
93 | $block->content = theme(
94 | 'badistro_bloques_galeria_imagenes_' . $conf['tipo'],
95 | array('imagenes' => $imagenes)
96 | );
97 | } else {
98 | $block->content = '';
99 | }
100 | } else {
101 | $block->content = '';
102 | }
103 | return $block;
104 | }
--------------------------------------------------------------------------------
/modules/custom/badistro_bloques/plugins/content_types/texto.inc:
--------------------------------------------------------------------------------
1 | TRUE,
5 | 'title' => t('Texto'),
6 | 'description' => t('Crea un párrafo.'),
7 | 'category' => t('BA Distro'),
8 | 'edit form' => 'badistro_bloques_texto_edit_form',
9 | 'render callback' => 'badistro_bloques_texto_render',
10 | 'admin info' => 'badistro_bloques_texto_admin_info',
11 | 'defaults' => array(
12 | 'destacado' => 0,
13 | 'texto' => NULL,
14 | 'sobreescribir' => 0,
15 | 'cuerpo_o_resumen' => 'body'
16 | )
17 | );
18 |
19 | function badistro_bloques_texto_edit_form($form, &$form_state){
20 |
21 | $form['destacado'] = array(
22 | '#type' => 'checkbox',
23 | '#title' => t('Texto destacado'),
24 | );
25 | $form['cuerpo_o_resumen'] = array(
26 | '#type' => 'radios',
27 | '#title' => t('Cantidad de texto'),
28 | '#default_value' => $form_state['conf']['cuerpo_o_resumen'],
29 | '#options' => array('body' => 'Texto completo', 'summary' => 'Resumen'),
30 | );
31 | $form['sobreescribir'] = array(
32 | '#title' => t('¿Personalizar texto?'),
33 | '#type' => 'checkbox',
34 | '#default_value' => $form_state['conf']['sobreescribir'],
35 | );
36 | $form['texto'] = array(
37 | '#title' => t('Contenido'),
38 | '#type' => 'text_format',
39 | '#format' => 'full_html',
40 | '#default_value' => $form_state['conf']['texto']['value'],
41 | '#required' => FALSE,
42 | '#states' => array(
43 | 'disabled' => array(
44 | ':input[name="sobreescribir"]' => array('checked' => FALSE),
45 | ),
46 | 'required' => array(
47 | ':input[name="sobreescribir"]' => array('checked' => TRUE),
48 | )
49 | ),
50 | );
51 |
52 | return $form;
53 | }
54 |
55 | /**
56 | * The submit form stores the data in $conf.
57 | */
58 | function badistro_bloques_texto_edit_form_submit($form, &$form_state) {
59 | foreach (array_keys($form_state['plugin']['defaults']) as $key) {
60 | if (isset($form_state['values'][$key])) {
61 | $form_state['conf'][$key] = $form_state['values'][$key];
62 | }
63 | }
64 | }
65 |
66 | function badistro_bloques_texto_render($subtype, $conf, $panel_args, $context = NULL){
67 | $block = new stdClass();
68 | $block->title = '';
69 | $texto = $conf['sobreescribir'] ? $conf['texto'] : (esNodo() ? field_get_items('node', node_load(arg(1)), 'body', NULL) : '');
70 | $texto = $conf['sobreescribir'] ? $texto['value'] : ($conf['cuerpo_o_resumen'] == 'body' ? $texto[0]['safe_value'] : resumen($texto));
71 |
72 | $block->content = theme(
73 | 'badistro_bloques_texto',
74 | array(
75 | 'tag' => theme(
76 | 'html_tag',
77 | array(
78 | 'element' => array(
79 | '#tag' => 'div',
80 | '#attributes' => array(
81 | 'class' => $conf['destacado'] ? 'lead' : ''
82 | ),
83 | '#value' => $texto,
84 | ),
85 | )
86 | )
87 | )
88 | );
89 | return $block;
90 | }
91 |
92 | function badistro_bloques_texto_admin_info($subtype, $conf, $contexts){
93 | if (!empty($conf)) {
94 | $block = new stdClass;
95 | $block->title = $conf['override_title'] ? $conf['override_title_text'] : t('Texto');
96 | $block->content = t('@texto.', array('@texto' => $conf['texto']));
97 | return $block;
98 | }
99 | }
100 | function nodoDisponible($sobreescribir){
101 | return (!$sobreescribir && arg(0) == 'node' && is_numeric(arg(1)));
102 | }
103 | function resumen($campo){
104 | return empty($campo[0]['safe_summary']) ? views_trim_text(array('max_length' => 200, 'ellipsis' => TRUE, 'word_boundary' => TRUE,'html' => TRUE), $campo[0]['safe_value']) : $campo[0]['safe_summary'];
105 | }
--------------------------------------------------------------------------------
/modules/custom/badistro_cck/badistro_cck.info:
--------------------------------------------------------------------------------
1 | name = CCK
2 | core = 7.x
3 | package = BA Distro
4 | version = 7.x-1.0
5 | dependencies[] = ctools
6 | dependencies[] = entityreference
7 | dependencies[] = fe_block
8 | dependencies[] = features
9 | dependencies[] = filter
10 | dependencies[] = image
11 | dependencies[] = link
12 | dependencies[] = media
13 | dependencies[] = menu
14 | dependencies[] = node
15 | dependencies[] = page_manager
16 | dependencies[] = panelizer
17 | dependencies[] = pm_existing_pages
18 | dependencies[] = search
19 | dependencies[] = taxonomy
20 | dependencies[] = text
21 | dependencies[] = views
22 | features[ctools][] = page_manager:pages_default:1
23 | features[ctools][] = views:views_default:3.0
24 | features[fe_block_settings][] = menu-devel
25 | features[fe_block_settings][] = menu-menu-acerca-de-este-sitio
26 | features[fe_block_settings][] = menu-menu-paginas-relacionadas
27 | features[fe_block_settings][] = menu-menu-redes-sociales
28 | features[fe_block_settings][] = search-form
29 | features[fe_block_settings][] = system-main
30 | features[fe_block_settings][] = system-main-menu
31 | features[fe_block_settings][] = system-management
32 | features[fe_block_settings][] = system-navigation
33 | features[fe_block_settings][] = system-user-menu
34 | features[features_api][] = api:2
35 | features[field_base][] = body
36 | features[field_base][] = comment_body
37 | features[field_base][] = field_area
38 | features[field_base][] = field_categoria
39 | features[field_base][] = field_featured_image
40 | features[field_base][] = field_image
41 | features[field_base][] = field_imagenes
42 | features[field_base][] = field_links_relacionados
43 | features[field_base][] = field_paginas_relacionadas
44 | features[field_base][] = field_requisitos
45 | features[field_base][] = field_siglas
46 | features[field_base][] = field_tags
47 | features[field_base][] = field_tramite_costo
48 | features[field_base][] = field_tramite_tipo
49 | features[filter][] = filtered_html
50 | features[filter][] = full_html
51 | features[filter][] = plain_text
52 | features[image][] = gallery_large
53 | features[image][] = gallery_thumb
54 | features[image][] = imagen_destacada
55 | features[image][] = list
56 | features[image][] = original
57 | features[image][] = wide
58 | features[menu_custom][] = devel
59 | features[menu_custom][] = main-menu
60 | features[menu_custom][] = management
61 | features[menu_custom][] = menu-acerca-de-este-sitio
62 | features[menu_custom][] = menu-paginas-relacionadas
63 | features[menu_custom][] = menu-redes-sociales
64 | features[menu_custom][] = navigation
65 | features[menu_custom][] = user-menu
66 | features[menu_links][] = main-menu_noticias:noticias
67 | features[menu_links][] = main-menu_reas:areas
68 | features[menu_links][] = main-menu_trmites:tramites
69 | features[menu_links][] = menu-redes-sociales_facebook:http://www.facebook.com/gcba
70 | features[menu_links][] = menu-redes-sociales_flickr:http://www.flickr.com/photos/buenosairesprensa
71 | features[menu_links][] = menu-redes-sociales_google:https://plus.google.com/+GobiernodelaCiudaddeBuenosAires/
72 | features[menu_links][] = menu-redes-sociales_rss:http://www.google.com
73 | features[menu_links][] = menu-redes-sociales_twitter:http://www.twitter.com/gcba
74 | features[menu_links][] = menu-redes-sociales_youtube:http://www.youtube.com/user/GCBA
75 | features[page_manager_handlers][] = pm_existing_pages_node_overview__pagina_principal
76 | features[page_manager_pages][] = areas
77 | features[page_manager_pages][] = badistro_tutorial
78 | features[page_manager_pages][] = noticias
79 | features[page_manager_pages][] = tramites
80 | features[taxonomy][] = tags
81 | features[user_permission][] = access content
82 | features[user_permission][] = access content overview
83 | features[user_role][] = Editor de Contenido
84 | features[views_view][] = listado_de_contenido
85 |
--------------------------------------------------------------------------------
/themes/custom/badistrotheme/img/social-yt.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
43 |
--------------------------------------------------------------------------------
/modules/custom/badistro_bloques/plugins/content_types/shortcut.inc:
--------------------------------------------------------------------------------
1 | TRUE,
5 | 'title' => t('Shortcut'),
6 | 'description' => t('Crea un acceso directo'),
7 | 'category' => t('BA Distro'),
8 | 'render callback' => 'badistro_bloques_shortcut_render',
9 | 'edit form' => 'badistro_bloques_shortcut_edit_form',
10 | 'admin info' => 'badistro_bloques_shortcut_admin_info',
11 | 'defaults' => array(
12 | 'color_fondo' => 'shortcut-azul',
13 | 'icono' => 'glyphicon-home',
14 | 'titulo' => '',
15 | 'texto' => '',
16 | 'referencia' => array(),
17 | 'link' => ''
18 | )
19 | );
20 |
21 | /**
22 | * 'admin info' callback for panel pane.
23 | */
24 | function badistro_bloques_shortcut_admin_info($subtype, $conf, $contexts) {
25 | if (!empty($conf)) {
26 | $block = new stdClass;
27 | $block->title = $conf['override_title'] ? $conf['override_title_text'] : $conf['titulo'];
28 | $block->content = $conf['texto'];
29 | return $block;
30 | }
31 | }
32 |
33 | /**
34 | * 'Edit form' callback for the content type.
35 | */
36 | function badistro_bloques_shortcut_edit_form($form, &$form_state) {
37 | $form['titulo'] = array(
38 | '#title' => t('Título'),
39 | '#type' => 'textfield',
40 | '#default_value' => $form_state['conf']['titulo'],
41 | '#required' => TRUE,
42 | );
43 | $form['texto'] = array(
44 | '#title' => t('Texto'),
45 | '#type' => 'textfield',
46 | '#default_value' => $form_state['conf']['texto'],
47 | '#required' => FALSE,
48 | );
49 | $form['color_fondo'] = array(
50 | '#title' => t('Color de fondo'),
51 | '#type' => 'select',
52 | '#default_value' => $form_state['conf']['color_fondo'],
53 | '#options' => array(
54 | 'shortcut-naranja' => t('Naranja'),
55 | 'shortcut-azul' => t('Azul'),
56 | 'shortcut-rojo' => t('Rojo'),
57 | 'shortcut-verde' => t('Verde')
58 | ),
59 | );
60 | $form['icono'] = array(
61 | '#title' => t('Color de fondo'),
62 | '#type' => 'select',
63 | '#default_value' => $form_state['conf']['icono'],
64 | '#options' => $badistro_iconos,
65 | );
66 | $form['referencia'] = array(
67 | '#type' => 'entityreference',
68 | '#title' => t('Página, trámite o noticia'),
69 | '#required' => FALSE,
70 | '#era_entity_type' => 'node', // Mandatory.
71 | '#era_bundles' => array(), // Optional (Any bundle by default).
72 | '#era_cardinality' => 1, // Optional (1 By default).
73 | '#states' => array(
74 | 'invisible' => array(
75 | ':input[name="link"]' => array('filled' => TRUE),
76 | ),
77 | ),
78 | '#description' => t('Usar este campo para referenciar contenido'),
79 | );
80 | $form['link'] = array(
81 | '#type' => 'textfield',
82 | '#title' => t('Link'),
83 | '#required' => FALSE,
84 | '#states' => array(
85 | 'invisible' => array(
86 | ':input[name="referencia"]' => array('filled' => TRUE),
87 | ),
88 | ),
89 | '#description' => t('Usar este campo para crear un link personalizado'),
90 | );
91 | return $form;
92 | }
93 |
94 | /**
95 | * The submit form stores the data in $conf.
96 | */
97 | function badistro_bloques_shortcut_edit_form_submit($form, &$form_state) {
98 | foreach (array_keys($form_state['plugin']['defaults']) as $key) {
99 | if (isset($form_state['values'][$key])) {
100 | $form_state['conf'][$key] = $form_state['values'][$key];
101 | }
102 | }
103 | }
104 | function badistro_bloques_shortcut_render($subtype, $conf, $panel_args, $context = NULL){
105 |
106 | $block = new stdClass();
107 | $block->title = '';
108 | $block->content = !empty($conf['referencia']) || !empty($conf['link']) ? l(
109 | theme(
110 | 'badistro_bloques_shortcut',
111 | array(
112 | 'color' => $conf['color_fondo'],
113 | 'icono' => $conf['icono'],
114 | 'texto' => $conf['texto'],
115 | 'titulo' => $conf['titulo'],
116 | 'css' => ''
117 | )
118 | ),
119 | !empty($conf['referencia']) ? 'node/' . $conf['referencia']['entity_id'] : $conf['link'],
120 | array(
121 | 'html' => TRUE,
122 | 'attributes' => array(
123 | 'class' => array(
124 | 'col-sm-6',
125 | 'col-md-3'
126 | )
127 | ),
128 | )
129 | ) : theme(
130 | 'badistro_bloques_shortcut',
131 | array(
132 | 'color' => $conf['color_fondo'],
133 | 'icono' => $conf['icono'],
134 | 'texto' => $conf['texto'],
135 | 'titulo' => $conf['titulo'],
136 | 'css' => 'col-sm-6 col-md-3'
137 | )
138 | );
139 | return $block;
140 | }
--------------------------------------------------------------------------------
/modules/custom/badistro_bloques/badistro_bloques.inc:
--------------------------------------------------------------------------------
1 | type == $tipo);
17 | }
18 | $badistro_iconos = array(
19 | 'glyphicon-home' => t('Casa'),
20 | 'glyphicon-paperclip' => t('Clip'),
21 | 'glyphicon-star' => t('Estrella'),
22 | 'glyphicon-heart' => t('Corazón'),
23 | 'glyphicon-music' => t('Música'),
24 | 'glyphicon-info-sign' => t('Información'),
25 | 'glyphicon-fire' => t('Fuego'),
26 | 'glyphicon-tree-deciduous' => t('Árbol'),
27 | 'glyphicon-gift' => t('Regalo'),
28 | 'glyphicon-ok-sign' => t('OK'),
29 | 'glyphicon-remove-sign' => t('Error'),
30 | 'glyphicon-search' => t('Buscar'),
31 | 'glyphicon-lock' => t('Candado'),
32 | 'glyphicon-cog' => t('Configuración'),
33 | 'glyphicon-plus' => t('Más'),
34 | 'glyphicon-minus' => t('Menos'),
35 | 'glyphicon-envelope' => t('Correo'),
36 | 'glyphicon-share-alt' => t('Compartir'),
37 | 'glyphicon-chevron-right' => t('Flecha Derecha'),
38 | 'glyphicon-chevron-left' => t('Flecha Izquierda'),
39 | 'glyphicon-question-sign' => t('Signo de interrogación'),
40 | 'glyphicon-calendar' => t('Calendario'),
41 | 'glyphicon-certificate' => t('Certificado'),
42 | 'glyphicon-link' => t('Link'),
43 | 'glyphicon-briefcase' => t('Maletín'),
44 | 'glyphicon-send' => t('Enviar'),
45 | 'glyphicon-earphone' => t('Teléfono'),
46 | 'glyphicon-alert' => t('Alerta'),
47 | 'glyphicon-piggy-bank' => t('Ahorro'),
48 | 'glyphicon-education' => t('Educación'),
49 | 'glyphicon-grain' => t('Campo'),
50 | 'glyphicon-globe' => t('Planeta'),
51 | 'glyphicon-shopping-cart' => t('Carrito de compra'),
52 | 'glyphicon-comment' => t('Diálogo'),
53 | 'glyphicon-gift' => t('Regalo'),
54 | 'glyphicon-map-marker' => t('Marcador'),
55 | 'glyphicon-flag' => t('Bandera'),
56 | 'glyphicon-list-alt' => t('Listado'),
57 | 'glyphicon-cloud' => t('Nube'),
58 | 'glyphicon-time' => t('Reloj'),
59 | 'glyphicon-camera' => t('Cámara'),
60 | 'glyphicon-leaf' => t('Hoja'),
61 | 'glyphicon-warning-sign' => t('Peligro'),
62 | 'glyphicon-usd' => t('Dinero'),
63 | 'glyphicon-flash' => t('Rayo'),
64 | 'glyphicon-transfer' => t('Transferencia'),
65 | 'glyphicon glyphicon-book' => t('Libro'),
66 | );
67 | function obtenerCampo($nodo, $tipo_campo) {
68 | switch ($tipo_campo) {
69 | case 'costo':
70 | $campo = field_get_items('node', $nodo, 'field_tramite_costo', NULL);
71 | $campo = $campo[0]['safe_value'];
72 | break;
73 | case 'requisitos':
74 | $campo = field_get_items('node', $nodo, 'field_requisitos', NULL);
75 | $campo = $campo[0]['safe_value'];
76 | break;
77 | case 'siglas_area':
78 | $campo = field_get_items('node', $nodo, 'field_siglas', NULL);
79 | $campo = $campo[0]['safe_value'];
80 | break;
81 | case 'links_relacionados':
82 | $campo = field_get_items('node', $nodo, 'field_links_relacionados', NULL);
83 | $campo = obtener($tipo_campo, $campo);
84 | break;
85 | case 'paginas_relacionadas':
86 | $campo = field_get_items('node', $nodo, 'field_paginas_relacionadas', NULL);
87 | $campo = obtener($tipo_campo, $campo);
88 | break;
89 | case 'tipo_tramite':
90 | $campo = field_get_items('node', $nodo, 'field_tramite_tipo', NULL);
91 | $campo = isset($campo) ? taxonomy_term_load($campo[0]["target_id"]) : NULL;
92 | $campo = isset($campo) ? $campo->name : NULL;
93 | break;
94 | case 'categoria_noticia':
95 | $campo = field_get_items('node', $nodo, 'field_categoria', NULL);
96 | $campo = isset($campo) ? taxonomy_term_load($campo[0]["target_id"]) : NULL;
97 | $campo = isset($campo) ? $campo->name : NULL;
98 | break;
99 | case 'tags':
100 | $campo = field_get_items('node', $nodo, 'field_tags', NULL);
101 | $campo = obtener($tipo_campo, $campo);
102 | default:
103 | # code...
104 | break;
105 | }
106 | return $campo;
107 | }
108 |
109 | function obtener($nombreCampo, $campo){
110 | $items = array();
111 | switch ($nombreCampo) {
112 | case 'tags':
113 | foreach ($campo as $item) {
114 | $items[] = $item['taxonomy_term']->name;
115 | }
116 | break;
117 | case 'paginas_relacionadas':
118 | foreach ($campo as $item) {
119 | $items[] = $item;
120 | }
121 | break;
122 | case 'links_relacionados':
123 | foreach ($campo as $item) {
124 | $items[] = $item;
125 | }
126 | break;
127 | default:
128 | # code...
129 | break;
130 | }
131 | return $items;
132 | }
--------------------------------------------------------------------------------
/themes/custom/badistrotheme/templates/page.tpl.php:
--------------------------------------------------------------------------------
1 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
128 |
129 |
130 |
131 |
--------------------------------------------------------------------------------
/modules/custom/badistro_bloques/plugins/content_types/carrousel.inc:
--------------------------------------------------------------------------------
1 | TRUE,
5 | 'title' => t('Carrousel'),
6 | 'description' => t('Muestra la imagen destacada.'),
7 | 'category' => t('BA Distro'),
8 | 'render callback' => 'badistro_bloques_carrousel_render',
9 | 'edit form' => 'badistro_bloques_carrousel_edit_form',
10 | 'admin info' => 'badistro_bloques_carrousel_admin_info',
11 | 'defaults' => array(
12 | 'tipos_de_contenido' => array(),
13 | 'cantidad_de_slides' => 3,
14 | 'tipo_noticia' => 'all',
15 | 'tipo_tramite' => 'all',
16 | )
17 | );
18 |
19 | /**
20 | * 'admin info' callback for panel pane.
21 | */
22 | function badistro_bloques_carrousel_admin_info($subtype, $conf, $contexts) {
23 | if (!empty($conf)) {
24 | $block = new stdClass;
25 | $block->title = $conf['override_title'] ? $conf['override_title_text'] : t('Carrousel');
26 | $block->content = t('Carrousel');
27 | return $block;
28 | }
29 | }
30 |
31 | /**
32 | * 'Edit form' callback for the content type.
33 | */
34 | function badistro_bloques_carrousel_edit_form($form, &$form_state) {
35 | foreach (node_type_get_types() as $item) {
36 | $tiposDeContenido[$item->type] = $item->name;
37 | }
38 | $form['cantidad_de_slides'] = array(
39 | '#type' => 'textfield',
40 | '#title' => t('Cantidad de slides'),
41 | '#default_value' => $form_state['conf']['cantidad_de_slides'],
42 | '#element_validate' => array('element_validate_integer_positive'),
43 | );
44 | $form['tipos_de_contenido'] = array(
45 | '#title' => t('Tipos de contenido'),
46 | '#type' => 'checkboxes',
47 | '#default_value' => $form_state['conf']['tipos_de_contenido'],
48 | '#required' => TRUE,
49 | '#options' => $tiposDeContenido,
50 | );
51 | $form['tipo_tramite'] = array(
52 | '#type' => 'entityreference',
53 | '#title' => t('Tipo de Trámites'),
54 | '#description' => t('Filtrar por tipo de trámite. Dejar vacío para listar todos los trámites'),
55 | '#required' => FALSE,
56 | '#states' => array(
57 | 'visible' => array(
58 | ':input[name="tipos_de_contenido[tramite]"]' => array('checked' => TRUE),
59 | ),
60 | ),
61 | '#era_entity_type' => 'taxonomy_term', // Mandatory.
62 | '#era_bundles' => array('tramites'), // Optional (Any bundle by default).
63 | '#era_cardinality' => 2, // Optional (1 By default).
64 | );
65 | $form['tipo_noticia'] = array(
66 | '#type' => 'entityreference',
67 | '#title' => t('Categoría de Noticias'),
68 | '#description' => t('Filtrar por categoría de noticias. Dejar vacío para listar todos los noticias'),
69 | '#required' => FALSE,
70 | '#states' => array(
71 | 'visible' => array(
72 | ':input[name="tipos_de_contenido[noticia]"]' => array('checked' => TRUE),
73 | ),
74 | ),
75 | '#era_entity_type' => 'taxonomy_term', // Mandatory.
76 | '#era_bundles' => array('noticias'), // Optional (Any bundle by default).
77 | '#era_cardinality' => 1, // Optional (1 By default).
78 | );
79 |
80 | return $form;
81 | }
82 |
83 | /**
84 | * The submit form stores the data in $conf.
85 | */
86 | function badistro_bloques_carrousel_edit_form_submit($form, &$form_state) {
87 | foreach (array_keys($form_state['plugin']['defaults']) as $key) {
88 | if (isset($form_state['values'][$key])) {
89 | $form_state['conf'][$key] = $form_state['values'][$key];
90 | }
91 | }
92 | }
93 | function badistro_bloques_carrousel_render($subtype, $conf, $panel_args, $context = NULL){
94 | $block = new stdClass();
95 | $block->title = '';
96 | $view = views_get_view('listado_de_contenido');
97 | $view->set_display('default');
98 | $tipoNoticia = !empty($conf['tipo_noticia']) ? reset($conf['tipo_noticia']) : array();
99 | $tipoTramite = !empty($conf['tipo_tramite']) ? reset($conf['tipo_tramite']) : array();
100 | $view->set_arguments(
101 | array(
102 | tiposDeContenidoElegidos($conf["tipos_de_contenido"]),
103 | !(empty($conf['tipo_noticia'])) ? $tipoNoticia['entity_id'] : 'all',
104 | !(empty($conf['tipo_tramite'])) ? $tipoTramite['entity_id'] : 'all',
105 | 'all',
106 | 'all'
107 | )
108 | );
109 | $view->set_items_per_page($conf["cantidad_de_slides"]);
110 | $view->execute();
111 | foreach ($view->result as $key => $item) {
112 | $slides[] = crearSlide($item);
113 | }
114 | $block->content = !empty($slides) && sizeof($slides) > 0 ? theme('badistro_bloques_carrousel', array('slides' => $slides)) : FALSE;
115 | return $block;
116 | }
117 | function crearSlide($item){
118 | $slide = new stdClass();
119 | $slide->id = $item->nid;
120 | $slide->titulo = $item->node_title;
121 | $slide->caption = field_get_items('node', $item->_field_data["nid"]["entity"], 'body', NULL);
122 | $slide->caption = $slide->caption[0]["summary"];
123 | $slide->imagen = field_get_items('node', $item->_field_data["nid"]["entity"], 'field_featured_image', NULL);
124 | $slide->imagen = theme_image_style(array('style_name' => 'wide', 'path' => $slide->imagen[0]["uri"], 'width' => '', 'height' => ''));
125 | $slide->imagen = l($slide->imagen, 'node/' . $slide->id, array('html' => TRUE));
126 | return $slide;
127 | }
128 | function tiposDeContenidoElegidos($tiposDeContenido){
129 | $tiposDeContenidoElegidos = array();
130 | foreach ($tiposDeContenido as $key => $value) {
131 | if(!$value == 0) {
132 | $tiposDeContenidoElegidos[] = $key;
133 | }
134 | }
135 | return implode('+', $tiposDeContenidoElegidos);
136 | }
--------------------------------------------------------------------------------
/modules/custom/badistro_paginas/badistro_paginas.pages_default.inc:
--------------------------------------------------------------------------------
1 | disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
15 | $handler->api_version = 1;
16 | $handler->name = 'node_view__pagina';
17 | $handler->task = 'node_view';
18 | $handler->subtask = '';
19 | $handler->handler = 'panel_context';
20 | $handler->weight = -96;
21 | $handler->conf = array(
22 | 'title' => 'Página',
23 | 'no_blocks' => 0,
24 | 'pipeline' => 'standard',
25 | 'body_classes_to_remove' => '',
26 | 'body_classes_to_add' => '',
27 | 'css_id' => '',
28 | 'css' => '',
29 | 'contexts' => array(),
30 | 'relationships' => array(),
31 | 'name' => 'pagina',
32 | 'access' => array(
33 | 'plugins' => array(
34 | 0 => array(
35 | 'name' => 'node_type',
36 | 'settings' => array(
37 | 'type' => array(
38 | 'page' => 'page',
39 | ),
40 | ),
41 | 'context' => 'argument_entity_id:node_1',
42 | 'not' => FALSE,
43 | ),
44 | ),
45 | 'logic' => 'and',
46 | ),
47 | );
48 | $display = new panels_display();
49 | $display->layout = 'una-columna-estrecha';
50 | $display->layout_settings = array();
51 | $display->panel_settings = array(
52 | 'style_settings' => array(
53 | 'default' => NULL,
54 | 'top' => NULL,
55 | 'bottom' => NULL,
56 | 'body-middle' => NULL,
57 | 'full' => NULL,
58 | ),
59 | );
60 | $display->cache = array();
61 | $display->title = '';
62 | $display->uuid = '4ff89c7e-3b83-4cf5-9f8c-e2f0487a6ea6';
63 | $display->content = array();
64 | $display->panels = array();
65 | $pane = new stdClass();
66 | $pane->pid = 'new-3515e6be-2c7f-4c5d-ab0e-53667e9d8bcb';
67 | $pane->panel = 'body-middle';
68 | $pane->type = 'texto';
69 | $pane->subtype = 'texto';
70 | $pane->shown = TRUE;
71 | $pane->access = array();
72 | $pane->configuration = array(
73 | 'destacado' => 0,
74 | 'texto' => array(
75 | 'value' => '',
76 | 'format' => 'full_html',
77 | ),
78 | 'sobreescribir' => 0,
79 | 'cuerpo_o_resumen' => 'body',
80 | 'override_title' => 0,
81 | 'override_title_text' => '',
82 | 'override_title_heading' => 'h2',
83 | );
84 | $pane->cache = array();
85 | $pane->style = array(
86 | 'settings' => NULL,
87 | );
88 | $pane->css = array();
89 | $pane->extras = array();
90 | $pane->position = 0;
91 | $pane->locks = array();
92 | $pane->uuid = '3515e6be-2c7f-4c5d-ab0e-53667e9d8bcb';
93 | $display->content['new-3515e6be-2c7f-4c5d-ab0e-53667e9d8bcb'] = $pane;
94 | $display->panels['body-middle'][0] = 'new-3515e6be-2c7f-4c5d-ab0e-53667e9d8bcb';
95 | $pane = new stdClass();
96 | $pane->pid = 'new-807b9ce3-70dc-4e13-a696-19d2e3481e2d';
97 | $pane->panel = 'full';
98 | $pane->type = 'imagen_destacada';
99 | $pane->subtype = 'imagen_destacada';
100 | $pane->shown = TRUE;
101 | $pane->access = array();
102 | $pane->configuration = array(
103 | 'imagen_destacada' => NULL,
104 | );
105 | $pane->cache = array();
106 | $pane->style = array(
107 | 'settings' => NULL,
108 | );
109 | $pane->css = array();
110 | $pane->extras = array();
111 | $pane->position = 0;
112 | $pane->locks = array();
113 | $pane->uuid = '807b9ce3-70dc-4e13-a696-19d2e3481e2d';
114 | $display->content['new-807b9ce3-70dc-4e13-a696-19d2e3481e2d'] = $pane;
115 | $display->panels['full'][0] = 'new-807b9ce3-70dc-4e13-a696-19d2e3481e2d';
116 | $pane = new stdClass();
117 | $pane->pid = 'new-3cbf242a-18dc-467c-b407-dbba4be6f7b6';
118 | $pane->panel = 'top';
119 | $pane->type = 'galeria_imagenes';
120 | $pane->subtype = 'galeria_imagenes';
121 | $pane->shown = TRUE;
122 | $pane->access = array();
123 | $pane->configuration = array(
124 | 'tipo' => 'min',
125 | 'override_title' => 0,
126 | 'override_title_text' => '',
127 | 'override_title_heading' => 'h2',
128 | );
129 | $pane->cache = array();
130 | $pane->style = array(
131 | 'settings' => NULL,
132 | );
133 | $pane->css = array();
134 | $pane->extras = array();
135 | $pane->position = 0;
136 | $pane->locks = array();
137 | $pane->uuid = '3cbf242a-18dc-467c-b407-dbba4be6f7b6';
138 | $display->content['new-3cbf242a-18dc-467c-b407-dbba4be6f7b6'] = $pane;
139 | $display->panels['top'][0] = 'new-3cbf242a-18dc-467c-b407-dbba4be6f7b6';
140 | $pane = new stdClass();
141 | $pane->pid = 'new-dfaadbfd-b150-42aa-81e2-8d2520a20758';
142 | $pane->panel = 'top';
143 | $pane->type = 'texto';
144 | $pane->subtype = 'texto';
145 | $pane->shown = TRUE;
146 | $pane->access = array();
147 | $pane->configuration = array(
148 | 'destacado' => 1,
149 | 'texto' => array(
150 | 'value' => '',
151 | 'format' => 'full_html',
152 | ),
153 | 'sobreescribir' => 0,
154 | 'cuerpo_o_resumen' => 'summary',
155 | 'override_title' => 0,
156 | 'override_title_text' => '',
157 | 'override_title_heading' => 'h2',
158 | );
159 | $pane->cache = array();
160 | $pane->style = array(
161 | 'settings' => NULL,
162 | );
163 | $pane->css = array();
164 | $pane->extras = array();
165 | $pane->position = 1;
166 | $pane->locks = array();
167 | $pane->uuid = 'dfaadbfd-b150-42aa-81e2-8d2520a20758';
168 | $display->content['new-dfaadbfd-b150-42aa-81e2-8d2520a20758'] = $pane;
169 | $display->panels['top'][1] = 'new-dfaadbfd-b150-42aa-81e2-8d2520a20758';
170 | $display->hide_title = PANELS_TITLE_FIXED;
171 | $display->title_pane = '0';
172 | $handler->conf['display'] = $display;
173 | $export['node_view__pagina'] = $handler;
174 |
175 | return $export;
176 | }
177 |
--------------------------------------------------------------------------------
/modules/custom/badistro_bloques/plugins/content_types/redes_sociales.inc:
--------------------------------------------------------------------------------
1 | TRUE,
5 | 'title' => t('Redes Sociales'),
6 | 'description' => t('Crea un listado de contenido configurable'),
7 | 'category' => t('BA Distro'),
8 | 'render callback' => 'badistro_bloques_redes_sociales_render',
9 | 'edit form' => 'badistro_bloques_redes_sociales_edit_form',
10 | 'admin info' => 'badistro_bloques_redes_sociales_admin_info',
11 | 'defaults' => array(
12 | 'titulo' => t('Redes Sociales'),
13 | 'tipo_widget' => 'share',
14 | 'tipo_widget_timeline' => 'facebook',
15 | 'fb_page_url' => '',
16 | 'fb_altura' => 70,
17 | 'fb_mostrar_post' => TRUE,
18 | 'fb_mostrar_fotos_amigos' => TRUE,
19 | 'fb_ocultar_portada' => FALSE,
20 | 'tw_widget_id' => '',
21 | 'tw_screen_name' => ''
22 | )
23 | );
24 |
25 | /**
26 | * 'admin info' callback for panel pane.
27 | */
28 | function badistro_bloques_redes_sociales_admin_info($subtype, $conf, $contexts) {
29 | if (!empty($conf)) {
30 | $block = new stdClass;
31 | $block->title = $conf['titulo'];
32 | $block->content = $conf['tipo_widget'] == 'share' ? t('Compartir') : t('Línea de tiempo');
33 | return $block;
34 | }
35 | }
36 |
37 | /**
38 | * 'Edit form' callback for the content type.
39 | */
40 | function badistro_bloques_redes_sociales_edit_form($form, &$form_state) {
41 |
42 | $form['titulo'] = array(
43 | '#title' => t('Título'),
44 | '#type' => 'textfield',
45 | '#default_value' => $form_state['conf']['titulo'],
46 | '#required' => FALSE,
47 | );
48 | $form['tipo_widget'] = array(
49 | '#title' => t('Tipo de widget'),
50 | '#type' => 'radios',
51 | '#default_value' => $form_state['conf']['tipo_widget'],
52 | '#required' => TRUE,
53 | '#options' => array(
54 | 'share' => t('Compartir'),
55 | 'timeline' => t('Línea de tiempo')
56 | ),
57 | '#description' => t('Tipo de widget'),
58 | );
59 | $form['tipo_widget_timeline'] = array(
60 | '#title' => t('Tipo de widget'),
61 | '#type' => 'radios',
62 | '#default_value' => $form_state['conf']['tipo_widget_timeline'],
63 | '#required' => TRUE,
64 | '#options' => array(
65 | 'facebook' => t('Facebook'),
66 | 'twitter' => t('Twitter')
67 | ),
68 | '#states' => array(
69 | 'visible' => array(
70 | ':input[name="tipo_widget"]' => array('value' => 'timeline'),
71 | ),
72 | ),
73 | );
74 | $form['fb_timeline'] = array(
75 | '#type' => 'fieldset',
76 | '#attributes' => array(),
77 | '#title' => t('Facebook'),
78 | '#states' => array(
79 | 'visible' => array(
80 | ':input[name="tipo_widget_timeline"]' => array('value' => 'facebook'),
81 | ':input[name="tipo_widget"]' => array('value' => 'timeline'),
82 | ),
83 | ),
84 | );
85 | $form['tw_timeline'] = array(
86 | '#type' => 'fieldset',
87 | '#attributes' => array(),
88 | '#title' => t('Twitter'),
89 | '#states' => array(
90 | 'visible' => array(
91 | ':input[name="tipo_widget_timeline"]' => array('value' => 'twitter'),
92 | ':input[name="tipo_widget"]' => array('value' => 'timeline'),
93 | ),
94 | ),
95 | );
96 | $form['tw_timeline']['tw_widget_id'] = array(
97 | '#title' => t('Widget ID'),
98 | '#type' => 'textfield',
99 | '#default_value' => $form_state['conf']['tw_widget_id'],
100 | '#description' => t('Debes crear un ' . l('widget desde tu cuenta', 'https://twitter.com/settings/widgets/')),
101 | );
102 | $form['tw_timeline']['tw_screen_name'] = array(
103 | '#title' => t('Usuario'),
104 | '#type' => 'textfield',
105 | '#default_value' => $form_state['conf']['tw_screen_name'],
106 | '#description' => t('Debes crear un ' . l('widget desde tu cuenta', 'https://twitter.com/settings/widgets/')),
107 | );
108 | $form['fb_timeline']['fb_page_url'] = array(
109 | '#title' => t('URL de la página en Facebook'),
110 | '#type' => 'textfield',
111 | '#default_value' => $form_state['conf']['fb_page_url'],
112 | );
113 | $form['fb_timeline']['fb_altura'] = array(
114 | '#title' => t('Altura'),
115 | '#type' => 'textfield',
116 | '#default_value' => $form_state['conf']['fb_altura'],
117 | '#description' => t('Mín. 70'),
118 | );
119 | $form['fb_timeline']['fb_mostrar_post'] = array(
120 | '#type' => 'checkbox',
121 | '#title' => t('Mostrar posts'),
122 | '#default_value' => $form_state['conf']['fb_mostrar_post'],
123 | '#description' => t('Default: TRUE'),
124 | );
125 | $form['fb_timeline']['fb_ocultar_portada'] = array(
126 | '#type' => 'checkbox',
127 | '#title' => t('Ocultar imagen de portada'),
128 | '#default_value' => $form_state['conf']['fb_ocultar_portada'],
129 | '#description' => t('Default: FALSE'),
130 | );
131 | $form['fb_timeline']['fb_mostrar_fotos_amigos'] = array(
132 | '#type' => 'checkbox',
133 | '#title' => t('Mostrar foto de amigos'),
134 | '#default_value' => $form_state['conf']['fb_mostrar_fotos_amigos'],
135 | '#description' => t('Default: TRUE'),
136 | );
137 |
138 | return $form;
139 | }
140 |
141 | /**
142 | * The submit form stores the data in $conf.
143 | */
144 | function badistro_bloques_redes_sociales_edit_form_submit($form, &$form_state) {
145 | foreach (array_keys($form_state['plugin']['defaults']) as $key) {
146 | if (isset($form_state['values'][$key])) {
147 | $form_state['conf'][$key] = $form_state['values'][$key];
148 | }
149 | }
150 | }
151 | function badistro_bloques_redes_sociales_render($subtype, $conf, $panel_args, $context = NULL){
152 | $block = new stdClass;
153 | $block->title = '';
154 | $block->content = $conf['tipo_widget'] == 'share' ? theme('badistro_bloques_redes_sociales_compartir', array('titulo' => $conf['titulo'])) : theme('badistro_bloques_redes_sociales_' . $conf['tipo_widget'] . '_' . $conf['tipo_widget_timeline'], array('configuraciones' => $conf));
155 | drupal_add_js(drupal_get_path('module', 'badistro_bloques') . '/js/fb-sdk.js');
156 | drupal_add_js(drupal_get_path('module', 'badistro_bloques') . '/js/tw.js');
157 | return $block;
158 | }
--------------------------------------------------------------------------------
/modules/custom/badistro_cck/badistro_cck.features.fe_block_settings.inc:
--------------------------------------------------------------------------------
1 | -1,
17 | 'custom' => 0,
18 | 'delta' => 'devel',
19 | 'module' => 'menu',
20 | 'node_types' => array(),
21 | 'pages' => '',
22 | 'roles' => array(),
23 | 'themes' => array(
24 | 'adminimal' => array(
25 | 'region' => '',
26 | 'status' => 0,
27 | 'theme' => 'adminimal',
28 | 'weight' => 0,
29 | ),
30 | 'badistrotheme' => array(
31 | 'region' => '',
32 | 'status' => 0,
33 | 'theme' => 'badistrotheme',
34 | 'weight' => 0,
35 | ),
36 | ),
37 | 'title' => '',
38 | 'visibility' => 0,
39 | );
40 |
41 | $export['menu-menu-acerca-de-este-sitio'] = array(
42 | 'cache' => -1,
43 | 'custom' => 0,
44 | 'delta' => 'menu-acerca-de-este-sitio',
45 | 'module' => 'menu',
46 | 'node_types' => array(),
47 | 'pages' => '',
48 | 'roles' => array(),
49 | 'themes' => array(
50 | 'adminimal' => array(
51 | 'region' => '',
52 | 'status' => 0,
53 | 'theme' => 'adminimal',
54 | 'weight' => 0,
55 | ),
56 | 'badistrotheme' => array(
57 | 'region' => 'footer_left',
58 | 'status' => 1,
59 | 'theme' => 'badistrotheme',
60 | 'weight' => -11,
61 | ),
62 | ),
63 | 'title' => '',
64 | 'visibility' => 0,
65 | );
66 |
67 | $export['menu-menu-paginas-relacionadas'] = array(
68 | 'cache' => -1,
69 | 'custom' => 0,
70 | 'delta' => 'menu-paginas-relacionadas',
71 | 'module' => 'menu',
72 | 'node_types' => array(),
73 | 'pages' => '',
74 | 'roles' => array(),
75 | 'themes' => array(
76 | 'adminimal' => array(
77 | 'region' => '',
78 | 'status' => 0,
79 | 'theme' => 'adminimal',
80 | 'weight' => 0,
81 | ),
82 | 'badistrotheme' => array(
83 | 'region' => 'footer_right',
84 | 'status' => 1,
85 | 'theme' => 'badistrotheme',
86 | 'weight' => 0,
87 | ),
88 | ),
89 | 'title' => '',
90 | 'visibility' => 0,
91 | );
92 |
93 | $export['menu-menu-redes-sociales'] = array(
94 | 'cache' => -1,
95 | 'custom' => 0,
96 | 'delta' => 'menu-redes-sociales',
97 | 'module' => 'menu',
98 | 'node_types' => array(),
99 | 'pages' => '',
100 | 'roles' => array(),
101 | 'themes' => array(
102 | 'adminimal' => array(
103 | 'region' => '',
104 | 'status' => 0,
105 | 'theme' => 'adminimal',
106 | 'weight' => 0,
107 | ),
108 | 'badistrotheme' => array(
109 | 'region' => 'footer_left',
110 | 'status' => 1,
111 | 'theme' => 'badistrotheme',
112 | 'weight' => -12,
113 | ),
114 | ),
115 | 'title' => '',
116 | 'visibility' => 0,
117 | );
118 |
119 | $export['search-form'] = array(
120 | 'cache' => -1,
121 | 'custom' => 0,
122 | 'delta' => 'form',
123 | 'module' => 'search',
124 | 'node_types' => array(),
125 | 'pages' => '',
126 | 'roles' => array(),
127 | 'themes' => array(
128 | 'adminimal' => array(
129 | 'region' => 'dashboard_inactive',
130 | 'status' => 1,
131 | 'theme' => 'adminimal',
132 | 'weight' => 0,
133 | ),
134 | 'badistrotheme' => array(
135 | 'region' => 'header_right',
136 | 'status' => 1,
137 | 'theme' => 'badistrotheme',
138 | 'weight' => 0,
139 | ),
140 | ),
141 | 'title' => '',
142 | 'visibility' => 0,
143 | );
144 |
145 | $export['system-main'] = array(
146 | 'cache' => -1,
147 | 'custom' => 0,
148 | 'delta' => 'main',
149 | 'module' => 'system',
150 | 'node_types' => array(),
151 | 'pages' => '',
152 | 'roles' => array(),
153 | 'themes' => array(
154 | 'adminimal' => array(
155 | 'region' => 'content',
156 | 'status' => 1,
157 | 'theme' => 'adminimal',
158 | 'weight' => 0,
159 | ),
160 | 'badistrotheme' => array(
161 | 'region' => 'content',
162 | 'status' => 1,
163 | 'theme' => 'badistrotheme',
164 | 'weight' => 0,
165 | ),
166 | ),
167 | 'title' => '',
168 | 'visibility' => 0,
169 | );
170 |
171 | $export['system-main-menu'] = array(
172 | 'cache' => -1,
173 | 'custom' => 0,
174 | 'delta' => 'main-menu',
175 | 'module' => 'system',
176 | 'node_types' => array(),
177 | 'pages' => '',
178 | 'roles' => array(),
179 | 'themes' => array(
180 | 'adminimal' => array(
181 | 'region' => '',
182 | 'status' => 0,
183 | 'theme' => 'adminimal',
184 | 'weight' => 0,
185 | ),
186 | 'badistrotheme' => array(
187 | 'region' => 'header_left',
188 | 'status' => 1,
189 | 'theme' => 'badistrotheme',
190 | 'weight' => 0,
191 | ),
192 | ),
193 | 'title' => '',
194 | 'visibility' => 0,
195 | );
196 |
197 | $export['system-management'] = array(
198 | 'cache' => -1,
199 | 'custom' => 0,
200 | 'delta' => 'management',
201 | 'module' => 'system',
202 | 'node_types' => array(),
203 | 'pages' => '',
204 | 'roles' => array(),
205 | 'themes' => array(
206 | 'adminimal' => array(
207 | 'region' => '',
208 | 'status' => 0,
209 | 'theme' => 'adminimal',
210 | 'weight' => 0,
211 | ),
212 | 'badistrotheme' => array(
213 | 'region' => '',
214 | 'status' => 0,
215 | 'theme' => 'badistrotheme',
216 | 'weight' => 0,
217 | ),
218 | ),
219 | 'title' => '',
220 | 'visibility' => 0,
221 | );
222 |
223 | $export['system-navigation'] = array(
224 | 'cache' => -1,
225 | 'custom' => 0,
226 | 'delta' => 'navigation',
227 | 'module' => 'system',
228 | 'node_types' => array(),
229 | 'pages' => '',
230 | 'roles' => array(),
231 | 'themes' => array(
232 | 'adminimal' => array(
233 | 'region' => '',
234 | 'status' => 0,
235 | 'theme' => 'adminimal',
236 | 'weight' => 0,
237 | ),
238 | 'badistrotheme' => array(
239 | 'region' => '',
240 | 'status' => 0,
241 | 'theme' => 'badistrotheme',
242 | 'weight' => 0,
243 | ),
244 | ),
245 | 'title' => '',
246 | 'visibility' => 0,
247 | );
248 |
249 | $export['system-user-menu'] = array(
250 | 'cache' => -1,
251 | 'custom' => 0,
252 | 'delta' => 'user-menu',
253 | 'module' => 'system',
254 | 'node_types' => array(),
255 | 'pages' => '',
256 | 'roles' => array(),
257 | 'themes' => array(
258 | 'adminimal' => array(
259 | 'region' => '',
260 | 'status' => 0,
261 | 'theme' => 'adminimal',
262 | 'weight' => 0,
263 | ),
264 | 'badistrotheme' => array(
265 | 'region' => '',
266 | 'status' => 0,
267 | 'theme' => 'badistrotheme',
268 | 'weight' => 0,
269 | ),
270 | ),
271 | 'title' => '',
272 | 'visibility' => 0,
273 | );
274 |
275 | return $export;
276 | }
277 |
--------------------------------------------------------------------------------
/modules/custom/badistro_bloques/badistro_bloques.module:
--------------------------------------------------------------------------------
1 | array(
17 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
18 | 'template' => 'badistro_bloques_alerta'
19 | ),
20 | 'badistro_bloques_carrousel' => array(
21 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
22 | 'template' => 'badistro_bloques_carrousel'
23 | ),
24 | 'badistro_bloques_campo_categoria_noticia' => array(
25 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
26 | 'template' => 'badistro_bloques_campo_categoria_noticia'
27 | ),
28 | 'badistro_bloques_campo_costo' => array(
29 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
30 | 'template' => 'badistro_bloques_campo_costo'
31 | ),
32 | 'badistro_bloques_campo_links_relacionados' => array(
33 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
34 | 'template' => 'badistro_bloques_campo_links_relacionados'
35 | ),
36 | 'badistro_bloques_campo_paginas_relacionadas' => array(
37 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
38 | 'template' => 'badistro_bloques_campo_paginas_relacionadas'
39 | ),
40 | 'badistro_bloques_campo_requisitos' => array(
41 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
42 | 'template' => 'badistro_bloques_campo_requisitos'
43 | ),
44 | 'badistro_bloques_campo_siglas_area' => array(
45 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
46 | 'template' => 'badistro_bloques_campo_siglas_area'
47 | ),
48 | 'badistro_bloques_campo_tags' => array(
49 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
50 | 'template' => 'badistro_bloques_campo_tags'
51 | ),
52 | 'badistro_bloques_campo_tipo_tramite' => array(
53 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
54 | 'template' => 'badistro_bloques_campo_tipo_tramite'
55 | ),
56 | 'badistro_bloques_galeria_imagenes_min' => array(
57 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
58 | 'template' => 'badistro_bloques_galeria_imagenes_min'
59 | ),
60 | 'badistro_bloques_galeria_imagenes_min_item' => array(
61 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
62 | 'template' => 'badistro_bloques_galeria_imagenes_min_item'
63 | ),
64 | 'badistro_bloques_listado_vertical' => array(
65 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
66 | 'template' => 'badistro_bloques_listado_vertical'
67 | ),
68 | 'badistro_bloques_listado_vertical_item' => array(
69 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
70 | 'template' => 'badistro_bloques_listado_vertical_item'
71 | ),
72 | 'badistro_bloques_listado_horizontal' => array(
73 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
74 | 'template' => 'badistro_bloques_listado_horizontal'
75 | ),
76 | 'badistro_bloques_listado_horizontal_item' => array(
77 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
78 | 'template' => 'badistro_bloques_listado_horizontal_item'
79 | ),
80 | 'badistro_bloques_listado_destacado_vertical' => array(
81 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
82 | 'template' => 'badistro_bloques_listado_destacado_vertical'
83 | ),
84 | 'badistro_bloques_listado_destacado_vertical_item' => array(
85 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
86 | 'template' => 'badistro_bloques_listado_destacado_vertical_item'
87 | ),
88 | 'badistro_bloques_listado_destacado_horizontal' => array(
89 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
90 | 'template' => 'badistro_bloques_listado_destacado_horizontal'
91 | ),
92 | 'badistro_bloques_listado_destacado_horizontal_item' => array(
93 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
94 | 'template' => 'badistro_bloques_listado_destacado_horizontal_item'
95 | ),
96 | 'badistro_bloques_listado_con_imagen_vertical' => array(
97 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
98 | 'template' => 'badistro_bloques_listado_con_imagen_vertical'
99 | ),
100 | 'badistro_bloques_listado_con_imagen_vertical_item' => array(
101 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
102 | 'template' => 'badistro_bloques_listado_con_imagen_vertical_item'
103 | ),
104 | 'badistro_bloques_listado_con_imagen_horizontal' => array(
105 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
106 | 'template' => 'badistro_bloques_listado_con_imagen_horizontal'
107 | ),
108 | 'badistro_bloques_listado_con_imagen_horizontal_item' => array(
109 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
110 | 'template' => 'badistro_bloques_listado_con_imagen_horizontal_item'
111 | ),
112 | 'badistro_bloques_listado_vacio' => array(
113 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
114 | 'template' => 'badistro_bloques_listado_vacio'
115 | ),
116 | 'badistro_bloques_imagen_destacada' => array(
117 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
118 | 'template' => 'badistro_bloques_imagen_destacada'
119 | ),
120 | 'badistro_bloques_titulo' => array(
121 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
122 | 'template' => 'badistro_bloques_titulo'
123 | ),
124 | 'badistro_bloques_texto' => array(
125 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
126 | 'template' => 'badistro_bloques_texto'
127 | ),
128 | 'badistro_bloques_shortcut' => array(
129 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
130 | 'template' => 'badistro_bloques_shortcut'
131 | ),
132 | 'badistro_bloques_separador' => array(
133 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
134 | 'template' => 'badistro_bloques_separador'
135 | ),
136 | 'badistro_bloques_redes_sociales_compartir' => array(
137 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
138 | 'template' => 'badistro_bloques_redes_sociales_compartir'
139 | ),
140 | 'badistro_bloques_redes_sociales_timeline_facebook' => array(
141 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
142 | 'template' => 'badistro_bloques_redes_sociales_timeline_facebook'
143 | ),
144 | 'badistro_bloques_redes_sociales_timeline_twitter' => array(
145 | 'path' => drupal_get_path('module', 'badistro_bloques') . '/templates',
146 | 'template' => 'badistro_bloques_redes_sociales_timeline_twitter'
147 | ),
148 | );
149 | }
--------------------------------------------------------------------------------
/modules/custom/badistro_areas/badistro_areas.pages_default.inc:
--------------------------------------------------------------------------------
1 | disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
15 | $handler->api_version = 1;
16 | $handler->name = 'node_view__area';
17 | $handler->task = 'node_view';
18 | $handler->subtask = '';
19 | $handler->handler = 'panel_context';
20 | $handler->weight = -97;
21 | $handler->conf = array(
22 | 'title' => 'Área',
23 | 'no_blocks' => 0,
24 | 'pipeline' => 'standard',
25 | 'body_classes_to_remove' => '',
26 | 'body_classes_to_add' => '',
27 | 'css_id' => '',
28 | 'css' => '',
29 | 'contexts' => array(),
30 | 'relationships' => array(),
31 | 'name' => 'area',
32 | 'access' => array(
33 | 'plugins' => array(
34 | 0 => array(
35 | 'name' => 'node_type',
36 | 'settings' => array(
37 | 'type' => array(
38 | 'area' => 'area',
39 | ),
40 | ),
41 | 'context' => 'argument_entity_id:node_1',
42 | 'not' => FALSE,
43 | ),
44 | ),
45 | 'logic' => 'and',
46 | ),
47 | );
48 | $display = new panels_display();
49 | $display->layout = 'tres-columnas';
50 | $display->layout_settings = array();
51 | $display->panel_settings = array(
52 | 'style_settings' => array(
53 | 'default' => NULL,
54 | 'top' => NULL,
55 | 'bottom' => NULL,
56 | 'body-middle' => NULL,
57 | 'full' => NULL,
58 | 'body-left' => NULL,
59 | 'body-right' => NULL,
60 | ),
61 | );
62 | $display->cache = array();
63 | $display->title = '';
64 | $display->uuid = '511fcd63-a745-4c73-af8e-0dbc7679c8e5';
65 | $display->content = array();
66 | $display->panels = array();
67 | $pane = new stdClass();
68 | $pane->pid = 'new-324fd34a-e1cb-402e-90b2-758bcf29e4fe';
69 | $pane->panel = 'body-left';
70 | $pane->type = 'listado';
71 | $pane->subtype = 'listado';
72 | $pane->shown = TRUE;
73 | $pane->access = array();
74 | $pane->configuration = array(
75 | 'cantidad_links' => '10',
76 | 'tipo_de_listado' => 'relacionados',
77 | 'tipos_de_contenido' => 'area',
78 | 'formato_de_listado' => 'badistro_bloques_listado',
79 | 'titulo' => 'Áreas',
80 | 'icono' => 'glyphicon-paperclip',
81 | 'tipo_noticia' => FALSE,
82 | 'tipo_tramite' => array(),
83 | 'orientacion_de_listado' => 'vertical',
84 | 'todos_los_items' => 0,
85 | 'override_title' => 0,
86 | 'override_title_text' => '',
87 | 'override_title_heading' => 'h2',
88 | );
89 | $pane->cache = array();
90 | $pane->style = array(
91 | 'settings' => NULL,
92 | );
93 | $pane->css = array();
94 | $pane->extras = array();
95 | $pane->position = 0;
96 | $pane->locks = array();
97 | $pane->uuid = '324fd34a-e1cb-402e-90b2-758bcf29e4fe';
98 | $display->content['new-324fd34a-e1cb-402e-90b2-758bcf29e4fe'] = $pane;
99 | $display->panels['body-left'][0] = 'new-324fd34a-e1cb-402e-90b2-758bcf29e4fe';
100 | $pane = new stdClass();
101 | $pane->pid = 'new-f0b7b9d7-f34c-4887-ac46-1b27d1efc673';
102 | $pane->panel = 'body-middle';
103 | $pane->type = 'listado';
104 | $pane->subtype = 'listado';
105 | $pane->shown = TRUE;
106 | $pane->access = array();
107 | $pane->configuration = array(
108 | 'cantidad_links' => '10',
109 | 'tipo_de_listado' => 'relacionados',
110 | 'tipos_de_contenido' => 'noticia',
111 | 'formato_de_listado' => 'badistro_bloques_listado_con_imagen',
112 | 'titulo' => 'Noticias',
113 | 'icono' => 'glyphicon-paperclip',
114 | 'tipo_noticia' => FALSE,
115 | 'tipo_tramite' => array(),
116 | 'orientacion_de_listado' => 'vertical',
117 | 'todos_los_items' => 1,
118 | 'override_title' => 0,
119 | 'override_title_text' => '',
120 | 'override_title_heading' => 'h2',
121 | );
122 | $pane->cache = array();
123 | $pane->style = array(
124 | 'settings' => NULL,
125 | );
126 | $pane->css = array();
127 | $pane->extras = array();
128 | $pane->position = 0;
129 | $pane->locks = array();
130 | $pane->uuid = 'f0b7b9d7-f34c-4887-ac46-1b27d1efc673';
131 | $display->content['new-f0b7b9d7-f34c-4887-ac46-1b27d1efc673'] = $pane;
132 | $display->panels['body-middle'][0] = 'new-f0b7b9d7-f34c-4887-ac46-1b27d1efc673';
133 | $pane = new stdClass();
134 | $pane->pid = 'new-8da57751-580e-42a4-aada-0cb70a470b31';
135 | $pane->panel = 'body-right';
136 | $pane->type = 'redes_sociales';
137 | $pane->subtype = 'redes_sociales';
138 | $pane->shown = TRUE;
139 | $pane->access = array();
140 | $pane->configuration = array(
141 | 'titulo' => 'Redes Sociales',
142 | 'tipo_widget' => 'timeline',
143 | 'tipo_widget_timeline' => 'facebook',
144 | 'fb_page_url' => 'https://www.facebook.com/facebook',
145 | 'fb_altura' => '500',
146 | 'fb_mostrar_post' => 1,
147 | 'fb_mostrar_fotos_amigos' => 1,
148 | 'fb_ocultar_portada' => 0,
149 | 'tw_widget_id' => '',
150 | 'tw_screen_name' => '',
151 | 'override_title' => 0,
152 | 'override_title_text' => '',
153 | 'override_title_heading' => 'h2',
154 | );
155 | $pane->cache = array();
156 | $pane->style = array(
157 | 'settings' => NULL,
158 | );
159 | $pane->css = array();
160 | $pane->extras = array();
161 | $pane->position = 0;
162 | $pane->locks = array();
163 | $pane->uuid = '8da57751-580e-42a4-aada-0cb70a470b31';
164 | $display->content['new-8da57751-580e-42a4-aada-0cb70a470b31'] = $pane;
165 | $display->panels['body-right'][0] = 'new-8da57751-580e-42a4-aada-0cb70a470b31';
166 | $pane = new stdClass();
167 | $pane->pid = 'new-59fa82a7-1a86-402e-9fdf-50568db273dc';
168 | $pane->panel = 'full';
169 | $pane->type = 'imagen_destacada';
170 | $pane->subtype = 'imagen_destacada';
171 | $pane->shown = TRUE;
172 | $pane->access = array();
173 | $pane->configuration = array(
174 | 'imagen_destacada' => NULL,
175 | );
176 | $pane->cache = array();
177 | $pane->style = array(
178 | 'settings' => NULL,
179 | );
180 | $pane->css = array();
181 | $pane->extras = array();
182 | $pane->position = 0;
183 | $pane->locks = array();
184 | $pane->uuid = '59fa82a7-1a86-402e-9fdf-50568db273dc';
185 | $display->content['new-59fa82a7-1a86-402e-9fdf-50568db273dc'] = $pane;
186 | $display->panels['full'][0] = 'new-59fa82a7-1a86-402e-9fdf-50568db273dc';
187 | $pane = new stdClass();
188 | $pane->pid = 'new-d84f2e6f-93fc-4521-9a79-9382140003b7';
189 | $pane->panel = 'top';
190 | $pane->type = 'texto';
191 | $pane->subtype = 'texto';
192 | $pane->shown = TRUE;
193 | $pane->access = array();
194 | $pane->configuration = array(
195 | 'destacado' => 0,
196 | 'texto' => array(
197 | 'value' => '',
198 | 'format' => 'full_html',
199 | ),
200 | 'sobreescribir' => 0,
201 | 'cuerpo_o_resumen' => 'body',
202 | 'override_title' => 0,
203 | 'override_title_text' => '',
204 | 'override_title_heading' => 'h2',
205 | );
206 | $pane->cache = array();
207 | $pane->style = array(
208 | 'settings' => NULL,
209 | );
210 | $pane->css = array();
211 | $pane->extras = array();
212 | $pane->position = 0;
213 | $pane->locks = array();
214 | $pane->uuid = 'd84f2e6f-93fc-4521-9a79-9382140003b7';
215 | $display->content['new-d84f2e6f-93fc-4521-9a79-9382140003b7'] = $pane;
216 | $display->panels['top'][0] = 'new-d84f2e6f-93fc-4521-9a79-9382140003b7';
217 | $display->hide_title = PANELS_TITLE_FIXED;
218 | $display->title_pane = '0';
219 | $handler->conf['display'] = $display;
220 | $export['node_view__area'] = $handler;
221 |
222 | return $export;
223 | }
224 |
--------------------------------------------------------------------------------
/modules/custom/badistro_paginas/badistro_paginas.features.field_instance.inc:
--------------------------------------------------------------------------------
1 | 'page',
16 | 'default_value' => NULL,
17 | 'deleted' => 0,
18 | 'description' => '',
19 | 'display' => array(
20 | 'default' => array(
21 | 'label' => 'hidden',
22 | 'module' => 'text',
23 | 'settings' => array(),
24 | 'type' => 'text_default',
25 | 'weight' => 0,
26 | ),
27 | 'teaser' => array(
28 | 'label' => 'hidden',
29 | 'module' => 'text',
30 | 'settings' => array(
31 | 'trim_length' => 600,
32 | ),
33 | 'type' => 'text_summary_or_trimmed',
34 | 'weight' => 0,
35 | ),
36 | ),
37 | 'entity_type' => 'node',
38 | 'field_name' => 'body',
39 | 'label' => 'Body',
40 | 'required' => FALSE,
41 | 'settings' => array(
42 | 'display_summary' => TRUE,
43 | 'text_processing' => 1,
44 | 'user_register_form' => FALSE,
45 | ),
46 | 'widget' => array(
47 | 'module' => 'text',
48 | 'settings' => array(
49 | 'rows' => 20,
50 | 'summary_rows' => 5,
51 | ),
52 | 'type' => 'text_textarea_with_summary',
53 | 'weight' => 1,
54 | ),
55 | );
56 |
57 | // Exported field_instance: 'node-page-field_featured_image'
58 | $field_instances['node-page-field_featured_image'] = array(
59 | 'bundle' => 'page',
60 | 'deleted' => 0,
61 | 'description' => '',
62 | 'display' => array(
63 | 'default' => array(
64 | 'label' => 'above',
65 | 'module' => 'image',
66 | 'settings' => array(
67 | 'image_link' => '',
68 | 'image_style' => '',
69 | ),
70 | 'type' => 'image',
71 | 'weight' => 2,
72 | ),
73 | 'teaser' => array(
74 | 'label' => 'above',
75 | 'settings' => array(),
76 | 'type' => 'hidden',
77 | 'weight' => 0,
78 | ),
79 | ),
80 | 'entity_type' => 'node',
81 | 'field_name' => 'field_featured_image',
82 | 'label' => 'Imagen destacada',
83 | 'required' => 0,
84 | 'settings' => array(
85 | 'alt_field' => 0,
86 | 'default_image' => 0,
87 | 'file_directory' => '',
88 | 'file_extensions' => 'png gif jpg jpeg',
89 | 'max_filesize' => '',
90 | 'max_resolution' => '',
91 | 'min_resolution' => '',
92 | 'title_field' => 0,
93 | 'user_register_form' => FALSE,
94 | ),
95 | 'widget' => array(
96 | 'active' => 1,
97 | 'module' => 'image',
98 | 'settings' => array(
99 | 'preview_image_style' => 'thumbnail',
100 | 'progress_indicator' => 'throbber',
101 | ),
102 | 'type' => 'image_image',
103 | 'weight' => 2,
104 | ),
105 | );
106 |
107 | // Exported field_instance: 'node-page-field_imagenes'
108 | $field_instances['node-page-field_imagenes'] = array(
109 | 'bundle' => 'page',
110 | 'deleted' => 0,
111 | 'description' => '',
112 | 'display' => array(
113 | 'default' => array(
114 | 'label' => 'above',
115 | 'module' => 'image',
116 | 'settings' => array(
117 | 'image_link' => '',
118 | 'image_style' => '',
119 | ),
120 | 'type' => 'image',
121 | 'weight' => 4,
122 | ),
123 | 'teaser' => array(
124 | 'label' => 'above',
125 | 'settings' => array(),
126 | 'type' => 'hidden',
127 | 'weight' => 0,
128 | ),
129 | ),
130 | 'entity_type' => 'node',
131 | 'field_name' => 'field_imagenes',
132 | 'label' => 'Imágenes',
133 | 'required' => 0,
134 | 'settings' => array(
135 | 'alt_field' => 0,
136 | 'default_image' => 0,
137 | 'file_directory' => '',
138 | 'file_extensions' => 'png gif jpg jpeg',
139 | 'max_filesize' => '',
140 | 'max_resolution' => '',
141 | 'min_resolution' => '',
142 | 'title_field' => 0,
143 | 'user_register_form' => FALSE,
144 | ),
145 | 'widget' => array(
146 | 'active' => 1,
147 | 'module' => 'media',
148 | 'settings' => array(
149 | 'allowed_schemes' => array(
150 | 'public' => 'public',
151 | ),
152 | 'allowed_types' => array(
153 | 'audio' => 0,
154 | 'document' => 0,
155 | 'image' => 'image',
156 | 'video' => 0,
157 | ),
158 | 'browser_plugins' => array(
159 | 'media_default--media_browser_1' => 0,
160 | 'media_default--media_browser_my_files' => 0,
161 | 'upload' => 0,
162 | ),
163 | ),
164 | 'type' => 'media_generic',
165 | 'weight' => 3,
166 | ),
167 | );
168 |
169 | // Exported field_instance: 'node-page-field_links_relacionados'
170 | $field_instances['node-page-field_links_relacionados'] = array(
171 | 'bundle' => 'page',
172 | 'default_value' => NULL,
173 | 'deleted' => 0,
174 | 'description' => '',
175 | 'display' => array(
176 | 'default' => array(
177 | 'label' => 'above',
178 | 'module' => 'link',
179 | 'settings' => array(),
180 | 'type' => 'link_default',
181 | 'weight' => 3,
182 | ),
183 | 'teaser' => array(
184 | 'label' => 'above',
185 | 'settings' => array(),
186 | 'type' => 'hidden',
187 | 'weight' => 0,
188 | ),
189 | ),
190 | 'entity_type' => 'node',
191 | 'field_name' => 'field_links_relacionados',
192 | 'label' => 'Links relacionados',
193 | 'required' => 0,
194 | 'settings' => array(
195 | 'absolute_url' => 1,
196 | 'attributes' => array(
197 | 'class' => '',
198 | 'configurable_class' => 0,
199 | 'configurable_title' => 0,
200 | 'rel' => '',
201 | 'target' => 'default',
202 | 'title' => '',
203 | ),
204 | 'display' => array(
205 | 'url_cutoff' => 80,
206 | ),
207 | 'enable_tokens' => 1,
208 | 'rel_remove' => 'default',
209 | 'title' => 'optional',
210 | 'title_label_use_field_label' => 0,
211 | 'title_maxlength' => 128,
212 | 'title_value' => '',
213 | 'url' => 0,
214 | 'user_register_form' => FALSE,
215 | 'validate_url' => 1,
216 | ),
217 | 'widget' => array(
218 | 'active' => 0,
219 | 'module' => 'link',
220 | 'settings' => array(),
221 | 'type' => 'link_field',
222 | 'weight' => 5,
223 | ),
224 | );
225 |
226 | // Exported field_instance: 'node-page-field_paginas_relacionadas'
227 | $field_instances['node-page-field_paginas_relacionadas'] = array(
228 | 'bundle' => 'page',
229 | 'default_value' => NULL,
230 | 'deleted' => 0,
231 | 'description' => '',
232 | 'display' => array(
233 | 'default' => array(
234 | 'label' => 'above',
235 | 'module' => 'entityreference',
236 | 'settings' => array(
237 | 'link' => FALSE,
238 | ),
239 | 'type' => 'entityreference_label',
240 | 'weight' => 1,
241 | ),
242 | 'teaser' => array(
243 | 'label' => 'above',
244 | 'settings' => array(),
245 | 'type' => 'hidden',
246 | 'weight' => 0,
247 | ),
248 | ),
249 | 'entity_type' => 'node',
250 | 'field_name' => 'field_paginas_relacionadas',
251 | 'label' => 'Páginas relacionadas',
252 | 'required' => 0,
253 | 'settings' => array(
254 | 'user_register_form' => FALSE,
255 | ),
256 | 'widget' => array(
257 | 'active' => 1,
258 | 'module' => 'entityreference',
259 | 'settings' => array(
260 | 'match_operator' => 'CONTAINS',
261 | 'path' => '',
262 | 'size' => 60,
263 | ),
264 | 'type' => 'entityreference_autocomplete',
265 | 'weight' => 4,
266 | ),
267 | );
268 |
269 | // Translatables
270 | // Included for use with string extractors like potx.
271 | t('Body');
272 | t('Imagen destacada');
273 | t('Imágenes');
274 | t('Links relacionados');
275 | t('Páginas relacionadas');
276 |
277 | return $field_instances;
278 | }
279 |
--------------------------------------------------------------------------------
/modules/custom/badistro_cck/badistro_cck.features.menu_links.inc:
--------------------------------------------------------------------------------
1 | 'main-menu',
16 | 'link_path' => 'noticias',
17 | 'router_path' => 'noticias',
18 | 'link_title' => 'Noticias',
19 | 'options' => array(
20 | 'attributes' => array(
21 | 'title' => '',
22 | ),
23 | 'icon' => array(
24 | 'icon' => '',
25 | 'position' => 'title_before',
26 | 'title_wrapper_element' => 'span',
27 | 'title_wrapper_class' => 'title',
28 | 'breadcrumb' => 0,
29 | 'title_wrapper' => 0,
30 | ),
31 | 'identifier' => 'main-menu_noticias:noticias',
32 | ),
33 | 'module' => 'menu',
34 | 'hidden' => 0,
35 | 'external' => 0,
36 | 'has_children' => 0,
37 | 'expanded' => 0,
38 | 'weight' => 0,
39 | 'customized' => 1,
40 | );
41 | // Exported menu link: main-menu_reas:areas
42 | $menu_links['main-menu_reas:areas'] = array(
43 | 'menu_name' => 'main-menu',
44 | 'link_path' => 'areas',
45 | 'router_path' => 'areas',
46 | 'link_title' => 'Áreas',
47 | 'options' => array(
48 | 'attributes' => array(
49 | 'title' => '',
50 | ),
51 | 'icon' => array(
52 | 'icon' => '',
53 | 'position' => 'title_before',
54 | 'title_wrapper_element' => 'span',
55 | 'title_wrapper_class' => 'title',
56 | 'breadcrumb' => 0,
57 | 'title_wrapper' => 0,
58 | ),
59 | 'identifier' => 'main-menu_reas:areas',
60 | ),
61 | 'module' => 'menu',
62 | 'hidden' => 0,
63 | 'external' => 0,
64 | 'has_children' => 1,
65 | 'expanded' => 0,
66 | 'weight' => 0,
67 | 'customized' => 1,
68 | );
69 | // Exported menu link: main-menu_trmites:tramites
70 | $menu_links['main-menu_trmites:tramites'] = array(
71 | 'menu_name' => 'main-menu',
72 | 'link_path' => 'tramites',
73 | 'router_path' => 'tramites',
74 | 'link_title' => 'Trámites',
75 | 'options' => array(
76 | 'attributes' => array(
77 | 'title' => '',
78 | ),
79 | 'icon' => array(
80 | 'icon' => '',
81 | 'position' => 'title_before',
82 | 'title_wrapper_element' => 'span',
83 | 'title_wrapper_class' => 'title',
84 | 'breadcrumb' => 0,
85 | 'title_wrapper' => 0,
86 | ),
87 | 'identifier' => 'main-menu_trmites:tramites',
88 | ),
89 | 'module' => 'menu',
90 | 'hidden' => 0,
91 | 'external' => 0,
92 | 'has_children' => 0,
93 | 'expanded' => 0,
94 | 'weight' => 0,
95 | 'customized' => 1,
96 | );
97 | // Exported menu link: menu-redes-sociales_facebook:http://www.facebook.com/gcba
98 | $menu_links['menu-redes-sociales_facebook:http://www.facebook.com/gcba'] = array(
99 | 'menu_name' => 'menu-redes-sociales',
100 | 'link_path' => 'http://www.facebook.com/gcba',
101 | 'router_path' => '',
102 | 'link_title' => 'Facebook',
103 | 'options' => array(
104 | 'icon' => array(
105 | 'icon' => '',
106 | 'position' => 'title_before',
107 | 'title_wrapper_element' => 'span',
108 | 'title_wrapper_class' => 'title',
109 | 'breadcrumb' => 0,
110 | 'title_wrapper' => 0,
111 | ),
112 | 'attributes' => array(
113 | 'title' => '',
114 | ),
115 | 'identifier' => 'menu-redes-sociales_facebook:http://www.facebook.com/gcba',
116 | ),
117 | 'module' => 'menu',
118 | 'hidden' => 0,
119 | 'external' => 1,
120 | 'has_children' => 0,
121 | 'expanded' => 0,
122 | 'weight' => -50,
123 | 'customized' => 1,
124 | );
125 | // Exported menu link: menu-redes-sociales_flickr:http://www.flickr.com/photos/buenosairesprensa
126 | $menu_links['menu-redes-sociales_flickr:http://www.flickr.com/photos/buenosairesprensa'] = array(
127 | 'menu_name' => 'menu-redes-sociales',
128 | 'link_path' => 'http://www.flickr.com/photos/buenosairesprensa',
129 | 'router_path' => '',
130 | 'link_title' => 'Flickr',
131 | 'options' => array(
132 | 'icon' => array(
133 | 'icon' => '',
134 | 'position' => 'title_before',
135 | 'title_wrapper_element' => 'span',
136 | 'title_wrapper_class' => 'title',
137 | 'breadcrumb' => 0,
138 | 'title_wrapper' => 0,
139 | ),
140 | 'attributes' => array(
141 | 'title' => '',
142 | ),
143 | 'identifier' => 'menu-redes-sociales_flickr:http://www.flickr.com/photos/buenosairesprensa',
144 | ),
145 | 'module' => 'menu',
146 | 'hidden' => 0,
147 | 'external' => 1,
148 | 'has_children' => 0,
149 | 'expanded' => 0,
150 | 'weight' => -46,
151 | 'customized' => 1,
152 | );
153 | // Exported menu link: menu-redes-sociales_google:https://plus.google.com/+GobiernodelaCiudaddeBuenosAires/
154 | $menu_links['menu-redes-sociales_google:https://plus.google.com/+GobiernodelaCiudaddeBuenosAires/'] = array(
155 | 'menu_name' => 'menu-redes-sociales',
156 | 'link_path' => 'https://plus.google.com/+GobiernodelaCiudaddeBuenosAires/',
157 | 'router_path' => '',
158 | 'link_title' => 'Google',
159 | 'options' => array(
160 | 'icon' => array(
161 | 'icon' => '',
162 | 'position' => 'title_before',
163 | 'title_wrapper_element' => 'span',
164 | 'title_wrapper_class' => 'title',
165 | 'breadcrumb' => 0,
166 | 'title_wrapper' => 0,
167 | ),
168 | 'attributes' => array(
169 | 'title' => '',
170 | ),
171 | 'identifier' => 'menu-redes-sociales_google:https://plus.google.com/+GobiernodelaCiudaddeBuenosAires/',
172 | ),
173 | 'module' => 'menu',
174 | 'hidden' => 0,
175 | 'external' => 1,
176 | 'has_children' => 0,
177 | 'expanded' => 0,
178 | 'weight' => -48,
179 | 'customized' => 1,
180 | );
181 | // Exported menu link: menu-redes-sociales_rss:http://www.google.com
182 | $menu_links['menu-redes-sociales_rss:http://www.google.com'] = array(
183 | 'menu_name' => 'menu-redes-sociales',
184 | 'link_path' => 'http://www.google.com',
185 | 'router_path' => '',
186 | 'link_title' => 'RSS',
187 | 'options' => array(
188 | 'icon' => array(
189 | 'icon' => '',
190 | 'position' => 'title_before',
191 | 'title_wrapper_element' => 'span',
192 | 'title_wrapper_class' => 'title',
193 | 'breadcrumb' => 0,
194 | 'title_wrapper' => 0,
195 | ),
196 | 'attributes' => array(
197 | 'title' => '',
198 | ),
199 | 'identifier' => 'menu-redes-sociales_rss:http://www.google.com',
200 | ),
201 | 'module' => 'menu',
202 | 'hidden' => 0,
203 | 'external' => 1,
204 | 'has_children' => 0,
205 | 'expanded' => 0,
206 | 'weight' => -45,
207 | 'customized' => 1,
208 | );
209 | // Exported menu link: menu-redes-sociales_twitter:http://www.twitter.com/gcba
210 | $menu_links['menu-redes-sociales_twitter:http://www.twitter.com/gcba'] = array(
211 | 'menu_name' => 'menu-redes-sociales',
212 | 'link_path' => 'http://www.twitter.com/gcba',
213 | 'router_path' => '',
214 | 'link_title' => 'Twitter',
215 | 'options' => array(
216 | 'icon' => array(
217 | 'icon' => '',
218 | 'position' => 'title_before',
219 | 'title_wrapper_element' => 'span',
220 | 'title_wrapper_class' => 'title',
221 | 'breadcrumb' => 0,
222 | 'title_wrapper' => 0,
223 | ),
224 | 'attributes' => array(
225 | 'title' => '',
226 | ),
227 | 'identifier' => 'menu-redes-sociales_twitter:http://www.twitter.com/gcba',
228 | ),
229 | 'module' => 'menu',
230 | 'hidden' => 0,
231 | 'external' => 1,
232 | 'has_children' => 0,
233 | 'expanded' => 0,
234 | 'weight' => -49,
235 | 'customized' => 1,
236 | );
237 | // Exported menu link: menu-redes-sociales_youtube:http://www.youtube.com/user/GCBA
238 | $menu_links['menu-redes-sociales_youtube:http://www.youtube.com/user/GCBA'] = array(
239 | 'menu_name' => 'menu-redes-sociales',
240 | 'link_path' => 'http://www.youtube.com/user/GCBA',
241 | 'router_path' => '',
242 | 'link_title' => 'Youtube',
243 | 'options' => array(
244 | 'icon' => array(
245 | 'icon' => '',
246 | 'position' => 'title_before',
247 | 'title_wrapper_element' => 'span',
248 | 'title_wrapper_class' => 'title',
249 | 'breadcrumb' => 0,
250 | 'title_wrapper' => 0,
251 | ),
252 | 'attributes' => array(
253 | 'title' => '',
254 | ),
255 | 'identifier' => 'menu-redes-sociales_youtube:http://www.youtube.com/user/GCBA',
256 | ),
257 | 'module' => 'menu',
258 | 'hidden' => 0,
259 | 'external' => 1,
260 | 'has_children' => 0,
261 | 'expanded' => 0,
262 | 'weight' => -47,
263 | 'customized' => 1,
264 | );
265 |
266 | // Translatables
267 | // Included for use with string extractors like potx.
268 | t('Facebook');
269 | t('Flickr');
270 | t('Google');
271 | t('Noticias');
272 | t('RSS');
273 | t('Trámites');
274 | t('Twitter');
275 | t('Youtube');
276 | t('Áreas');
277 |
278 | return $menu_links;
279 | }
280 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # AR-Distro
2 |
3 | Distribución Drupal gratuita del Gobierno Nacional.
4 |
5 | Desarrollamos AR-Distro como extensión de BAdistro, realizada por el Gobierno de la Ciudad de Buenos Aires. Es un perfil de instalación de Drupal compuesto por un conjunto de módulos para instalar y configurar de forma pre-determinada con la finalidad de que todos los gobiernos tengan acceso a las funcionalidades más importantes de una web gubernamental.
6 |
7 | Basada en la experiencia del equipo del Gobierno de la Ciudad con el sitio web buenosaires.gob.ar, la interacción con los ciudadanos y las necesidades de las diferentes áreas de gobierno, surgió esta intención de contribuir a la comunidad Drupal y a otros gobiernos del país.
8 |
9 | AR-Distro 1.0 contiene:
10 |
11 | * Layout responsive: Diseño adaptable a todo tipo de dispositivo
12 | * Carrousel: Permite filtrar por tipo de contenidos a mostrar, elegir la cantidad de items a presentar y a su vez, por categoría de noticias o tipo de trámite
13 | Alerta: Permite elegir el tipo de alerta (success, danger, warning, info) y personalizar el texto a mostrar (admite full html)
14 | * Shortcut o Atajo: Permite elegir icono, color, título, un texto breve y dónde enlaza
15 | * Listado: Este es el bloque fuerte (la base de la distro), permite elegir un título, el tipo de contenido a mostrar y a su vez filtrarlo por categoría o tipo. Elegir entre 3 formatos de estilo diferentes y su orientación: horizontal o vertical. Además, tiene 2 funcionamientos dinámicos: recientes o relacionados. Recientes lista los items de manera temporal mientras que relacionados combina las otras configuraciones del bloque:
16 | * Si el tipo de contenido es Noticia y el listado se muestra en un Área, muestra las noticias relacionadas al área.
17 | * Si el tipo de contenido es Área y el listado se muestra en un Área, muestra las subáreas.
18 | * Si el tipo de contenido es Noticia y el listado se muestra en una Noticia, muestra noticias de la misma categoría que la noticia original.
19 | * Campo: Permite elegir distintos tipos de campos a mostrar de un contenido determinado
20 | * Redes Sociales: Integra timelines de Facebook o Twitter y agrega links de compartir
21 | * Imagen destacada: Levanta el campo imagen destacada
22 | * Galería de imágenes: Levanta el campo Imágenes de un contenido determinado. Las renderiza en una galería tipo modal (o lightbox)
23 | * Texto: Muestra el texto (campo body) de un contenido o permite mostrar un texto personalizado
24 | * Título: Muestra el texto (campo title) de un contenido o permite mostrar un título personalizado. Además da la opción de elegir el tag entre h1 a h6
25 |
26 | # Requisitos
27 |
28 | Un servidor con:
29 |
30 | * Apache (http://www.apache.org/dyn/closer.cgi)
31 | * MySQL 5.5 (https://www.mysql.com/downloads/)
32 | * PHP 5.6 (http://www.php.net/downloads)
33 | * Drush (http://docs.drush.org/en/master/install/)
34 |
35 | # Instalación
36 |
37 | Dentro de la carpeta que se crea ejecutar:
38 |
39 | sh scripts/build.sh path/al/webroot
40 |
41 | Luego desde el browser entrar a path/al/webroot y seguir los pasos de la instalación de Drupal.
42 |
43 | ## En ARSAT (con Redhat 7)
44 |
45 | Debido a que ARSAT está ofreciendo servidores que tienen instalado el sistema operativo Redhat 7 es necesario hacer una nueva revisión del instructivo de instalación de la distribución. Varios de los siguientes pasos ya estaban presentes en el instructivo de instalación en ARSAT con el sistema operativo CentOs 6, todos los pasos deberán ser ejecutados utilizando un usuario con permisos de administrador.
46 |
47 | Actualizar YUM e instalar algunas herramientas que vamos a necesitar:
48 |
49 | yum update -y
50 | yum install -y iptables-services git
51 |
52 | Instalar Apache:
53 |
54 | yum install -y httpd
55 | service httpd start
56 |
57 | Habilitar el acceso al servidor a través del puerto 80:
58 |
59 | iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT
60 | service iptables save
61 |
62 | Remover instalaciones existentes de MySQL o MariaDB para que no entren en conflicto con la version de MySql que debemos instalar, los servidores de ARSAT ya tienen instalado MariaDB:
63 |
64 | yum remove mariadb mariadb-*
65 | yum remove mysql mysql-*
66 |
67 | Instalar MySQL 5.5:
68 |
69 | rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
70 | yum install -y mysql55w-server
71 | service mysqld start
72 | /usr/bin/mysql_secure_installation
73 |
74 | Actualizar la lista de repositorios de Redhat 7 ingresando aquellos repositorios que nos permitan instalar la versión 5.6 de PHP y otros paquetes asociados:
75 |
76 | rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
77 | rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
78 | yum clean all
79 |
80 | la ejecución del comando yum clean all es un paso necesario debido a que sin ejecutarlo yum devuelve Requires: libgmp.so.3()(64bit) al instalar PHP
81 |
82 | Instalar PHP 5.6 y algunas extensiones útiles:
83 |
84 | yum install -y php56w php56w-opcache
85 | yum install -y php56w-mbstring php56w-mysql php56w-sqlite php56w-gd php56w-xml php56w-cli
86 |
87 | Verificar el estado de instalación de PHP:
88 |
89 | php -v
90 |
91 | El interprete de PHP mostrará un listado de advertencias y errores relacionados a la librería php56w-mysql, dentro de los cuales se encuentra el siguiente mensaje:
92 |
93 | warning Unable to load dynamic library '/usr/lib64/php/modules/mysql.so'
94 |
95 | Es necesario optar por instalar la librería mysqlnd que es una versión mejorada de la tradicional php-mysql. A continuación deben removerse los archivos instalados de la librería php-mysql e instalar la librería mysqlnd:
96 |
97 | yum remove php56w-mysql
98 | yum install php56w-mysqlnd
99 |
100 | En cualquier directorio **privado** del servidor, clonar el repo de AR-Distro:
101 |
102 | git clone https://github.com/argob/AR-Distro
103 |
104 | Dentro del directorio creado, instalar [Composer](https://getcomposer.org/download/):
105 |
106 | cd AR-Distro
107 | php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
108 | php composer-setup.php
109 | php -r "unlink('composer-setup.php');"
110 |
111 | Instalar Drush 8.1:
112 |
113 | php composer.phar require drush/drush:8.1
114 |
115 | Ejecutar el script de instalación de AR-Distro, especificando el path al directorio **público** del servidor que usualmente es /var/www/html:
116 |
117 | sh scripts/build.sh /path/al/webroot
118 |
119 | El propietario de los archivos de instalación debe ser el usuario que corre el servicio de apache, en este caso el usuario es apache pero puede ser httpd en otros sistemas, los permisos otorgados a los archivos deben ser de escritura, lectura, modificación y ejecución para el propietario:
120 |
121 | chown -R apache:apache /path/al/webroot
122 | chmod -R 755 /path/al/webroot
123 |
124 | Modificar el archivo de configuración de Apache para que con la opción de acceso AllowOverride All permita el uso del archivo .htaccess que es necesario para efectuar la parte final de la instalación. El archivo de configuración de Apache puede estar localizado en /etc/httpd/conf/httpd.conf
125 |
126 | En el archivo dejar en la sección DocumentRoot "/var/www/html" las siguientes opciones:
127 |
128 | Options FollowSymLinks
129 | AllowOverride All
130 | Require all granted
131 |
132 | Reiniciar apache y el contexto de seguridad para archivos y directorios del webroot
133 |
134 | service httpd restart
135 | restorecon -r /var/www/html
136 |
137 | Luego visitar el sitio con un navegador y seguir las instrucciones de instalación de Drupal.
138 |
139 | ## En ARSAT (Con CentOS 6)
140 |
141 | Para instalar una AR-Distro en ARSAT, lo primero es crear una instancia con el sistema operativo CentOS 6. Luego ejecuta los siguientes comandos via SSH como root. Estos comandos están tomados en parte de [esta guía](https://extravm.com/billing/knowledgebase/34/Install-LAMP-on-CentOS-6-MySQL-55-PHP-56.html).
142 |
143 | Actualizar YUM e instalar algunas herramientas que vamos a necesitar:
144 |
145 | yum update -y
146 | yum install -y iptables-services git
147 |
148 | Instalar Apache:
149 |
150 | yum install -y httpd
151 | service httpd start
152 |
153 | Habilitar el acceso al servidor a través del puerto 80:
154 |
155 | iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT
156 | service iptables save
157 |
158 | Instalar MySQL 5.5:
159 |
160 | rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
161 | yum remove -y mysql-libs*
162 | yum install -y mysql55w-server
163 | /usr/bin/mysql_secure_installation
164 |
165 | Instalar PHP 5.6 y algunas extensiones útiles:
166 |
167 | yum install -y php56w php56w-mbstring php56w-mysql php56w-sqlite php56w-gd php56w-xml php56w-cli
168 |
169 | En cualquier directorio **privado** del servidor, clonar el repo de AR-Distro:
170 |
171 | git clone https://github.com/argob/AR-Distro
172 |
173 | Dentro del directorio creado, instalar [Composer](https://getcomposer.org/download/):
174 |
175 | cd AR-Distro
176 | php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
177 | php composer-setup.php
178 | php -r "unlink('composer-setup.php');"
179 |
180 | Instalar Drush:
181 |
182 | php composer.phar require drush/drush
183 |
184 | Ejecutar el script de instalación de AR-Distro, especificando el path al directorio **público** del servidor:
185 |
186 | sh scripts/build.sh /path/al/webroot
187 |
188 | Luego visitar el sitio con un navegador y seguir las instrucciones de instalación de Drupal.
189 |
190 |
--------------------------------------------------------------------------------
/modules/custom/badistro_bloques/plugins/content_types/listado.inc:
--------------------------------------------------------------------------------
1 | TRUE,
5 | 'title' => t('Listado'),
6 | 'description' => t('Crea un listado de contenido configurable'),
7 | 'category' => t('BA Distro'),
8 | 'render callback' => 'badistro_bloques_listado_render',
9 | 'edit form' => 'badistro_bloques_listado_edit_form',
10 | 'admin info' => 'badistro_bloques_listado_admin_info',
11 | 'defaults' => array(
12 | 'cantidad_links' => 5,
13 | 'tipo_de_listado' => 'recientes',
14 | 'tipos_de_contenido' => 'noticia',
15 | 'formato_de_listado' => 'solo_texto',
16 | 'titulo' => t('Listado'),
17 | 'icono' => 'glyphicon-paperclip',
18 | 'tipo_noticia' => 'all',
19 | 'tipo_tramite' => 'all',
20 | 'orientacion_de_listado' => 'vertical',
21 | 'todos_los_items' => TRUE,
22 | )
23 | );
24 |
25 | /**
26 | * 'admin info' callback for panel pane.
27 | */
28 | function badistro_bloques_listado_admin_info($subtype, $conf, $contexts) {
29 | if (!empty($conf)) {
30 | $block = new stdClass;
31 | $block->title = $conf['override_title'] ? $conf['override_title_text'] : t('Listado');
32 | $block->content = t('Listado');
33 | return $block;
34 | }
35 | }
36 |
37 | /**
38 | * 'Edit form' callback for the content type.
39 | */
40 | function badistro_bloques_listado_edit_form($form, &$form_state) {
41 |
42 | foreach (node_type_get_types() as $item) {
43 | $tiposDeContenido[$item->type] = $item->name;
44 | }
45 | $form['titulo'] = array(
46 | '#title' => t('Título'),
47 | '#type' => 'textfield',
48 | '#default_value' => $form_state['conf']['titulo'],
49 | '#required' => TRUE,
50 | );
51 | $form['cantidad_links'] = array(
52 | '#type' => 'textfield',
53 | '#title' => t('Cantidad'),
54 | '#default_value' => $form_state['conf']['cantidad_links'],
55 | '#element_validate' => array('element_validate_integer_positive'),
56 | '#description' => t('Cantidad máxima de items del listado'),
57 | );
58 | $form['todos_los_items'] = array(
59 | '#type' => 'checkbox',
60 | '#title' => t('Incluír opción "Todos los items"'),
61 | '#default_value' => $form_state['conf']['todos_los_items'],
62 | '#description' => t('Si está tildado se mostrará un link a todos los items del tipo de contenido seleccionado'),
63 | );
64 | $form['tipos_de_contenido'] = array(
65 | '#title' => t('Tipo de contenido'),
66 | '#type' => 'radios',
67 | '#default_value' => $form_state['conf']['tipos_de_contenido'],
68 | '#required' => TRUE,
69 | '#options' => $tiposDeContenido,
70 | '#description' => t('Tipo de contenido a listar'),
71 | );
72 | $form['tipo_tramite'] = array(
73 | '#type' => 'entityreference',
74 | '#title' => t('Tipo de Trámites'),
75 | '#description' => t('Filtrar por tipo de trámite. Dejar vacío para listar todos los trámites'),
76 | '#required' => FALSE,
77 | '#states' => array(
78 | 'visible' => array(
79 | ':input[name="tipos_de_contenido"]' => array('value' => 'tramite'),
80 | ),
81 | ),
82 | '#era_entity_type' => 'taxonomy_term', // Mandatory.
83 | '#era_bundles' => array('tramites'), // Optional (Any bundle by default).
84 | '#era_cardinality' => 2, // Optional (1 By default).
85 | );
86 | $form['tipo_noticia'] = array(
87 | '#type' => 'entityreference',
88 | '#title' => t('Categoría de Noticias'),
89 | '#description' => t('Filtrar por categoría de noticias. Dejar vacío para listar todos los noticias'),
90 | '#required' => FALSE,
91 | '#states' => array(
92 | 'visible' => array(
93 | ':input[name="tipos_de_contenido"]' => array('value' => 'noticia'),
94 | ),
95 | ),
96 | '#era_entity_type' => 'taxonomy_term', // Mandatory.
97 | '#era_bundles' => array('noticias'), // Optional (Any bundle by default).
98 | '#era_cardinality' => 1, // Optional (1 By default).
99 | );
100 | $form['tipo_de_listado'] = array(
101 | '#type' => 'select',
102 | '#title' => t('Tipo de listado'),
103 | '#options' => array(
104 | 'recientes' => t('Recientes'),
105 | 'relacionados' => t('Relacionados'),
106 | ),
107 | '#default_value' => $form_state['conf']['tipo_de_listado'],
108 | '#description' => t('Cada tipo de listado tiene un comportamiento diferente'),
109 | );
110 | $form['formato_de_listado'] = array(
111 | '#type' => 'select',
112 | '#title' => t('Formato de listado'),
113 | '#options' => array(
114 | 'badistro_bloques_listado' => t('Sólo texto'),
115 | 'badistro_bloques_listado_con_imagen' => t('Imagen y texto'),
116 | 'badistro_bloques_listado_destacado' => t('Destacado'),
117 | ),
118 | '#default_value' => $form_state['conf']['formato_de_listado'],
119 | '#description' => t('Cada tipo de listado tiene un comportamiento diferente'),
120 | );
121 | $form['orientacion_de_listado'] = array(
122 | '#title' => t('Orientación'),
123 | '#type' => 'radios',
124 | '#default_value' => $form_state['conf']['orientacion_de_listado'],
125 | '#required' => TRUE,
126 | '#options' => array(
127 | 'vertical' => t("Vertical"),
128 | 'horizontal' => t("Horizontal")
129 | ),
130 | );
131 | $form['icono'] = array(
132 | '#title' => t('Ícono'),
133 | '#type' => 'select',
134 | '#default_value' => $form_state['conf']['icono'],
135 | '#options' => array(
136 | 'glyphicon-home' => t('Casa'),
137 | 'glyphicon-paperclip' => t('Clip'),
138 | 'glyphicon-star' => t('Estrella'),
139 | 'glyphicon-heart' => t('Corazón'),
140 | ),
141 | '#states' => array(
142 | 'visible' => array(
143 | ':input[name="formato_de_listado"]' => array('value' => 'badistro_bloques_listado_destacado'),
144 | ),
145 | ),
146 | );
147 |
148 | return $form;
149 | }
150 |
151 | /**
152 | * The submit form stores the data in $conf.
153 | */
154 | function badistro_bloques_listado_edit_form_submit($form, &$form_state) {
155 | foreach (array_keys($form_state['plugin']['defaults']) as $key) {
156 | if (isset($form_state['values'][$key])) {
157 | $form_state['conf'][$key] = $form_state['values'][$key];
158 | }
159 | }
160 | }
161 | function badistro_bloques_listado_render($subtype, $conf, $panel_args, $context = NULL){
162 | $tipoNoticia = !empty($conf['tipo_noticia']) ? reset($conf['tipo_noticia']) : array();
163 | $tipoTramite = !empty($conf['tipo_tramite']) ? reset($conf['tipo_tramite']) : array();
164 | $block = new stdClass();
165 | $block->title = '';
166 | $view = views_get_view('listado_de_contenido');
167 | $view->set_display('default');
168 | $view->set_arguments(
169 | array(
170 | $conf["tipos_de_contenido"],
171 | !(empty($conf['tipo_noticia'])) ? $tipoNoticia['entity_id'] : 'all',
172 | !(empty($conf['tipo_tramite'])) ? $tipoTramite['entity_id'] : 'all',
173 | $conf['tipo_de_listado'] == 'relacionados' && (esNoticia() || esTramite()) ? arg(1) : 'all',
174 | $conf['tipo_de_listado'] == 'relacionados' && esArea() ? arg(1) : 'all'
175 | )
176 | );
177 | $view->set_items_per_page($conf["cantidad_links"]);
178 | $view->execute();
179 | foreach ($view->result as $key => $item) {
180 | $links[] = crearLink($item, $conf["formato_de_listado"] . '_' . $conf["orientacion_de_listado"], $conf);
181 | }
182 | $block->content = !empty($links) && sizeof($links) > 0 ? theme(
183 | $conf["formato_de_listado"] . '_' . $conf["orientacion_de_listado"],
184 | array(
185 | "titulo" => $conf["titulo"],
186 | 'links' => $links,
187 | 'icono' => $conf['icono'],
188 | 'boton' => $conf['tipos_de_contenido'] != 'pagina' && $conf['todos_los_items'] ? l(t('Ver todos'), '/' . $conf['tipos_de_contenido'] . 's', array('attributes' => array('class' => array('btn', 'btn-default', 'btn-lg', 'btn-block')))) : NULL
189 | )
190 | ) : theme(
191 | 'badistro_bloques_listado_vacio',
192 | array(
193 | "titulo" => $conf["titulo"]
194 | )
195 | );
196 | return $block;
197 | }
198 | function crearLink($item, $theme, $conf = NULL){
199 | $link = new stdClass();
200 | $link->id = $item->nid;
201 | $link->texto = field_get_items('node', $item->_field_data["nid"]["entity"], 'body', NULL);
202 | $link->texto = $link->texto[0]["summary"];
203 | $link->imagen = field_get_items('node', $item->_field_data["nid"]["entity"], 'field_featured_image', NULL);
204 | $link->imagen = theme_image_style(array('style_name' => 'list', 'path' => $link->imagen[0]["uri"], 'width' => '', 'height' => '', 'attributes' => array('class' => array('media-object', 'img-rounded'))));
205 | $link->type = $item->_field_data["nid"]["entity"]->type;
206 | $link->category = ($link->type == 'tramite' || $link->type == 'noticia') && isset($item->_field_data["nid"]["entity"]) ? obtenerTaxonomia($item, $link->type) : NULL;
207 | $link->category = isset($link->category) ? taxonomy_term_load($link->category[0]["target_id"]) : NULL;
208 | $link->category = isset($link->category) && !empty($link->category) ? l($link->category->name, 'taxonomy/term/' . $link->category->tid) : NULL;
209 |
210 | return l(
211 | theme(
212 | $theme . '_item',
213 | array(
214 | 'titulo' => $item->node_title,
215 | 'texto' => views_trim_text(
216 | array(
217 | 'max_length' => 90,
218 | 'ellipsis' => TRUE,
219 | 'word_boundary' => TRUE,
220 | 'html' => TRUE,
221 | ),
222 | $link->texto
223 | ),
224 | 'imagen' => $link->imagen,
225 | 'icono' => $conf['icono']
226 | )
227 | ),
228 | 'node/' . $item->nid,
229 | array(
230 | 'html' => TRUE,
231 | 'attributes' => array(
232 | 'class' => array(),
233 | )
234 | )
235 | );
236 | }
237 |
238 | function obtenerTaxonomia($item, $tipo){
239 | return $tipo == 'tramite' ? field_get_items('node', $item->_field_data["nid"]["entity"], 'field_tramite_tipo', NULL) : field_get_items('node', $item->_field_data["nid"]["entity"], 'field_categoria', NULL);
240 | }
--------------------------------------------------------------------------------
/modules/custom/badistro_cck/badistro_cck.views_default.inc:
--------------------------------------------------------------------------------
1 | name = 'listado_de_contenido';
15 | $view->description = '';
16 | $view->tag = 'default';
17 | $view->base_table = 'node';
18 | $view->human_name = 'Listado de Contenido';
19 | $view->core = 7;
20 | $view->api_version = '3.0';
21 | $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
22 |
23 | /* Display: Master */
24 | $handler = $view->new_display('default', 'Master', 'default');
25 | $handler->display->display_options['title'] = 'Listado de Contenido';
26 | $handler->display->display_options['use_more_always'] = FALSE;
27 | $handler->display->display_options['access']['type'] = 'perm';
28 | $handler->display->display_options['cache']['type'] = 'none';
29 | $handler->display->display_options['query']['type'] = 'views_query';
30 | $handler->display->display_options['exposed_form']['type'] = 'basic';
31 | $handler->display->display_options['pager']['type'] = 'full';
32 | $handler->display->display_options['pager']['options']['items_per_page'] = '0';
33 | $handler->display->display_options['pager']['options']['offset'] = '0';
34 | $handler->display->display_options['pager']['options']['id'] = '0';
35 | $handler->display->display_options['pager']['options']['quantity'] = '9';
36 | $handler->display->display_options['style_plugin'] = 'default';
37 | $handler->display->display_options['row_plugin'] = 'fields';
38 | /* Field: Content: Nid */
39 | $handler->display->display_options['fields']['nid']['id'] = 'nid';
40 | $handler->display->display_options['fields']['nid']['table'] = 'node';
41 | $handler->display->display_options['fields']['nid']['field'] = 'nid';
42 | $handler->display->display_options['fields']['nid']['label'] = '';
43 | $handler->display->display_options['fields']['nid']['element_label_colon'] = FALSE;
44 | /* Field: Content: Title */
45 | $handler->display->display_options['fields']['title']['id'] = 'title';
46 | $handler->display->display_options['fields']['title']['table'] = 'node';
47 | $handler->display->display_options['fields']['title']['field'] = 'title';
48 | $handler->display->display_options['fields']['title']['label'] = '';
49 | $handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
50 | $handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
51 | /* Field: Content: Body */
52 | $handler->display->display_options['fields']['body']['id'] = 'body';
53 | $handler->display->display_options['fields']['body']['table'] = 'field_data_body';
54 | $handler->display->display_options['fields']['body']['field'] = 'body';
55 | $handler->display->display_options['fields']['body']['label'] = '';
56 | $handler->display->display_options['fields']['body']['element_label_colon'] = FALSE;
57 | $handler->display->display_options['fields']['body']['element_default_classes'] = FALSE;
58 | $handler->display->display_options['fields']['body']['type'] = 'text_summary_or_trimmed';
59 | $handler->display->display_options['fields']['body']['settings'] = array(
60 | 'trim_length' => '600',
61 | );
62 | /* Field: Content: Imagen destacada */
63 | $handler->display->display_options['fields']['field_featured_image']['id'] = 'field_featured_image';
64 | $handler->display->display_options['fields']['field_featured_image']['table'] = 'field_data_field_featured_image';
65 | $handler->display->display_options['fields']['field_featured_image']['field'] = 'field_featured_image';
66 | $handler->display->display_options['fields']['field_featured_image']['label'] = '';
67 | $handler->display->display_options['fields']['field_featured_image']['element_label_colon'] = FALSE;
68 | $handler->display->display_options['fields']['field_featured_image']['click_sort_column'] = 'fid';
69 | $handler->display->display_options['fields']['field_featured_image']['settings'] = array(
70 | 'image_style' => '',
71 | 'image_link' => '',
72 | );
73 | /* Sort criterion: Content: Post date */
74 | $handler->display->display_options['sorts']['created']['id'] = 'created';
75 | $handler->display->display_options['sorts']['created']['table'] = 'node';
76 | $handler->display->display_options['sorts']['created']['field'] = 'created';
77 | $handler->display->display_options['sorts']['created']['order'] = 'DESC';
78 | /* Contextual filter: Content: Type */
79 | $handler->display->display_options['arguments']['type']['id'] = 'type';
80 | $handler->display->display_options['arguments']['type']['table'] = 'node';
81 | $handler->display->display_options['arguments']['type']['field'] = 'type';
82 | $handler->display->display_options['arguments']['type']['default_argument_type'] = 'fixed';
83 | $handler->display->display_options['arguments']['type']['summary']['number_of_records'] = '0';
84 | $handler->display->display_options['arguments']['type']['summary']['format'] = 'default_summary';
85 | $handler->display->display_options['arguments']['type']['summary_options']['items_per_page'] = '25';
86 | $handler->display->display_options['arguments']['type']['limit'] = '0';
87 | $handler->display->display_options['arguments']['type']['break_phrase'] = TRUE;
88 | /* Contextual filter: Content: Categoría (field_categoria) */
89 | $handler->display->display_options['arguments']['field_categoria_target_id']['id'] = 'field_categoria_target_id';
90 | $handler->display->display_options['arguments']['field_categoria_target_id']['table'] = 'field_data_field_categoria';
91 | $handler->display->display_options['arguments']['field_categoria_target_id']['field'] = 'field_categoria_target_id';
92 | $handler->display->display_options['arguments']['field_categoria_target_id']['default_argument_type'] = 'fixed';
93 | $handler->display->display_options['arguments']['field_categoria_target_id']['summary']['number_of_records'] = '0';
94 | $handler->display->display_options['arguments']['field_categoria_target_id']['summary']['format'] = 'default_summary';
95 | $handler->display->display_options['arguments']['field_categoria_target_id']['summary_options']['items_per_page'] = '25';
96 | /* Contextual filter: Content: Tipo de Trámite (field_tramite_tipo) */
97 | $handler->display->display_options['arguments']['field_tramite_tipo_target_id']['id'] = 'field_tramite_tipo_target_id';
98 | $handler->display->display_options['arguments']['field_tramite_tipo_target_id']['table'] = 'field_data_field_tramite_tipo';
99 | $handler->display->display_options['arguments']['field_tramite_tipo_target_id']['field'] = 'field_tramite_tipo_target_id';
100 | $handler->display->display_options['arguments']['field_tramite_tipo_target_id']['default_argument_type'] = 'fixed';
101 | $handler->display->display_options['arguments']['field_tramite_tipo_target_id']['summary']['number_of_records'] = '0';
102 | $handler->display->display_options['arguments']['field_tramite_tipo_target_id']['summary']['format'] = 'default_summary';
103 | $handler->display->display_options['arguments']['field_tramite_tipo_target_id']['summary_options']['items_per_page'] = '25';
104 | /* Contextual filter: Content: Nid */
105 | $handler->display->display_options['arguments']['nid']['id'] = 'nid';
106 | $handler->display->display_options['arguments']['nid']['table'] = 'node';
107 | $handler->display->display_options['arguments']['nid']['field'] = 'nid';
108 | $handler->display->display_options['arguments']['nid']['default_argument_type'] = 'fixed';
109 | $handler->display->display_options['arguments']['nid']['summary']['number_of_records'] = '0';
110 | $handler->display->display_options['arguments']['nid']['summary']['format'] = 'default_summary';
111 | $handler->display->display_options['arguments']['nid']['summary_options']['items_per_page'] = '25';
112 | $handler->display->display_options['arguments']['nid']['not'] = TRUE;
113 | /* Contextual filter: Content: Área relacionada (field_area) */
114 | $handler->display->display_options['arguments']['field_area_target_id']['id'] = 'field_area_target_id';
115 | $handler->display->display_options['arguments']['field_area_target_id']['table'] = 'field_data_field_area';
116 | $handler->display->display_options['arguments']['field_area_target_id']['field'] = 'field_area_target_id';
117 | $handler->display->display_options['arguments']['field_area_target_id']['default_argument_type'] = 'fixed';
118 | $handler->display->display_options['arguments']['field_area_target_id']['summary']['number_of_records'] = '0';
119 | $handler->display->display_options['arguments']['field_area_target_id']['summary']['format'] = 'default_summary';
120 | $handler->display->display_options['arguments']['field_area_target_id']['summary_options']['items_per_page'] = '25';
121 | /* Filter criterion: Content: Published */
122 | $handler->display->display_options['filters']['status']['id'] = 'status';
123 | $handler->display->display_options['filters']['status']['table'] = 'node';
124 | $handler->display->display_options['filters']['status']['field'] = 'status';
125 | $handler->display->display_options['filters']['status']['value'] = 1;
126 | $handler->display->display_options['filters']['status']['group'] = 1;
127 | $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
128 |
129 | /* Display: General */
130 | $handler = $view->new_display('block', 'General', 'listado_de_contenido_default');
131 | $translatables['listado_de_contenido'] = array(
132 | t('Master'),
133 | t('Listado de Contenido'),
134 | t('more'),
135 | t('Apply'),
136 | t('Reset'),
137 | t('Sort by'),
138 | t('Asc'),
139 | t('Desc'),
140 | t('Items per page'),
141 | t('- All -'),
142 | t('Offset'),
143 | t('« first'),
144 | t('‹ previous'),
145 | t('next ›'),
146 | t('last »'),
147 | t('All'),
148 | t('General'),
149 | );
150 | $export['listado_de_contenido'] = $view;
151 |
152 | return $export;
153 | }
154 |
--------------------------------------------------------------------------------
/modules/custom/badistro_areas/badistro_areas.features.field_instance.inc:
--------------------------------------------------------------------------------
1 | 'area',
16 | 'default_value' => NULL,
17 | 'deleted' => 0,
18 | 'description' => '',
19 | 'display' => array(
20 | 'default' => array(
21 | 'label' => 'hidden',
22 | 'module' => 'text',
23 | 'settings' => array(),
24 | 'type' => 'text_default',
25 | 'weight' => 0,
26 | ),
27 | 'teaser' => array(
28 | 'label' => 'hidden',
29 | 'module' => 'text',
30 | 'settings' => array(
31 | 'trim_length' => 600,
32 | ),
33 | 'type' => 'text_summary_or_trimmed',
34 | 'weight' => 0,
35 | ),
36 | ),
37 | 'entity_type' => 'node',
38 | 'field_name' => 'body',
39 | 'label' => 'Body',
40 | 'required' => FALSE,
41 | 'settings' => array(
42 | 'display_summary' => TRUE,
43 | 'text_processing' => 1,
44 | 'user_register_form' => FALSE,
45 | ),
46 | 'widget' => array(
47 | 'module' => 'text',
48 | 'settings' => array(
49 | 'rows' => 20,
50 | 'summary_rows' => 5,
51 | ),
52 | 'type' => 'text_textarea_with_summary',
53 | 'weight' => 1,
54 | ),
55 | );
56 |
57 | // Exported field_instance: 'node-area-field_area'
58 | $field_instances['node-area-field_area'] = array(
59 | 'bundle' => 'area',
60 | 'default_value' => NULL,
61 | 'deleted' => 0,
62 | 'description' => '',
63 | 'display' => array(
64 | 'default' => array(
65 | 'label' => 'above',
66 | 'module' => 'entityreference',
67 | 'settings' => array(
68 | 'link' => FALSE,
69 | ),
70 | 'type' => 'entityreference_label',
71 | 'weight' => 2,
72 | ),
73 | 'teaser' => array(
74 | 'label' => 'above',
75 | 'settings' => array(),
76 | 'type' => 'hidden',
77 | 'weight' => 0,
78 | ),
79 | ),
80 | 'entity_type' => 'node',
81 | 'field_name' => 'field_area',
82 | 'label' => 'Área superior',
83 | 'required' => 0,
84 | 'settings' => array(
85 | 'user_register_form' => FALSE,
86 | ),
87 | 'widget' => array(
88 | 'active' => 1,
89 | 'module' => 'entityreference',
90 | 'settings' => array(
91 | 'match_operator' => 'CONTAINS',
92 | 'path' => '',
93 | 'size' => 60,
94 | ),
95 | 'type' => 'entityreference_autocomplete',
96 | 'weight' => 3,
97 | ),
98 | );
99 |
100 | // Exported field_instance: 'node-area-field_featured_image'
101 | $field_instances['node-area-field_featured_image'] = array(
102 | 'bundle' => 'area',
103 | 'deleted' => 0,
104 | 'description' => '',
105 | 'display' => array(
106 | 'default' => array(
107 | 'label' => 'above',
108 | 'module' => 'image',
109 | 'settings' => array(
110 | 'image_link' => '',
111 | 'image_style' => '',
112 | ),
113 | 'type' => 'image',
114 | 'weight' => 5,
115 | ),
116 | 'teaser' => array(
117 | 'label' => 'above',
118 | 'settings' => array(),
119 | 'type' => 'hidden',
120 | 'weight' => 0,
121 | ),
122 | ),
123 | 'entity_type' => 'node',
124 | 'field_name' => 'field_featured_image',
125 | 'label' => 'Imagen destacada',
126 | 'required' => 0,
127 | 'settings' => array(
128 | 'alt_field' => 0,
129 | 'default_image' => 0,
130 | 'file_directory' => '',
131 | 'file_extensions' => 'png gif jpg jpeg',
132 | 'max_filesize' => '',
133 | 'max_resolution' => '',
134 | 'min_resolution' => '',
135 | 'title_field' => 0,
136 | 'user_register_form' => FALSE,
137 | ),
138 | 'widget' => array(
139 | 'active' => 1,
140 | 'module' => 'image',
141 | 'settings' => array(
142 | 'preview_image_style' => 'thumbnail',
143 | 'progress_indicator' => 'throbber',
144 | ),
145 | 'type' => 'image_image',
146 | 'weight' => 4,
147 | ),
148 | );
149 |
150 | // Exported field_instance: 'node-area-field_imagenes'
151 | $field_instances['node-area-field_imagenes'] = array(
152 | 'bundle' => 'area',
153 | 'deleted' => 0,
154 | 'description' => '',
155 | 'display' => array(
156 | 'default' => array(
157 | 'label' => 'above',
158 | 'module' => 'image',
159 | 'settings' => array(
160 | 'image_link' => '',
161 | 'image_style' => '',
162 | ),
163 | 'type' => 'image',
164 | 'weight' => 6,
165 | ),
166 | 'teaser' => array(
167 | 'label' => 'above',
168 | 'settings' => array(),
169 | 'type' => 'hidden',
170 | 'weight' => 0,
171 | ),
172 | ),
173 | 'entity_type' => 'node',
174 | 'field_name' => 'field_imagenes',
175 | 'label' => 'Imágenes',
176 | 'required' => 0,
177 | 'settings' => array(
178 | 'alt_field' => 0,
179 | 'default_image' => 0,
180 | 'file_directory' => '',
181 | 'file_extensions' => 'png gif jpg jpeg',
182 | 'max_filesize' => '',
183 | 'max_resolution' => '',
184 | 'min_resolution' => '',
185 | 'title_field' => 0,
186 | 'user_register_form' => FALSE,
187 | ),
188 | 'widget' => array(
189 | 'active' => 1,
190 | 'module' => 'media',
191 | 'settings' => array(
192 | 'allowed_schemes' => array(
193 | 'public' => 'public',
194 | ),
195 | 'allowed_types' => array(
196 | 'audio' => 0,
197 | 'document' => 0,
198 | 'image' => 'image',
199 | 'video' => 0,
200 | ),
201 | 'browser_plugins' => array(
202 | 'media_default--media_browser_1' => 0,
203 | 'media_default--media_browser_my_files' => 0,
204 | 'upload' => 0,
205 | ),
206 | ),
207 | 'type' => 'media_generic',
208 | 'weight' => 5,
209 | ),
210 | );
211 |
212 | // Exported field_instance: 'node-area-field_links_relacionados'
213 | $field_instances['node-area-field_links_relacionados'] = array(
214 | 'bundle' => 'area',
215 | 'default_value' => NULL,
216 | 'deleted' => 0,
217 | 'description' => '',
218 | 'display' => array(
219 | 'default' => array(
220 | 'label' => 'above',
221 | 'module' => 'link',
222 | 'settings' => array(),
223 | 'type' => 'link_default',
224 | 'weight' => 4,
225 | ),
226 | 'teaser' => array(
227 | 'label' => 'above',
228 | 'settings' => array(),
229 | 'type' => 'hidden',
230 | 'weight' => 0,
231 | ),
232 | ),
233 | 'entity_type' => 'node',
234 | 'field_name' => 'field_links_relacionados',
235 | 'label' => 'Links relacionados',
236 | 'required' => 0,
237 | 'settings' => array(
238 | 'absolute_url' => 1,
239 | 'attributes' => array(
240 | 'class' => '',
241 | 'configurable_class' => 0,
242 | 'configurable_title' => 0,
243 | 'rel' => '',
244 | 'target' => 'default',
245 | 'title' => '',
246 | ),
247 | 'display' => array(
248 | 'url_cutoff' => 80,
249 | ),
250 | 'enable_tokens' => 1,
251 | 'rel_remove' => 'default',
252 | 'title' => 'optional',
253 | 'title_label_use_field_label' => 0,
254 | 'title_maxlength' => 128,
255 | 'title_value' => '',
256 | 'url' => 0,
257 | 'user_register_form' => FALSE,
258 | 'validate_url' => 1,
259 | ),
260 | 'widget' => array(
261 | 'active' => 0,
262 | 'module' => 'link',
263 | 'settings' => array(),
264 | 'type' => 'link_field',
265 | 'weight' => 7,
266 | ),
267 | );
268 |
269 | // Exported field_instance: 'node-area-field_paginas_relacionadas'
270 | $field_instances['node-area-field_paginas_relacionadas'] = array(
271 | 'bundle' => 'area',
272 | 'default_value' => NULL,
273 | 'deleted' => 0,
274 | 'description' => '',
275 | 'display' => array(
276 | 'default' => array(
277 | 'label' => 'above',
278 | 'module' => 'entityreference',
279 | 'settings' => array(
280 | 'link' => FALSE,
281 | ),
282 | 'type' => 'entityreference_label',
283 | 'weight' => 3,
284 | ),
285 | 'teaser' => array(
286 | 'label' => 'above',
287 | 'settings' => array(),
288 | 'type' => 'hidden',
289 | 'weight' => 0,
290 | ),
291 | ),
292 | 'entity_type' => 'node',
293 | 'field_name' => 'field_paginas_relacionadas',
294 | 'label' => 'Páginas relacionadas',
295 | 'required' => 0,
296 | 'settings' => array(
297 | 'user_register_form' => FALSE,
298 | ),
299 | 'widget' => array(
300 | 'active' => 1,
301 | 'module' => 'entityreference',
302 | 'settings' => array(
303 | 'match_operator' => 'CONTAINS',
304 | 'path' => '',
305 | 'size' => 60,
306 | ),
307 | 'type' => 'entityreference_autocomplete',
308 | 'weight' => 6,
309 | ),
310 | );
311 |
312 | // Exported field_instance: 'node-area-field_siglas'
313 | $field_instances['node-area-field_siglas'] = array(
314 | 'bundle' => 'area',
315 | 'default_value' => NULL,
316 | 'deleted' => 0,
317 | 'description' => '',
318 | 'display' => array(
319 | 'default' => array(
320 | 'label' => 'above',
321 | 'module' => 'text',
322 | 'settings' => array(),
323 | 'type' => 'text_default',
324 | 'weight' => 1,
325 | ),
326 | 'teaser' => array(
327 | 'label' => 'above',
328 | 'settings' => array(),
329 | 'type' => 'hidden',
330 | 'weight' => 0,
331 | ),
332 | ),
333 | 'entity_type' => 'node',
334 | 'field_name' => 'field_siglas',
335 | 'label' => 'Siglas',
336 | 'required' => 1,
337 | 'settings' => array(
338 | 'text_processing' => 0,
339 | 'user_register_form' => FALSE,
340 | ),
341 | 'widget' => array(
342 | 'active' => 1,
343 | 'module' => 'text',
344 | 'settings' => array(
345 | 'size' => 60,
346 | ),
347 | 'type' => 'text_textfield',
348 | 'weight' => 2,
349 | ),
350 | );
351 |
352 | // Translatables
353 | // Included for use with string extractors like potx.
354 | t('Body');
355 | t('Imagen destacada');
356 | t('Imágenes');
357 | t('Links relacionados');
358 | t('Páginas relacionadas');
359 | t('Siglas');
360 | t('Área superior');
361 |
362 | return $field_instances;
363 | }
364 |
--------------------------------------------------------------------------------