LAYOUT: moved game status to top; cleaned up some css
authorArun Persaud <arun@nubati.net>
Tue, 15 Nov 2011 04:14:00 +0000 (20:14 -0800)
committerArun Persaud <apersaud@lbl.gov>
Tue, 15 Nov 2011 04:14:00 +0000 (20:14 -0800)
css/standard.css
include/functions.php
include/game.php
include/output.php

index 626c21814a4bd59e7ea85e6a573f3457a8c05fc0..5e6ee353edad5366e363ea73f7d839f3ef2f8006 100644 (file)
@@ -23,7 +23,6 @@ body { background-color: #ddd; }
 header {
   background-color: #fff;
   text-align:       center;
-  height:           4em;
   padding-top: 1.5em;
   margin: 0em 3em;
   border-bottom:    3px solid gray;
@@ -38,22 +37,19 @@ header {
 
 .main {
   background-color: #fff;
-  margin: 0em 3em;
-  padding: 1em 0em;
-  min-height: 40em;
+  padding: 0em 0em;
+  margin:  0em 3em;
+  padding-bottom: 1em;
 }
 
 footer {
   background-color: #fff;
-  margin-left: 3em;
-  margin-right: 3em;
-  padding:0;
+  margin: 0em 3em;
+  padding:0em 0.2em;
   border-top: 2px solid gray;
-  clear:both;
-  height: 8em;
 }
-footer .right { float:right;   font-size:smaller;}
-footer .left  { float:left;  font-size:smaller; }
+footer .right { text-align:right;   font-size:smaller;}
+footer .left  { float:left;         font-size:smaller;}
 
 .status {
   position:absolute;
@@ -66,6 +62,7 @@ footer .left  { float:left;  font-size:smaller; }
 .session {
   width: 100%;
   border-bottom: 1px solid #000;
+  padding: 0.5em;
   text-align: center;
 }
 .session div.sessionrules {
@@ -462,20 +459,9 @@ ul.tricks li div div span.comment span{
 }
 
 .usermenu {
-  position:absolute;
-  top:10em;
-  left:3em;
-  margin:1em;
-  margin-top:0em;
-  margin-left:0em;
-
-  width: 12em;
-
-  border:    2px solid gray;
-
-  padding:0.3em;
-
-  background-color: #eee;
+  text-align: center;
+  padding:0.7em;
+  border-bottom: 1px solid black;
 }
 
 .notes {
@@ -499,7 +485,10 @@ ul.tricks li div div span.comment span{
   z-index:50;
 }
 
-.user { margin-left:25%;margin-right:5%; }
+.user {
+    margin-left:25%;
+    margin-right:5%;
+}
 
 div.user ul {
   list-style:none;
@@ -721,9 +710,12 @@ div.table div img.gravatar, img.gravatar  {
     width:  4em;
     height: 4em;
     border: 3px solid #aaa;
+}
+div.table div img.gravatar {
     float:left;
 }
 
+
 div img.button {
     float: right;
     width: 2em;
@@ -778,7 +770,6 @@ div span.numberoftricks {
   background-color: #fff;
   margin-left: 0em;
   margin-right: 0em;
-  min-height: 0em;
 }
 
 header, footer {
@@ -786,11 +777,10 @@ header, footer {
   margin-right: 0em;
 }
 
-
 .lastlogin {
   position: relative;
   left: 0em;
-  top: 0em;
+  top:  0em;
   width: 100%;
   text-align: center;
   border-top: 1px solid gray;
@@ -800,10 +790,6 @@ header, footer {
   right:0em;
 }
 
-.usermenu {
-  left: 0em;
-}
-
 .notes {
   position:relative;
   top:0em;
index 9f36330da129fee013d8912a967d1aaf1216adcf..fc46a61e576fc3a06484336e4f86e25e21b177a8 100644 (file)
@@ -1181,16 +1181,16 @@ function display_user_menu($id)
     {
       if($i==0)
        {
-         echo "<div class=\"usermenu\">\n  ";
-         echo _('It\'s your turn in these games').":<br />\n";
+         echo "\n<div class=\"usermenu\">\n  ";
+         echo _('It\'s your turn in these games').":\n";
        }
 
       $i++;
       echo "  <a href=\"".$INDEX."?action=game&amp;me=".$r[0].
-       "\">game ".DB_format_gameid($r[1])." </a><br />\n";
+       "\">game ".DB_format_gameid($r[1])." </a>\n";
       if($i>4)
        {
-         echo "  ...<br />\n";
+         echo "  ...\n";
          break;
        }
     }
index b8963d2fc5134aac1a1d782a4d4371a82b1b5e3b..c78482c1042dd8e409bb1cdccea8c481691fdb56 100644 (file)
@@ -49,7 +49,6 @@ global $GAME,$RULES,$CARDS;
 $gameid   = DB_get_gameid_by_hash($me);
 $myname   = DB_get_name('hash',$me);
 $mystatus = DB_get_status_by_hash($me);
-$origmystatus = DB_get_status_by_hash($me); /* to show "it's your turn" menu when game has just finished */
 $mypos    = DB_get_pos_by_hash($me);
 $myhand   = DB_get_handid('hash',$me);
 $myparty  = DB_get_party_by_hash($me);
@@ -175,6 +174,30 @@ if(myisset('call')  && $_REQUEST['call']  == '0' && can_call(0,$me))
   }
 
 
+
+/*****************************************************************
+ * output other games where it is the users turn
+ * make sure that the people looking at old games don't see the wrong games here
+ *****************************************************************/
+
+if( $gamestatus != 'gameover'  && isset($_SESSION['id']) )
+  {
+    /* game isn't over, only valid user can get here, so show menu */
+    display_user_menu($myid);
+  }
+else if( $mystatus == 'gameover' && isset($_SESSION['id']) )
+  {
+    /* user is looking at someone else's game, show the menu for the correct user */
+    display_user_menu($_SESSION['id']);
+  }
+else
+  {
+    echo "<div class=\"usermenu\">\n";
+    echo "It's your turn in these games: \n";
+    echo "Please log in to see this information.\n";
+    echo "</div>\n\n";
+  }
+
 /*****************************************************************
  * output extra division in case this game is part of a session
  *****************************************************************/
@@ -307,7 +330,6 @@ if($mystatus!='gameover')
    if(isset($_SESSION['id']))
      DB_update_user_timestamp($_SESSION['id']);
 
-
 /******************************************************************************
  * Output tricks played, table, messages, and cards (depending on game status)
  ******************************************************************************/
@@ -2111,33 +2133,6 @@ if( sizeof($messages) )
  * Comments, re/contra calls, user menu
  ***********************************************/
 
-/* output other games where it is the users turn
- * make sure that the people looking at old games don't see the wrong games here
- */
-if( $gamestatus != 'gameover' )
-  {
-    /* game isn't over, only valid user can get here, so show menu */
-    display_user_menu($myid);
-  }
-else if( $origmystatus != 'gameover' )
-  {
-    /* user just played the very last card, game is now over, it's still ok to show the menu though */
-    display_user_menu($myid);
-  }
-else if( $mystatus == 'gameover'
-        && isset($_SESSION['id']) )
-  {
-    /* user is looking at someone else's game, show the menu for the correct user */
-    display_user_menu($_SESSION['id']);
-  }
-else
-  {
-    echo "<div class=\"usermenu\">\n";
-    echo "It's your turn in these games:<br />\n";
-    echo "Please log in to see this information.\n";
-    echo "</div>\n\n";
-  }
-
 /*
  * display gameinfo: re/contra, comment-box, play-card button, games played by others
  */
index 42f40856ad35ec1240b07a6b74b0206baaa2d1f0..325cf4aae979dd4ec120e6533b2a760f539e9892 100644 (file)
@@ -409,7 +409,7 @@ function output_footer()
     "  Verwendung der [deutschen] Kartenbilder mit Genehmigung <br />der Spielkartenfabrik Altenburg GmbH,(c) ASS Altenburger <br />\n".
     "  - ASS Altenburger Spielkarten - Spielkartenfabrik Altenburg GmbH <br />\n".
     "  a Carta Mundi Company Email: info@spielkarten.com Internet: www.spielkarten.com</p>\n";
- echo " <p class=\"right\"> See the latest changes <a href=\"http://nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=summary\">\n".
 echo " <p class=\"right\"> See the latest changes <a href=\"http://nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=summary\">\n".
     "  via git </a> <br />or download the source via <br />\n'git clone http://nubati.net/git/e-DoKo.git' <br />\n".
     "  <a href=\"http://www.dreamhost.com/green.cgi\">\n".
     "  <img alt=\"Green Web Hosting! This site hosted by DreamHost.\"".