OSB enhancements to date
This commit is contained in:
7
modules/static_page/views/staticpage/category/list.php
Normal file
7
modules/static_page/views/staticpage/category/list.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<table width="100%" border="0">
|
||||
<?php foreach ($results as $value) {?>
|
||||
<tr>
|
||||
<td class="menu"><a href="<?echo URL::site(Request::instance()->uri(array('action'=>'view','id'=>$value->id)));?>"><?php echo $value->name?></a></td>
|
||||
</tr>
|
||||
<?}?>
|
||||
</table>
|
40
modules/static_page/views/staticpage/category/view.php
Normal file
40
modules/static_page/views/staticpage/category/view.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
if (! count($results)) {
|
||||
echo _('Sorry, no pages were found in this category, or your account is not authorized for this category.');
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($results as $record) {
|
||||
// Load the language
|
||||
$translate = $record->staticpage_translate->where('static_page_id','=',$record->id)->and_where('language_id','=','fr')->find();
|
||||
|
||||
// If there isnt a translated page, show the default language
|
||||
// @todo - default language should come from configuration
|
||||
if (! $translate->loaded())
|
||||
$translate = $record->staticpage_translate->where('static_page_id','=',$record->id)->and_where('language_id','=','en')->find();
|
||||
?>
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0">
|
||||
<tr valign="top">
|
||||
<td class="heading"><a href="<?php echo URL::site('staticpage/view/'.$record->id);?>"><?php echo $translate->title; ?></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="background-color: #FFFFFF;">
|
||||
<table width="100%" border="0" cellpadding="4">
|
||||
<tr>
|
||||
<td class="body"><?php echo $translate->body_intro; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br/>
|
||||
<?php
|
||||
}
|
||||
?>
|
32
modules/static_page/views/staticpage/view.php
Normal file
32
modules/static_page/views/staticpage/view.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
if (! $record) {
|
||||
echo _('Sorry, no pages were found in this category, or your account is not authorized for this category.');
|
||||
return;
|
||||
}
|
||||
|
||||
// Load the language
|
||||
$translate = $record->staticpage_translate->where('static_page_id','=',$record->id)->and_where('language_id','=','fr')->find();
|
||||
|
||||
// If there isnt a translated page, show the default language
|
||||
// @todo - default language should come from configuration
|
||||
if (! $translate->loaded())
|
||||
$translate = $record->staticpage_translate->where('static_page_id','=',$record->id)->and_where('language_id','=','en')->find();
|
||||
?>
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0">
|
||||
<tr>
|
||||
<td style="background-color: #FFFFFF;">
|
||||
<table width="100%" border="0" cellpadding="4">
|
||||
<tr>
|
||||
<td class="body"><?php echo $translate->body_full; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
Reference in New Issue
Block a user