diff admajax.php @ 385:8b8b0a83233b

Add compo entry show position buttons to individual compos.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 05 Dec 2013 07:24:12 +0200
parents ea68c1b081b2
children 3257ae94ba1c
line wrap: on
line diff
--- a/admajax.php	Wed Dec 04 19:52:23 2013 +0200
+++ b/admajax.php	Thu Dec 05 07:24:12 2013 +0200
@@ -380,12 +380,16 @@
         $showMode = stGetDisplayVar("showMode");
         echo
           "<div id=\"ctrlGlobalControls\">\n".
+          "<div>\n".
           "Active mode:\n".
           stGetShowModeButton(SMODE_ROTATE, "Slide rotation", $showMode)."\n".
           stGetShowModeButton(SMODE_COMPO, "Compo mode", $showMode)."\n".
           stGetFormButtonInput("syscheck", "", "", " Perform system check ", "performSystemCheck()")."\n".
           stGetFormButtonInput("generate", "", "", " Add missing show positions ", "generateEntryPositions(0, 1)")."\n".
-          stGetFormButtonInput("regenerate", "", "", " ReGenerate show positions ", "generateEntryPositions(0, 0)")."\n".
+          stGetFormButtonInput("regenerate", "", "", " ReGenerate ALL show positions ", "generateEntryPositions(0, 0)")."\n".
+          "</div>\n".
+          "<div>\n".
+          "</div>\n".
           "</div>\n";
         break;
 
@@ -655,7 +659,16 @@
           $prefix = "ne";
           echo
             "<h1 style=\"margin-bottom: 0px;\">#".$id." - ".chentities($compo["name"]).
-            " (".$nentries." entries)</h1>\n".
+            " (".$nentries." entries)</h1>\n";
+
+          if ($nentries > 0)
+          {
+            echo
+              stGetFormButtonInput("generate", "", "", " Add missing show positions ", "generateEntryPositions(".$id.", 1)")."\n".
+              stGetFormButtonInput("regenerate", "", "", " ReGenerate show positions ", "generateEntryPositions(".$id.", 0)")."\n";
+          }
+
+          echo
             "<form>\n".
             " <table class=\"misc\">\n".
             "  <tr>\n".