-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#247] Added templating for front page based on roles.
- Loading branch information
r00ster
committed
May 4, 2015
1 parent
6b4f70a
commit 2f2b2a0
Showing
3 changed files
with
167 additions
and
88 deletions.
There are no files selected for viewing
90 changes: 90 additions & 0 deletions
90
docroot/profiles/unallocated/themes/unallocated/templates/front-page-anonymous.tpl.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<?php | ||
//Container Declaration, for easy adjustment. Change details here, not in main file. | ||
|
||
$third = '"one-third columns"'; | ||
$fullWidth = '"sixteen columns"'; | ||
$fullWidthNav = '"nav sixteen columns"'; | ||
$ColumnAWidth = '"five columns alpha"'; | ||
$ColumnBWidth = '"eleven columns omega"'; | ||
$ColumnBottomWidth ='"four columns"'; | ||
|
||
|
||
//die('<pre>'.print_r(array_keys($page), TRUE).'</pre>'); | ||
|
||
|
||
?> | ||
|
||
<div id= 'top_zone'> | ||
<div class= 'container'> | ||
<?php if ($logo): ?> | ||
<a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo"> | ||
<img id="logoImg" src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" /> | ||
</a> | ||
<?php endif; ?> | ||
|
||
</div> | ||
<div class= 'nav container'> | ||
<?php print render($page['main_nav']); ?> | ||
</div> | ||
</div> | ||
|
||
<div id='core' class="<?php print $fullWidth; ?>"> | ||
<div class="container"> | ||
|
||
<div id="front-page-main" class="twelve columns alpha"><?php print render($page['front_slideshow']); ?></div> | ||
<div class="four columns omega" style="border: 1px solid green"><?php print render($page['front_slideshow_sidebar']); ?></div> | ||
|
||
</div> | ||
</div> | ||
|
||
<div id="first-break" class="sixteen columns"> | ||
<div class="container"> | ||
<div id="first-break-main" class="sixteen columns"><?php print render($page['first_break']); ?></div> | ||
</div> | ||
</div> | ||
|
||
<div id="second-break" class="sixteen columns"> | ||
<div class="container"> | ||
<div id="second-break-main" class="sixteen columns"><?php print render($page['second_break']); ?></div> | ||
</div> | ||
</div> | ||
|
||
<div id="front-page-secondary" class="sixteen columns"> | ||
<div class="container"> | ||
<div id="front-page-secondary-left" class="eight columns alpha"><?php print render($page['front_second_left']); ?></div> | ||
<div id="front-page-secondary-right" class="eight columns omega"><?php print render($page['front_second_right']); ?></div> | ||
</div> | ||
</div> | ||
|
||
<div id="third-break" class="sixteen columns"> | ||
<div class="container"> | ||
<div id="third-break-main" class="sixteen columns"><?php print render($page['third_break']); ?></div> | ||
</div> | ||
</div> | ||
|
||
<div id= 'bottom_zone'> | ||
<div class= 'container'> | ||
|
||
<div class="<?php print $ColumnBottomWidth; ?>"> | ||
<div id='boxes-box-uas_address_box'> | ||
</div> | ||
</div> | ||
|
||
|
||
<div class="<?php print $ColumnBottomWidth; ?>"> | ||
<?php print render($page['postscript_first']); ?> | ||
</div> | ||
|
||
|
||
<div class="<?php print $ColumnBottomWidth; ?>"> | ||
<?php print render($page['post_postscript']); ?> | ||
</div> | ||
|
||
|
||
<div class="<?php print $ColumnBottomWidth; ?>"> | ||
<?php print render($page['post_post_postscript']); ?> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
72 changes: 72 additions & 0 deletions
72
docroot/profiles/unallocated/themes/unallocated/templates/front-page-authenticated.tpl.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?php | ||
//Container Declaration, for easy adjustment. Change details here, not in main file. | ||
|
||
$third = '"one-third columns"'; | ||
$fullWidth = '"sixteen columns"'; | ||
$fullWidthNav = '"nav sixteen columns"'; | ||
$ColumnAWidth = '"five columns alpha"'; | ||
$ColumnBWidth = '"eleven columns omega"'; | ||
$ColumnBottomWidth ='"four columns"'; | ||
|
||
?> | ||
|
||
<div id= 'top_zone'> | ||
<div class= 'container'> | ||
<?php if ($logo): ?> | ||
<a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo"> | ||
<img id="logoImg" src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" /> | ||
</a> | ||
<?php endif; ?> | ||
|
||
</div> | ||
<div class= 'nav container'> | ||
<?php print render($page['main_nav']); ?> | ||
</div> | ||
</div> | ||
|
||
<div id='core' class="<?php print $fullWidth; ?>"> | ||
<div class="container"> | ||
<div id="front-core-left" class="eight columns"><?php print render($page['front_core_left']); ?></div> | ||
<div id="front-core-right" class="eight columns"><?php print render($page['front_core_right']); ?></div> | ||
</div> | ||
</div> | ||
|
||
<div id="dashboard-groups" class="sixteen columns"> | ||
<div class="container"> | ||
<div id="dashboard-groups-left" class="eight columns"><?php print render($page['dashboard_groups_left']); ?></div> | ||
<div id="dashboard-groups-right" class="eight columns"><?php print render($page['dashboard_groups_right']); ?></div> | ||
</div> | ||
</div> | ||
|
||
<div id="dashboard-projects" class="sixteen columns"> | ||
<div class="container"> | ||
<div id="dashboard-projects-left" class="eight columns"><?php print render($page['dashboard_projects_left']); ?></div> | ||
<div id="dashboard-projects-right" class="eight columns"><?php print render($page['dashboard_projects_right']); ?></div> | ||
</div> | ||
</div> | ||
|
||
<div id= 'bottom_zone'> | ||
<div class= 'container'> | ||
|
||
<div class="<?php print $ColumnBottomWidth; ?>"> | ||
<div id='boxes-box-uas_address_box'> | ||
</div> | ||
</div> | ||
|
||
|
||
<div class="<?php print $ColumnBottomWidth; ?>"> | ||
<?php print render($page['postscript_first']); ?> | ||
</div> | ||
|
||
|
||
<div class="<?php print $ColumnBottomWidth; ?>"> | ||
<?php print render($page['post_postscript']); ?> | ||
</div> | ||
|
||
|
||
<div class="<?php print $ColumnBottomWidth; ?>"> | ||
<?php print render($page['post_post_postscript']); ?> | ||
</div> | ||
|
||
</div> | ||
</div> |
93 changes: 5 additions & 88 deletions
93
docroot/profiles/unallocated/themes/unallocated/templates/page--front.tpl.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,7 @@ | ||
<?php | ||
//Container Declaration, for easy adjustment. Change details here, not in main file. | ||
|
||
$third = '"one-third columns"'; | ||
$fullWidth = '"sixteen columns"'; | ||
$fullWidthNav = '"nav sixteen columns"'; | ||
$ColumnAWidth = '"five columns alpha"'; | ||
$ColumnBWidth = '"eleven columns omega"'; | ||
$ColumnBottomWidth ='"four columns"'; | ||
|
||
|
||
//die('<pre>'.print_r(array_keys($page), TRUE).'</pre>'); | ||
|
||
|
||
?> | ||
|
||
<div id= 'top_zone'> | ||
<div class= 'container'> | ||
<?php if ($logo): ?> | ||
<a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo"> | ||
<img id="logoImg" src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" /> | ||
</a> | ||
<?php endif; ?> | ||
|
||
</div> | ||
<div class= 'nav container'> | ||
<?php print render($page['main_nav']); ?> | ||
</div> | ||
</div> | ||
|
||
<div id='core' class="<?php print $fullWidth; ?>"> | ||
<div class="container"> | ||
|
||
<div id="front-page-main" class="twelve columns alpha"><?php print render($page['front_slideshow']); ?></div> | ||
<div class="four columns omega" style="border: 1px solid green"><?php print render($page['front_slideshow_sidebar']); ?></div> | ||
|
||
</div> | ||
</div> | ||
|
||
<div id="first-break" class="sixteen columns"> | ||
<div class="container"> | ||
<div id="first-break-main" class="sixteen columns"><?php print render($page['first_break']); ?></div> | ||
</div> | ||
</div> | ||
|
||
<div id="second-break" class="sixteen columns"> | ||
<div class="container"> | ||
<div id="second-break-main" class="sixteen columns"><?php print render($page['second_break']); ?></div> | ||
</div> | ||
</div> | ||
|
||
<div id="front-page-secondary" class="sixteen columns"> | ||
<div class="container"> | ||
<div id="front-page-secondary-left" class="eight columns alpha"><?php print render($page['front_second_left']); ?></div> | ||
<div id="front-page-secondary-right" class="eight columns omega"><?php print render($page['front_second_right']); ?></div> | ||
</div> | ||
</div> | ||
|
||
<div id="third-break" class="sixteen columns"> | ||
<div class="container"> | ||
<div id="third-break-main" class="sixteen columns"><?php print render($page['third_break']); ?></div> | ||
</div> | ||
</div> | ||
|
||
<div id= 'bottom_zone'> | ||
<div class= 'container'> | ||
|
||
<div class="<?php print $ColumnBottomWidth; ?>"> | ||
<div id='boxes-box-uas_address_box'> | ||
</div> | ||
</div> | ||
|
||
|
||
<div class="<?php print $ColumnBottomWidth; ?>"> | ||
<?php print render($page['postscript_first']); ?> | ||
</div> | ||
|
||
|
||
<div class="<?php print $ColumnBottomWidth; ?>"> | ||
<?php print render($page['post_postscript']); ?> | ||
</div> | ||
|
||
|
||
<div class="<?php print $ColumnBottomWidth; ?>"> | ||
<?php print render($page['post_post_postscript']); ?> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
if(in_array('authenticated user', $user->roles)) { | ||
include_once("front-page-authenticated.tpl.php"); | ||
} else { | ||
include_once("front-page-anonymous.tpl.php"); | ||
} |