[vhffs-dev] [1048] History dates are now more understandable.

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1048
Author:   beuss
Date:     2007-10-29 21:39:17 +0000 (Mon, 29 Oct 2007)

Log Message:
-----------
History dates are now more understandable.

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Panel/Object.pm
    trunk/vhffs-panel/admin/object/edit.pl
    trunk/vhffs-panel/group/history.pl
    trunk/vhffs-panel/history.pl
    trunk/vhffs-panel/templates/group/history.tmpl
    trunk/vhffs-panel/templates/group/history_part.tmpl
    trunk/vhffs-panel/templates/misc/history.tmpl
    trunk/vhffs-panel/themes/vhffs/main.css


Modified: trunk/vhffs-api/src/Vhffs/Panel/Object.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Object.pm	2007-10-29 21:02:35 UTC (rev 1047)
+++ trunk/vhffs-api/src/Vhffs/Panel/Object.pm	2007-10-29 21:39:17 UTC (rev 1048)
@@ -208,8 +208,8 @@
         use DateTime::Locale;
         my $loc = DateTime::Locale->load($user->get_lang);
         foreach (@{$history}) {
-            my $dt = DateTime->from_epoch( epoch => $_->{date});
-            $history_tmpl->param( DATE => $dt->strftime($loc->short_date_format().' %H:%M' ));
+            my $dt = DateTime->from_epoch( epoch => $_->{date}, locale => $user->get_lang);
+            $history_tmpl->param( DATE => $dt->strftime($loc->medium_date_format().' '.$loc->full_time_format() ) );
             $history_tmpl->param( EVENT => $_->{message} );
             $output .= $history_tmpl->output;
         }

Modified: trunk/vhffs-panel/admin/object/edit.pl
===================================================================
--- trunk/vhffs-panel/admin/object/edit.pl	2007-10-29 21:02:35 UTC (rev 1047)
+++ trunk/vhffs-panel/admin/object/edit.pl	2007-10-29 21:39:17 UTC (rev 1048)
@@ -209,8 +209,8 @@
         use DateTime::Locale;
         my $loc = DateTime::Locale->load($user->get_lang);
         foreach (@{$history}) {
-            my $dt = DateTime->from_epoch( epoch => $_->{date});
-            $history_tmpl->param( DATE => $dt->strftime($loc->short_date_format().' %H:%M' ));
+            my $dt = DateTime->from_epoch( epoch => $_->{date}, locale => $user->get_lang);
+            $history_tmpl->param( DATE => $dt->strftime($loc->medium_date_format().' '.$loc->full_time_format()) );
             $history_tmpl->param( EVENT => $_->{message} );
             $output .= $history_tmpl->output;
         }

Modified: trunk/vhffs-panel/group/history.pl
===================================================================
--- trunk/vhffs-panel/group/history.pl	2007-10-29 21:02:35 UTC (rev 1047)
+++ trunk/vhffs-panel/group/history.pl	2007-10-29 21:39:17 UTC (rev 1048)
@@ -88,8 +88,9 @@
         use DateTime::Locale;
         my $loc = DateTime::Locale->load($user->get_lang);
         foreach (@{$history}) {
-            my $dt = DateTime->from_epoch( epoch => $_->{date});
-            $history_tmpl->param( DATE => $dt->strftime($loc->short_date_format().' %H:%M' ));
+            my $dt = DateTime->from_epoch( epoch => $_->{date}, locale => $user->get_lang);
+            $history_tmpl->param( DATE => $dt->strftime($loc->medium_date_format() ) );
+            $history_tmpl->param( TIME => $dt->strftime($loc->full_time_format() )  );
             $history_tmpl->param( TYPE => Vhffs::Functions::type_string_from_type_id( $_->{type} ) );
             my $object = Vhffs::ObjectFactory::fetch_object( $vhffs , $_->{object_id} );
             $history_tmpl->param( NAME => $object->get_label );

Modified: trunk/vhffs-panel/history.pl
===================================================================
--- trunk/vhffs-panel/history.pl	2007-10-29 21:02:35 UTC (rev 1047)
+++ trunk/vhffs-panel/history.pl	2007-10-29 21:39:17 UTC (rev 1048)
@@ -111,8 +111,8 @@
         use DateTime::Locale;
         my $loc = DateTime::Locale->load($user->get_lang);
         foreach (@{$history}) {
-            my $dt = DateTime->from_epoch( epoch => $_->{date});
-            $history_tmpl->param( DATE => $dt->strftime($loc->short_date_format().' %H:%M' ));
+            my $dt = DateTime->from_epoch( epoch => $_->{date}, locale => $user->get_lang);
+            $history_tmpl->param( DATE => $dt->strftime($loc->medium_date_format().' '.$loc->full_time_format()));
             $history_tmpl->param( EVENT => $_->{message} );
             $output .= $history_tmpl->output;
         }

Modified: trunk/vhffs-panel/templates/group/history.tmpl
===================================================================
--- trunk/vhffs-panel/templates/group/history.tmpl	2007-10-29 21:02:35 UTC (rev 1047)
+++ trunk/vhffs-panel/templates/group/history.tmpl	2007-10-29 21:39:17 UTC (rev 1048)
@@ -1,7 +1,7 @@
 <table>
 <thead>
 	<tr>
-		<th>
+		<th class="historyDate">
 			<tmpl_var name="HDATE">
 		</th>
 		<th>

Modified: trunk/vhffs-panel/templates/group/history_part.tmpl
===================================================================
--- trunk/vhffs-panel/templates/group/history_part.tmpl	2007-10-29 21:02:35 UTC (rev 1047)
+++ trunk/vhffs-panel/templates/group/history_part.tmpl	2007-10-29 21:39:17 UTC (rev 1048)
@@ -1,6 +1,7 @@
 	<tr>
 		<td>
-			<tmpl_var name="DATE">
+			<tmpl_var name="DATE"><br/>
+            <tmpl_var name="TIME">
 		</td>
 		<td>
 			<tmpl_var name="TYPE">

Modified: trunk/vhffs-panel/templates/misc/history.tmpl
===================================================================
--- trunk/vhffs-panel/templates/misc/history.tmpl	2007-10-29 21:02:35 UTC (rev 1047)
+++ trunk/vhffs-panel/templates/misc/history.tmpl	2007-10-29 21:39:17 UTC (rev 1048)
@@ -1,5 +1,3 @@
-<h1><tmpl_var name="TITLE"></h1>
-
 <table>
 	<tmpl_var name="HISTORY_PART">
 </table>

Modified: trunk/vhffs-panel/themes/vhffs/main.css
===================================================================
--- trunk/vhffs-panel/themes/vhffs/main.css	2007-10-29 21:02:35 UTC (rev 1047)
+++ trunk/vhffs-panel/themes/vhffs/main.css	2007-10-29 21:39:17 UTC (rev 1048)
@@ -817,3 +817,6 @@
     float:none;
 }
 
+th.historyDate {
+    width:6em;
+}


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/