Skip to content

Commit

Permalink
Merge branch 'release-1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
andersbryrup committed Aug 16, 2013
2 parents ca47e1a + ac6fec8 commit b54f4e5
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 75 deletions.
1 change: 0 additions & 1 deletion os2web_contact.info
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ features[field_instance][] = node-os2web_contact_contact-field_os2web_contact_fi
features[field_instance][] = node-os2web_contact_contact-field_os2web_contact_field_wedcl
features[field_instance][] = node-os2web_contact_contact-field_os2web_contact_field_wedop
features[field_instance][] = node-os2web_contact_contact-field_os2web_contact_field_zip
features[filter][] = os2web_contact_contact_format
features[node][] = os2web_contact_contact
features[panels_mini][] = os2web_contact_panel_sidebar
features[user_permission][] = create os2web_contact_contact content
Expand Down
4 changes: 2 additions & 2 deletions os2web_contact.make
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ core = 7.x

; Basic

projects[ctools][subdir] = "contrib"
projects[ctools][version] = "1.3"
# projects[ctools][subdir] = "contrib"
# projects[ctools][version] = "1.3"

projects[features][subdir] = "contrib"
projects[features][version] = "2.0-beta2"
Expand Down
14 changes: 11 additions & 3 deletions os2web_contact.module
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,24 @@ function os2web_contact_get_block() {
$menu = menu_get_active_trail();
while ($item = array_pop($menu)) {
$path = explode('/', $item['link_path']);
if((isset($path[1]) && $path[1] == 'add') || (isset($path[2]) && $path[2] == 'edit') ) {
continue;
}
if ($path[0] === 'taxonomy' && $path[1] === 'term') {
$ent = taxonomy_term_load($path[2]);
$field = field_get_items('taxonomy_term', $ent, 'field_os2web_base_field_contact');
}
elseif ($path[0] === 'node') {
$ent = node_load($path[1]);
$field = field_get_items('node', $ent, 'field_os2web_base_field_contact');
if (isset($path[1]) && is_numeric($path[1])) {
$ent = node_load($path[1]);
$field = field_get_items('node', $ent, 'field_os2web_base_field_contact');
}
}
else {
// Unknown entity type.. Possibly root.
$node = menu_get_object();
if($node) {
$field = field_get_items('node', $node,'field_os2web_base_field_contact');
}
}
if (isset($field[0]['nid'])) {
$result = $field[0]['nid'];
Expand Down
26 changes: 17 additions & 9 deletions os2web_contact.panels_default.inc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function os2web_contact_default_panels_mini() {
$pane->panel = 'middle';
$pane->type = 'views_panes';
$pane->subtype = 'os2web_contact_view_contact-panel_pane_1';
$pane->shown = TRUE;
$pane->shown = FALSE;
$pane->access = array();
$pane->configuration = array(
'arguments' => array(
Expand All @@ -60,17 +60,25 @@ function os2web_contact_default_panels_mini() {
$pane = new stdClass();
$pane->pid = 'new-2';
$pane->panel = 'middle';
$pane->type = 'custom';
$pane->subtype = 'custom';
$pane->type = 'views';
$pane->subtype = 'os2web_contact_view_contact';
$pane->shown = TRUE;
$pane->access = array();
$pane->configuration = array(
'admin_title' => 'Tekstblok',
'title' => '<none>',
'body' => '<p>Hej</p>
',
'format' => 'full_html',
'substitute' => TRUE,
'override_pager_settings' => 0,
'use_pager' => 0,
'nodes_per_page' => '1',
'pager_id' => '0',
'offset' => '0',
'more_link' => 0,
'feed_icons' => 0,
'panel_args' => 0,
'link_to_view' => 0,
'args' => '',
'url' => '',
'display' => 'block',
'override_title' => 0,
'override_title_text' => '',
);
$pane->cache = array();
$pane->style = array(
Expand Down
Loading

0 comments on commit b54f4e5

Please sign in to comment.