mysql fix
authorPierre Habouzit (MadCoder <pierre.habouzit@m4x.org>
Sun, 19 Jun 2005 21:47:46 +0000 (21:47 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:29:21 +0000 (23:29 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-731

templates/xnet/groupe/evenements.tpl
templates/xnet/groupe/evt-detail.tpl
upgrade/0.9.7/00_xnet.sql

index 67c8ed8..deb2718 100644 (file)
@@ -67,7 +67,12 @@ Ev
     <tr>
       <td class="titre">date :</td>
       <td>
-        {$e.debut}{if $e.fin} - {$e.fin}{/if}
+        {if $e.fin}
+        du {$e.debut|date_format:"%d %B %Y à %H:%M"}<br />
+        au {$e.fin|date_format:"%d %B %Y à %H:%M"}
+        {else}
+        le {$e.debut|date_format:"%d %B %Y à %H:%M"}
+        {/if}
       </td>
     </tr>
     <tr>
index 69309a2..e991432 100644 (file)
     </tr>
     <tr>
       <td class="titre">Date</td>
-      <td>{$evt.deb}{if $evt.fin} - {$evt.fin}{/if}</td>
+      <td>
+        {if $evt.fin}
+        du {$evt.deb|date_format:"%d %B %Y à %H:%M"}<br />
+        au {$evt.fin|date_format:"%d %B %Y à %H:%M"}
+        {else}
+        le {$evt.deb|date_format:"%d %B %Y à %H:%M"}
+        {/if}
+      </td>
     </tr>
   </table>
 
index e12f9d7..668c6a8 100644 (file)
@@ -1,8 +1,11 @@
 ALTER TABLE virtual CHANGE `type` `type` ENUM('user', 'list', 'dom', 'evt') DEFAULT 'user' NOT NULL;
 
 ALTER TABLE groupex.asso ADD `pub` ENUM( 'public', 'private' ) DEFAULT 'public' NOT NULL AFTER `ax` ;
+INSERT INTO virtual_domains VALUES ('evts.polytechnique.org'); 
+
+use groupex;
 
-DROP TABLE groupex.evenements;
+DROP TABLE IF EXISTS groupex.evenements;
 CREATE TABLE groupex.evenements (
        `eid` int unsigned NOT NULL auto_increment,
        `asso_id` int unsigned NOT NULL default '0',
@@ -18,10 +21,9 @@ CREATE TABLE groupex.evenements (
        `show_participants` tinyint(1) NOT NULL default '0',
        PRIMARY KEY  (`eid`)
 );
-INSERT INTO virtual_domains VALUES ('evts.polytechnique.org'); 
 
-drop table groupex.evenements_items;
-CREATE TABLE `evenements_items` (
+drop table IF EXISTS evenements_items;
+CREATE TABLE evenements_items (
         `eid` int unsigned NOT NULL default '0',
         `item_id` int unsigned NOT NULL default '0',
         `titre` varchar(100) NOT NULL default '',
@@ -30,8 +32,8 @@ CREATE TABLE `evenements_items` (
         PRIMARY KEY  (`eid`,`item_id`)
 );
 
-drop table evenements_participants;
-CREATE TABLE `evenements_participants` (
+drop table IF EXISTS evenements_participants;
+CREATE TABLE evenements_participants (
         `eid` int unsigned NOT NULL default '0',
         `uid` int unsigned NOT NULL default '0',
         `item_id` int NOT NULL default '0',