Openstack theme footer block
Add openstack.org like footer block to public pages. Change-Id: Ie8f5d60f2efc19beb647d6c4a2499d8b716cd725
This commit is contained in:
parent
993414fa85
commit
2809cc1717
@ -115,3 +115,4 @@ dependencies[] = field_group_location
|
||||
dependencies[] = groups_groups
|
||||
dependencies[] = groups_language_switcher
|
||||
dependencies[] = groups_directory
|
||||
dependencies[] = groups_footer
|
||||
|
6
modules/groups/groups_footer/groups_footer.info
Normal file
6
modules/groups/groups_footer/groups_footer.info
Normal file
@ -0,0 +1,6 @@
|
||||
name = Groups footer
|
||||
description = Openstack.org footer template
|
||||
core = 7.x
|
||||
package = groups
|
||||
version = 7.x-1.0
|
||||
project = groups_footer
|
52
modules/groups/groups_footer/groups_footer.install
Normal file
52
modules/groups/groups_footer/groups_footer.install
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Groups footer install script.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_install().
|
||||
*/
|
||||
function groups_footer_install() {
|
||||
cache_clear_all('*', 'cache_block', TRUE);
|
||||
// Place site blocks in the footer region.
|
||||
$footer_block = array(
|
||||
'module' => 'groups_footer',
|
||||
'delta' => 'groups_footer',
|
||||
'theme' => 'openstack',
|
||||
'visibility' => 0,
|
||||
'region' => 'footer',
|
||||
'status' => 0,
|
||||
'pages' => '0',
|
||||
'cache' => DRUPAL_CACHE_GLOBAL,
|
||||
'title' => '<none>',
|
||||
);
|
||||
drupal_write_record('block', $footer_block);
|
||||
|
||||
// need to update the block because region and status is missing
|
||||
db_update('block')
|
||||
->fields(array(
|
||||
'cache' => DRUPAL_CACHE_GLOBAL,
|
||||
'region' => 'footer',
|
||||
'status' => 1,
|
||||
'title' => '<none>',
|
||||
))
|
||||
->condition('delta', 'groups_footer')
|
||||
->condition('module', 'groups_footer')
|
||||
->condition('theme', 'openstack')
|
||||
->execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_uninstall()
|
||||
*
|
||||
* Remove footer block
|
||||
*/
|
||||
|
||||
function groups_footer_uninstall() {
|
||||
db_delete('block')
|
||||
->condition('delta', 'groups_footer')
|
||||
->condition('module', 'groups_footer')
|
||||
->condition('theme', 'openstack')
|
||||
->execute();
|
||||
}
|
37
modules/groups/groups_footer/groups_footer.module
Normal file
37
modules/groups/groups_footer/groups_footer.module
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Implements hook_block_info().
|
||||
*/
|
||||
function groups_footer_block_info() {
|
||||
$blocks['groups_footer'] = array(
|
||||
'info' => t('Groups footer'),
|
||||
'visibility' => 0,
|
||||
'status' => 1,
|
||||
'pages' => 0,
|
||||
'weight' => 1,
|
||||
);
|
||||
return $blocks;
|
||||
}
|
||||
|
||||
function groups_footer_theme() {
|
||||
$module_path = drupal_get_path('module', 'groups_footer');
|
||||
$base = array(
|
||||
'path' => "$module_path/templates",
|
||||
);
|
||||
return array(
|
||||
'groups_footer' => $base + array(
|
||||
'template' => 'groups_footer',
|
||||
'variables' => array('items' => NULL,),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_block_view().
|
||||
*/
|
||||
function groups_footer_block_view() {
|
||||
$block['subject'] = '';
|
||||
$block['content'] = theme('groups_footer');
|
||||
return $block;
|
||||
}
|
48
modules/groups/groups_footer/templates/groups_footer.tpl.php
Normal file
48
modules/groups/groups_footer/templates/groups_footer.tpl.php
Normal file
@ -0,0 +1,48 @@
|
||||
<hr>
|
||||
<div class="span-8">
|
||||
<h3>My Feedback About This Page</h3>
|
||||
<form enctype="application/x-www-form-urlencoded" method="post" action="/software/FeedbackForm" id="FeedbackForm_FeedbackForm">
|
||||
<textarea cols="20" rows="5" name="Content" id="FeedbackForm_FeedbackForm_Content"></textarea>
|
||||
<input type="submit" title="Tell Us" value="Tell Us" name="action_submitFeedback" id="FeedbackForm_FeedbackForm_action_submitFeedback" class="action button">
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div class="span-4">
|
||||
<h3>OpenStack</h3>
|
||||
<ul>
|
||||
<li><a href="http://openstack.org/projects/">Projects</a></li>
|
||||
<li><a href="http://openstack.org/openstack-security/">OpenStack Security</a></li>
|
||||
<li><a href="http://openstack.org/projects/openstack-faq/">Common Questions</a></li>
|
||||
<li><a href="http://openstack.org/blog/">Blog</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="span-4">
|
||||
<h3>Community</h3>
|
||||
<ul>
|
||||
<li><a href="http://openstack.org/community/">User Groups</a></li>
|
||||
<li><a href="http://openstack.org/events/">Events</a></li>
|
||||
<li><a href="http://openstack.org/jobs/">Jobs</a></li>
|
||||
<li><a href="http://openstack.org/companies/">Companies</a></li>
|
||||
<li><a href="http://wiki.openstack.org/HowToContribute">Contribute</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="span-4">
|
||||
<h3>Documentation</h3>
|
||||
<ul>
|
||||
<li><a href="http://docs.openstack.org/">OpenStack Manuals</a></li>
|
||||
<li><a href="http://www.openstack.org/software/start/">Getting Started</a></li>
|
||||
<li><a href="http://api.openstack.org/">API Documentation</a></li>
|
||||
<li><a href="http://wiki.openstack.org/">Wiki</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="span-4 last">
|
||||
<h3>Branding & Legal</h3>
|
||||
<ul>
|
||||
<li><a href="http://openstack.org/brand/">Logos & Guidelines</a></li>
|
||||
<li><a href="http://openstack.org/brand/openstack-trademark-policy/">Trademark Policy</a></li>
|
||||
<li><a href="http://openstack.org/privacy/">Privacy Policy</a></li>
|
||||
<li><a href="http://wiki.openstack.org/CLA">OpenStack CLA</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr>
|
||||
<p>The OpenStack project is provided under the Apache 2.0 license. Openstack.org is powered by <a href="http://www.rackspacecloud.com/">Rackspace Cloud Computing</a>.</p>
|
Loading…
x
Reference in New Issue
Block a user