Jeremy Newman : cleanup and add icons to a few more buttons

Jeremy Newman jnewman at winehq.org
Mon Nov 21 08:38:09 CST 2016


Module: appdb
Branch: master
Commit: 27f8d829cae8dede5a3ac69dc65e8e60438c0e6f
URL:    http://source.winehq.org/git/appdb.git/?a=commit;h=27f8d829cae8dede5a3ac69dc65e8e60438c0e6f

Author: Jeremy Newman <jnewman at codeweavers.com>
Date:   Fri Nov 18 10:04:17 2016 -0600

cleanup and add icons to a few more buttons

---

 include/application.php   |  4 ++--
 include/objectManager.php | 20 +++++++++-----------
 2 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/include/application.php b/include/application.php
index 1817545..febc92d 100644
--- a/include/application.php
+++ b/include/application.php
@@ -830,7 +830,7 @@ class Application {
             {
                 $mtrscmds .= '<form method="post" name="sEdit" action="admin/editAppFamily.php">'.
                              '<input type="hidden" name="iAppId" value="'.$this->iAppId.'">'.
-                             '<input type="submit" value="Edit Application" class="btn btn-default"></form>'.
+                             '<input type="submit" value="Edit Application" class="btn btn-default btn-sm btn-skinny"></form>'.
                              '<form method="post" action="objectManager.php?sClass=note&sAction=add&sTitle=Add+note&iAppId='.$this->iAppId.'&sNoteTitle=HOWTO&sReturnTo='.urlencode($this->objectMakeUrl()).'">'.
                              '<input type="submit" value="Add note/how-to" class="btn btn-default btn-sm btn-skinny">'.
                              '</form>';
@@ -846,7 +846,7 @@ class Application {
             if($_SESSION['current']->hasPriv("admin"))
             {
                 $url = BASE."objectManager.php?sClass=application&bIsQueue=false&sAction=delete&iId=".$this->iAppId;
-                $mtrscmds .= "<form method=\"post\" name=\"sEdit\" action=\"javascript:self.location = '".$url."'\"><input type=\"submit\" value=\"Delete app\" class=\"btn btn-default\"></form>";
+                $mtrscmds .= "<form method=\"post\" name=\"sEdit\" action=\"javascript:self.location = '".$url."'\"><input type=\"submit\" value=\"Delete app\" class=\"btn btn-default btn-sm btn-skinny\"></form>";
                 $mtrscmds .= '<form method="post" name="sEdit" action="admin/editBundle.php"><input type="hidden" name="iBundleId" value="'.$this->iAppId.'"><input type="submit" value="Edit bundle" class="btn btn-default btn-sm btn-skinny"></form>';
             }
         } else
diff --git a/include/objectManager.php b/include/objectManager.php
index 528a65c..126dfac 100644
--- a/include/objectManager.php
+++ b/include/objectManager.php
@@ -218,7 +218,7 @@ class ObjectManager
                                     '" class="btn btn-default btn-sm"><i class="fa fa-trash"></i> delete</a>';
                 }
 
-                $oTableCell = new TableCell('<a href="'.$this->makeUrl("edit", $oObject->objectGetId()).
+                $oTableCell = new TableCell('<a href="'.$this->makeUrl("edit", $oObject->objectGetId()).'" '.
                                             'class="btn btn-default btn-sm"><i class="fa fa-pencil-square-o"></i> '.$sEditLinkLabel.'</a>'.$shDeleteLink);
                 $this->oTableRow->AddCell($oTableCell);
             }
@@ -310,10 +310,8 @@ class ObjectManager
         /* Show a link to the 'purge rejected entries' page if we are an admin */
         if($_SESSION['current']->hasPriv('admin') && $this->getOptionalSetting('objectAllowPurgingRejected', FALSE))
         {
-            echo '<div class="text-center">';
             $oM = new objectManager($this->sClass, 'Purge Rejected Entries');
-            echo '<a href="'.$oM->makeUrl('purgeRejected').'">Purge rejected entries</a>';
-            echo '</div>';
+            echo '<p><a href="'.$oM->makeUrl('purgeRejected').'" class="btn btn-default"><i class="fa fa-recycle"></i> Purge rejected entries</a></p>';
         }
 
         $sQueued = $this->getQueueString($this->getIsQueue(), $this->sState == 'rejected');
@@ -331,7 +329,7 @@ class ObjectManager
         if($oObject->canEdit() && $this->GetOptionalSetting("objectShowAddEntry", FALSE))
         {
             echo "<p><a href=\"".$this->makeUrl("add", false,
-                    "Add $this->sClass")."\">Add entry</a></p>\n";
+                    "Add $this->sClass")."\" class=\"btn btn-default\"><i class=\"fa fa-plus-square-o\"></i> Add entry</a></p>\n";
         }
 
         // Display bottom of page selectors current page, if applicable
@@ -1213,7 +1211,7 @@ class ObjectManager
                 }
             }
             echo "<a href=\"".$this->makeUrl("showChangeParent", $this->iId,
-                 "Move to another parent entry")."\">$sLinkText</a>\n";
+                 "Move to another parent entry")."\" class=\"btn btn-default\"><i class=\"fa fa-arrows-alt\"></i> $sLinkText</a>\n";
         }
     }
 
@@ -1226,7 +1224,7 @@ class ObjectManager
            method_exists($oObject, "objectGetId") && $oObject->canEdit())
         {
             echo "<a href=\"".$this->makeUrl("showMoveChildren", $this->iId,
-                 "Move Child Objects")."\">Move child objects</a>\n";
+                 "Move Child Objects")."\" class=\"btn btn-default\"><i class=\"fa fa-arrows\"></i> Move child objects</a>\n";
             return true;
         }
 
@@ -1319,7 +1317,7 @@ class ObjectManager
 
         // display the move children entry
         if($this->displayMoveChildren($oObject))
-            echo "     ";
+        echo " ";
         $this->displayChangeParent($oObject);
 
         if(!$aVars)
@@ -1327,12 +1325,12 @@ class ObjectManager
         else
             $oObject->display($aVars);
 
+        echo html_back_link(1, $sBackLink);
+
         // display the move children entry
         if($this->displayMoveChildren($oObject))
-            echo "     ";
+        echo " ";
         $this->displayChangeParent($oObject);
-
-        echo html_back_link(1, $sBackLink);
     }
 
     /* Process form data generated by adding or updating an entry */




More information about the wine-cvs mailing list