aboutsummaryrefslogtreecommitdiff
path: root/h-source
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-02-13 17:30:05 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-02-13 17:30:05 +0000
commit323d1b376423f09d758b381defcf37b26d582a7a (patch)
tree22133b03bf9bc1712a940278da4ad9f91a7712a2 /h-source
parent26fca82d7f500d9771b8876e9a480f8619a2988d (diff)
improved history
Diffstat (limited to 'h-source')
-rw-r--r--h-source/Application/Controllers/BaseController.php8
-rw-r--r--h-source/Application/Include/languages.php3
-rw-r--r--h-source/Application/Views/Last/modifications.php2
-rw-r--r--h-source/Application/Views/header.php6
-rw-r--r--h-source/Application/Views/right.php18
-rw-r--r--h-source/Public/Css/explorer6.css5
-rw-r--r--h-source/Public/Css/explorer7.css5
-rwxr-xr-xh-source/Public/Css/website.css44
-rw-r--r--h-source/Public/Img/back_last.pngbin0 -> 2576 bytes
9 files changed, 86 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">
diff --git a/h-source/Public/Css/explorer6.css b/h-source/Public/Css/explorer6.css
index dcdc4b0..c4bacc8 100644
--- a/h-source/Public/Css/explorer6.css
+++ b/h-source/Public/Css/explorer6.css
@@ -100,4 +100,9 @@ ul#menuBlock li ul {
.language_links_box a.current_lang
{
background:#6495ED;
+}
+
+.last_modifications ul
+{
+ margin-left:0px;
} \ No newline at end of file
diff --git a/h-source/Public/Css/explorer7.css b/h-source/Public/Css/explorer7.css
index 11c9f02..4060474 100644
--- a/h-source/Public/Css/explorer7.css
+++ b/h-source/Public/Css/explorer7.css
@@ -9,4 +9,9 @@
.language_links_box a.current_lang
{
background:#6495ED;
+}
+
+.last_modifications ul
+{
+ margin-left:0px;
} \ No newline at end of file
diff --git a/h-source/Public/Css/website.css b/h-source/Public/Css/website.css
index def10fa..e3960ba 100755
--- a/h-source/Public/Css/website.css
+++ b/h-source/Public/Css/website.css
@@ -1614,4 +1614,48 @@ td.text_item_date
{
text-decoration:none;
font:normal 16px/1 sans-serif;
+}
+
+.last_modifications
+{
+ margin:5px;
+ width:190px;
+/* background:red; */
+ margin-bottom:2em;
+ background: url(../Img/back_last.png) no-repeat top left;
+}
+.last_modifications ul
+{
+ padding:8px;
+ padding-top:0px;
+}
+.last_modifications li
+{
+ list-style-type:none;
+ margin:10px 5px;
+}
+.last_modifications_title
+{
+ padding-top:10px;
+ padding-left:14px;
+ font:bold 15px/1 sans-serif;
+}
+.last_modifications a
+{
+
+}
+.last_modifications_model
+{
+ color:#3e3e3e;
+ text-decoration:none;
+}
+.last_modifications_all
+{
+ background: url(../Img/back_last.png) no-repeat bottom left;
+ padding-bottom:10px;
+}
+.last_modifications_all span
+{
+ margin-left:10px;
+ font:normal 14px/1 sans-serif;
} \ No newline at end of file
diff --git a/h-source/Public/Img/back_last.png b/h-source/Public/Img/back_last.png
new file mode 100644
index 0000000..6411e49
--- /dev/null
+++ b/h-source/Public/Img/back_last.png
Binary files differ