diff options
Diffstat (limited to 'h-source/Application')
-rw-r--r-- | h-source/Application/Controllers/BaseController.php | 8 | ||||
-rw-r--r-- | h-source/Application/Include/languages.php | 3 | ||||
-rw-r--r-- | h-source/Application/Views/Last/modifications.php | 2 | ||||
-rw-r--r-- | h-source/Application/Views/header.php | 6 | ||||
-rw-r--r-- | h-source/Application/Views/right.php | 18 |
5 files changed, 32 insertions, 5 deletions
diff --git a/h-source/Application/Controllers/BaseController.php b/h-source/Application/Controllers/BaseController.php index db85405..7eb4236 100644 --- a/h-source/Application/Controllers/BaseController.php +++ b/h-source/Application/Controllers/BaseController.php @@ -46,6 +46,7 @@ class BaseController extends Controller header("Cache-Control: no-cache"); $this->model('BoxesModel'); + $this->model('HistoryModel'); $this->load('header'); $this->load('footer','last'); @@ -116,7 +117,12 @@ class BaseController extends Controller $data['language_links'] = $this->buildLanguageLinks($this->lang); -// print_r($this->_queryString); + $data['lastModif'] = $this->m['HistoryModel'] + ->select() + ->where(array('type'=>'wiki','gr'=>'registered')) + ->orderBy('id_history desc') + ->limit(5) + ->send(); $this->append($data); $this->load('right'); diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php index 40014b0..9b0d9ab 100644 --- a/h-source/Application/Include/languages.php +++ b/h-source/Application/Include/languages.php @@ -173,6 +173,8 @@ class Lang "has been inserted by" => "è stato inserito da", "has been updated by" => "è stato modificato da", "at" => "alle ore", + "last modifications" => "ultime modifiche", + "watch all modifications" => "guarda tutte le modifiche", ), 'es' => array ( @@ -474,6 +476,7 @@ class Go $urls = getUrlsFromIdHard($clean['idHard']); return $urls['urlView']; } + } class MyStrings diff --git a/h-source/Application/Views/Last/modifications.php b/h-source/Application/Views/Last/modifications.php index 1c8e8ea..8683615 100644 --- a/h-source/Application/Views/Last/modifications.php +++ b/h-source/Application/Views/Last/modifications.php @@ -32,8 +32,6 @@ <div class="notebooks_viewall"> <ul class="page_history"> - <?php $hw = new HardwareModel(); ?> - <?php $translations = array('insert'=>'inserted','update'=>'updated');?> <?php foreach ($table as $row) { ?> <li class="page_history_item"><?php echo gtext('the model');?> <a href="<?php echo Go::toHardwarePage($row['history']['id']);?>"><?php echo $hw->getTheModelName($row['history']['id']);?></a> <?php echo gtext('has been '.$translations[$row['history']['action']].' by');?> <?php echo getLinkToUser($u->getUser($row['history']['created_by']))?> <?php echo gtext('at');?> <?php echo smartDate($row['history']['creation_date']);?></li> <?php } ?> diff --git a/h-source/Application/Views/header.php b/h-source/Application/Views/header.php index 6b20ccc..0c7a256 100644 --- a/h-source/Application/Views/header.php +++ b/h-source/Application/Views/header.php @@ -20,7 +20,11 @@ // You should have received a copy of the GNU General Public License // along with h-source. If not, see <http://www.gnu.org/licenses/>. ?> -<?php $u = new UsersModel();?> +<?php +$u = new UsersModel(); +$hw = new HardwareModel(); +$translations = array('insert'=>'inserted','update'=>'updated'); +?> <head> <title><?php echo $title;?></title> diff --git a/h-source/Application/Views/right.php b/h-source/Application/Views/right.php index 9684dc3..bc97fba 100644 --- a/h-source/Application/Views/right.php +++ b/h-source/Application/Views/right.php @@ -81,7 +81,7 @@ <?php } ?> </div> - + <div class="discover_hardware"> <a href="<?php echo $this->baseUrl."/help/index/$lang#discover-hardware";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/discover.png"></a> </div> @@ -89,6 +89,22 @@ <div class="download_database"> <a href="<?php echo $this->baseUrl."/download/index/$lang";?>"><img src="<?php echo $this->baseUrl;?>/Public/Img/download.png"></a> </div> + + <div class="last_modifications"> + <div class="last_modifications_title"> + <?php echo gtext('last modifications');?> + </div> + <ul> + <?php foreach ($lastModif as $row) { ?> + <li><a class="last_modifications_model" href="<?php echo Go::toHardwarePage($row['history']['id']);?>"><?php echo $hw->getTheModelName($row['history']['id']);?></a> <?php echo gtext('by');?> <?php echo getLinkToUser($u->getUser($row['history']['created_by']))?></li> + <?php } ?> + </ul> + <div class="last_modifications_all"> + <span> + <a href="<?php echo $this->baseUrl."/last/modifications/$lang";?>"><?php echo gtext('watch all modifications');?></a> + </span> + </div> + </div> <div class="statistics_ext_box"> <div class="statistics_int_title"> |