summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryanniboi2012-10-06 23:28:37 (GMT)
committer drupalpro2012-10-06 23:28:37 (GMT)
commit1e8251b1d73098c0886c77903fac2efa0685dace (patch)
tree7d8dba2ad8b692eb2632967cc21d44f2323302f8
parent4b3eedcf1ee17e7fe4f930eba003730807fb818c (diff)
Issue by yanniboi : Added panels_mini to dependencies and ctools plugin. Put panels_view.panel in includes.
-rw-r--r--includes/panels_mini/default_mini_panels/party_view.panel346
-rw-r--r--includes/panels_mini/party_install.panels_default.inc22
-rw-r--r--includes/party_install.current_search.inc52
-rw-r--r--party_install.info1
-rwxr-xr-xparty_install.profile19
5 files changed, 435 insertions, 5 deletions
diff --git a/includes/panels_mini/default_mini_panels/party_view.panel b/includes/panels_mini/default_mini_panels/party_view.panel
new file mode 100644
index 0000000..e5c7877
--- /dev/null
+++ b/includes/panels_mini/default_mini_panels/party_view.panel
@@ -0,0 +1,346 @@
+<?php
+$mini = new stdClass();
+$mini->disabled = FALSE; /* Edit this to true to make a default mini disabled initially */
+$mini->api_version = 1;
+$mini->name = 'party_view';
+$mini->category = 'Party';
+$mini->admin_title = 'Party View';
+$mini->admin_description = '';
+$mini->requiredcontexts = array(
+ 0 => array(
+ 'identifier' => 'Party',
+ 'keyword' => 'party',
+ 'name' => 'entity:party',
+ 'id' => 1,
+ ),
+ 1 => array(
+ 'identifier' => 'Party Dashboard Context',
+ 'keyword' => 'party_dashboard_context',
+ 'name' => 'party_dashboard_context',
+ 'id' => 1,
+ ),
+);
+$mini->contexts = array();
+$mini->relationships = array(
+ 2 => array(
+ 'identifier' => 'User from Party',
+ 'keyword' => 'party_user',
+ 'name' => 'user_from_party',
+ 'context' => 'requiredcontext_entity:party_1',
+ 'id' => 1,
+ ),
+);
+$display = new panels_display();
+$display->layout = 'flexible';
+$display->layout_settings = array(
+ 'items' => array(
+ 'canvas' => array(
+ 'type' => 'row',
+ 'contains' => 'column',
+ 'children' => array(
+ 0 => 'main',
+ ),
+ 'parent' => NULL,
+ ),
+ 'main' => array(
+ 'type' => 'column',
+ 'width' => 100,
+ 'width_type' => '%',
+ 'children' => array(
+ 0 => 'row-top',
+ 1 => 'row-system',
+ 2 => 'row-tabs',
+ ),
+ 'parent' => 'canvas',
+ ),
+ 'row-top' => array(
+ 'type' => 'row',
+ 'contains' => 'region',
+ 'children' => array(
+ 0 => 'left',
+ 1 => 'right',
+ ),
+ 'parent' => 'main',
+ ),
+ 'row-system' => array(
+ 'type' => 'row',
+ 'contains' => 'region',
+ 'children' => array(
+ 0 => 'system',
+ ),
+ 'parent' => 'main',
+ ),
+ 'row-tabs' => array(
+ 'type' => 'row',
+ 'contains' => 'region',
+ 'children' => array(
+ 0 => 'tabs',
+ ),
+ 'parent' => 'main',
+ ),
+ 'left' => array(
+ 'type' => 'region',
+ 'title' => 'Top Left',
+ 'width' => '60',
+ 'width_type' => '%',
+ 'parent' => 'row-top',
+ 'class' => '',
+ ),
+ 'right' => array(
+ 'type' => 'region',
+ 'title' => 'Top Right',
+ 'width' => '40',
+ 'width_type' => '%',
+ 'parent' => 'row-top',
+ 'class' => '',
+ ),
+ 'system' => array(
+ 'type' => 'region',
+ 'title' => 'System',
+ 'width' => '100',
+ 'width_type' => '%',
+ 'parent' => 'row-system',
+ 'class' => '',
+ ),
+ 'tabs' => array(
+ 'type' => 'region',
+ 'title' => 'Tabs',
+ 'width' => '100',
+ 'width_type' => '%',
+ 'parent' => 'row-tabs',
+ 'class' => '',
+ ),
+ ),
+);
+$display->panel_settings = array(
+ 'style_settings' => array(
+ 'default' => NULL,
+ 'top' => NULL,
+ 'left_above' => NULL,
+ 'right_above' => NULL,
+ 'middle' => NULL,
+ 'left_below' => NULL,
+ 'right_below' => NULL,
+ 'bottom' => NULL,
+ 'left' => NULL,
+ 'right' => NULL,
+ 'tabs' => array(
+ 'cookie' => 1,
+ ),
+ 'system' => NULL,
+ ),
+ 'middle' => array(
+ 'style' => 'tabs',
+ ),
+ 'right' => array(
+ 'style' => '-1',
+ ),
+ 'bottom' => array(
+ 'style' => 'tabs',
+ ),
+ 'tabs' => array(
+ 'style' => 'tabs',
+ ),
+);
+$display->cache = array();
+$display->title = '';
+$display->content = array();
+$display->panels = array();
+ $pane = new stdClass();
+ $pane->pid = 'new-1';
+ $pane->panel = 'left';
+ $pane->type = 'page_title';
+ $pane->subtype = 'page_title';
+ $pane->shown = TRUE;
+ $pane->access = array();
+ $pane->configuration = array(
+ 'markup' => 'h2',
+ 'class' => '',
+ 'id' => '',
+ 'override_title' => 0,
+ 'override_title_text' => '',
+ );
+ $pane->cache = array();
+ $pane->style = array(
+ 'settings' => NULL,
+ );
+ $pane->css = array();
+ $pane->extras = array();
+ $pane->position = 0;
+ $pane->locks = array();
+ $display->content['new-1'] = $pane;
+ $display->panels['left'][0] = 'new-1';
+ $pane = new stdClass();
+ $pane->pid = 'new-2';
+ $pane->panel = 'left';
+ $pane->type = 'token';
+ $pane->subtype = 'user:mail';
+ $pane->shown = TRUE;
+ $pane->access = array();
+ $pane->configuration = array(
+ 'sanitize' => 1,
+ 'context' => 'relationship_user_from_party_1',
+ 'override_title' => 1,
+ 'override_title_text' => '',
+ );
+ $pane->cache = array();
+ $pane->style = array(
+ 'settings' => NULL,
+ );
+ $pane->css = array();
+ $pane->extras = array();
+ $pane->position = 1;
+ $pane->locks = array();
+ $display->content['new-2'] = $pane;
+ $display->panels['left'][1] = 'new-2';
+ $pane = new stdClass();
+ $pane->pid = 'new-3';
+ $pane->panel = 'right';
+ $pane->type = 'token';
+ $pane->subtype = 'party:pid';
+ $pane->shown = TRUE;
+ $pane->access = array();
+ $pane->configuration = array(
+ 'sanitize' => 1,
+ 'context' => 'requiredcontext_entity:party_1',
+ 'override_title' => 1,
+ 'override_title_text' => 'ID:',
+ );
+ $pane->cache = array();
+ $pane->style = array(
+ 'settings' => NULL,
+ 'style' => 'default',
+ );
+ $pane->css = array();
+ $pane->extras = array();
+ $pane->position = 0;
+ $pane->locks = array();
+ $display->content['new-3'] = $pane;
+ $display->panels['right'][0] = 'new-3';
+ $pane = new stdClass();
+ $pane->pid = 'new-4';
+ $pane->panel = 'right';
+ $pane->type = 'token';
+ $pane->subtype = 'party:party-hat';
+ $pane->shown = TRUE;
+ $pane->access = array();
+ $pane->configuration = array(
+ 'sanitize' => 1,
+ 'context' => 'requiredcontext_entity:party_1',
+ 'override_title' => 1,
+ 'override_title_text' => '',
+ );
+ $pane->cache = array();
+ $pane->style = array(
+ 'settings' => NULL,
+ );
+ $pane->css = array();
+ $pane->extras = array();
+ $pane->position = 1;
+ $pane->locks = array();
+ $display->content['new-4'] = $pane;
+ $display->panels['right'][1] = 'new-4';
+ $pane = new stdClass();
+ $pane->pid = 'new-5';
+ $pane->panel = 'right';
+ $pane->type = 'custom';
+ $pane->subtype = 'custom';
+ $pane->shown = TRUE;
+ $pane->access = array(
+ 'plugins' => array(
+ 0 => array(
+ 'name' => 'context_exists',
+ 'settings' => array(
+ 'exists' => '1',
+ ),
+ 'context' => 'relationship_user_from_party_1',
+ 'not' => FALSE,
+ ),
+ ),
+ );
+ $pane->configuration = array(
+ 'admin_title' => 'View Dashboard Link',
+ 'title' => '',
+ 'body' => '<a href="%party_user:url" target="_blank">View User Dashboard</a>',
+ 'format' => 'php_code',
+ 'substitute' => 1,
+ );
+ $pane->cache = array();
+ $pane->style = array(
+ 'settings' => NULL,
+ );
+ $pane->css = array();
+ $pane->extras = array();
+ $pane->position = 2;
+ $pane->locks = array();
+ $display->content['new-5'] = $pane;
+ $display->panels['right'][2] = 'new-5';
+ $pane = new stdClass();
+ $pane->pid = 'new-6';
+ $pane->panel = 'system';
+ $pane->type = 'page_messages';
+ $pane->subtype = 'page_messages';
+ $pane->shown = TRUE;
+ $pane->access = array();
+ $pane->configuration = array();
+ $pane->cache = array();
+ $pane->style = array(
+ 'settings' => NULL,
+ );
+ $pane->css = array();
+ $pane->extras = array();
+ $pane->position = 0;
+ $pane->locks = array();
+ $display->content['new-6'] = $pane;
+ $display->panels['system'][0] = 'new-6';
+ $pane = new stdClass();
+ $pane->pid = 'new-7';
+ $pane->panel = 'tabs';
+ $pane->type = 'entity_view';
+ $pane->subtype = 'party';
+ $pane->shown = TRUE;
+ $pane->access = array();
+ $pane->configuration = array(
+ 'view_mode' => 'full',
+ 'context' => 'requiredcontext_entity:party_1',
+ 'override_title' => 1,
+ 'override_title_text' => 'View',
+ );
+ $pane->cache = array();
+ $pane->style = array(
+ 'settings' => NULL,
+ );
+ $pane->css = array();
+ $pane->extras = array();
+ $pane->position = 0;
+ $pane->locks = array();
+ $display->content['new-7'] = $pane;
+ $display->panels['tabs'][0] = 'new-7';
+ $pane = new stdClass();
+ $pane->pid = 'new-8';
+ $pane->panel = 'tabs';
+ $pane->type = 'party_edit_form';
+ $pane->subtype = 'party_edit_form';
+ $pane->shown = TRUE;
+ $pane->access = array();
+ $pane->configuration = array(
+ 'context' => 'requiredcontext_entity:party_1',
+ 'override_title' => 1,
+ 'override_title_text' => 'Edit',
+ 'form_build_id' => 'form-I3nKIDnYwP47Gx3ijo7kmSRk2S8lDbZRsNGBOIQwdRU',
+ 'form_token' => '_K2ojUpxisvG1JN6-Jf-1wnBSB_FWcIZtBCSCn8PtW0',
+ 'form_id' => 'party_edit_form_edit_form',
+ );
+ $pane->cache = array();
+ $pane->style = array(
+ 'settings' => NULL,
+ );
+ $pane->css = array();
+ $pane->extras = array();
+ $pane->position = 1;
+ $pane->locks = array();
+ $display->content['new-8'] = $pane;
+ $display->panels['tabs'][1] = 'new-8';
+$display->hide_title = PANELS_TITLE_FIXED;
+$display->title_pane = '0';
+$mini->display = $display;
diff --git a/includes/panels_mini/party_install.panels_default.inc b/includes/panels_mini/party_install.panels_default.inc
new file mode 100644
index 0000000..a613ea2
--- /dev/null
+++ b/includes/panels_mini/party_install.panels_default.inc
@@ -0,0 +1,22 @@
+<?php
+/**
+ * @file
+ * party_install_example.panels_default.inc
+ */
+
+/**
+ * Implements hook_default_panels_mini().
+ */
+function party_install_example_default_panels_mini() {
+ $export = array();
+
+ // Scan directory for any .panel files
+ $files = file_scan_directory(dirname(__FILE__) . '/default_mini_panels', '/\.panel$/', array('key' => 'name'));
+ foreach ($files as $file) {
+ if ((include $file->uri) == 1) {
+ $export[$mini->name] = $mini;
+ }
+ }
+
+ return $export;
+}
diff --git a/includes/party_install.current_search.inc b/includes/party_install.current_search.inc
new file mode 100644
index 0000000..87374e8
--- /dev/null
+++ b/includes/party_install.current_search.inc
@@ -0,0 +1,52 @@
+<?php
+
+/**
+ * @file
+ * Current Search default hooks.
+ */
+
+/**
+ * Implements hook_current_search_default_items().
+ */
+function party_dashboard_example_current_search_default_items() {
+ $items = array();
+
+ $item = new stdClass();
+ $item->disabled = FALSE; /* Edit this to true to make a default item disabled initially */
+ $item->api_version = 1;
+ $item->name = 'party_dashboard';
+ $item->label = 'Party Dashboard';
+ $item->settings = array(
+ 'items' => array(
+ 'results' => array(
+ 'id' => 'text',
+ 'label' => 'Results',
+ 'text' => 'One match found',
+ 'plural' => 1,
+ 'text_plural' => 'Showing results [facetapi_results:start-count] to [facetapi_results:end-count] of [facetapi_results:result-count]',
+ 'plural_condition' => 'facetapi_results:result-count',
+ 'wrapper' => 1,
+ 'element' => 'em',
+ 'css' => 1,
+ 'classes' => 'current-search-item-counts',
+ 'weight' => '-50',
+ ),
+ 'active_items' => array(
+ 'id' => 'active',
+ 'label' => 'Active items',
+ 'pattern' => '[facetapi_active:active-value]',
+ 'keys' => 1,
+ 'css' => 0,
+ 'classes' => '',
+ 'nofollow' => 1,
+ 'weight' => '-49',
+ ),
+ ),
+ 'advanced' => array(
+ 'empty_searches' => 0,
+ ),
+ );
+ $items[$item->name] = $item;
+
+ return $items;
+}
diff --git a/party_install.info b/party_install.info
index 94847ba..9f4edec 100644
--- a/party_install.info
+++ b/party_install.info
@@ -35,6 +35,7 @@ dependencies[] = party_hat
; Party - Contrib
dependencies[] = ctools
dependencies[] = panels
+dependencies[] = panels_mini
dependencies[] = page_manager
dependencies[] = entity
dependencies[] = views
diff --git a/party_install.profile b/party_install.profile
index ba425db..ce908d8 100755
--- a/party_install.profile
+++ b/party_install.profile
@@ -22,7 +22,7 @@ function party_install_form_install_configure_form_alter(&$form, &$form_state, $
$form['admin_account']['account']['name']['#default_value'] = 'admin';
// What is the default value for London?
$form['server_settings']['site_default_country']['#default_value'] = 'GB';
- $form['server_settings']['date_default_timezone']['#default_value'] = 'Europe/London'; // The Party happens in the North West though!!
+ $form['server_settings']['date_default_timezone']['#default_value'] = 'Europe/London'; // The Party happens in the North West though!!
}
@@ -60,8 +60,8 @@ function party_install_party_generate_form($form, &$form_state, &$install_state)
$form['actions'] = array('#type' => 'actions');
$form['actions']['submit'] = array(
- '#type' => 'submit',
- '#value' => st('Save and continue'),
+ '#type' => 'submit',
+ '#value' => st('Save and continue'),
'#weight' => 15,
);
@@ -77,7 +77,7 @@ function party_install_party_generate_form_validate($form, &$form_state) {
elseif ($form_state['values']['entry'] <= 0) {
form_error($form['entry'], 'Field must be a postitive number!');
}
-
+
}
function party_install_party_generate_form_submit($form, &$form_state) {
@@ -282,7 +282,16 @@ function party_install_ctools_plugin_api($owner, $plugin) {
);
}
if ($owner == 'panels_mini' && $plugin == 'panels_default') {
- return array('version' => 1);
+ return array(
+ 'version' => 1,
+ 'path' => drupal_get_path('profile', 'party_install') . '/includes/panels_mini',
+ );
+ }
+ if ($owner == 'current_search' && $plugin == 'current_search') {
+ return array(
+ 'version' => 1,
+ 'path' => drupal_get_path('profile', 'party_install') . '/includes',
+ );
}
}