]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
added some light styling to the widget control buttons
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 20 Nov 2010 18:55:24 +0000 (18:55 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 20 Nov 2010 18:55:24 +0000 (18:55 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7388 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/classes/ElggWidget.php
languages/en.php
views/default/css.php
views/default/dashboard/blurb.php
views/default/widgets/controls.php
views/default/widgets/wrapper.php

index 1622aa5b34b068102383cdc25f3b37594470f693..15e942aa3de26790ef949992981de5e3ca15f971 100644 (file)
@@ -101,6 +101,21 @@ class ElggWidget extends ElggObject {
                return get_private_setting($this->guid, 'context');
        }
 
+       /**
+        * Get the title of the widget
+        *
+        * @return string
+        * @since 1.8.0
+        */
+       public function getTitle() {
+               $title = $this->title;
+               if (!$title) {
+                       global $CONFIG;
+                       $title = $CONFIG->widgets->handlers[$this->handler]->name;
+               }
+               return $title;
+       }
+
        /**
         * Move the widget
         *
index 9ca58e7368bc23894b3184691ecc0103d0edf513..09c025f2939a092aa5bd3f467a89ac781be8fac9 100644 (file)
@@ -224,33 +224,25 @@ $english = array(
  */
 
        'dashboard' => "Dashboard",
-       'dashboard:configure' => "Edit page",
-       'dashboard:nowidgets' => "Your dashboard is your gateway into the site. Click 'Edit page' to add widgets to keep track of content and your life within the system.",
+       'dashboard:nowidgets' => "Your dashboard lets you track activity and content on this site that matters to you.",
 
        'widgets:add' => 'Add widgets',
        'widgets:add:description' => "Click on any widget button below to add it to your page.",
        'widgets:position:fixed' => '(Fixed position on page)',
        'widget:unavailable' => 'You have already added this widget',
 
+       'widget:delete' => 'Remove %s',
+       'widget:edit' => 'Customize this widget',
+
        'widgets' => "Widgets",
        'widget' => "Widget",
        'item:object:widget' => "Widgets",
-       'layout:customise' => "Customize layout",
-       'widgets:gallery' => "Widget gallery",
-       'widgets:leftcolumn' => "Left widgets",
-       'widgets:fixed' => "Fixed position",
-       'widgets:middlecolumn' => "Middle widgets",
-       'widgets:rightcolumn' => "Right widgets",
-       'widgets:profilebox' => "Profile box",
-       'widgets:panel:save:success' => "Your widgets were successfully saved.",
-       'widgets:panel:save:failure' => "There was a problem saving your widgets. Please try again.",
        'widgets:save:success' => "The widget was successfully saved.",
        'widgets:save:failure' => "We could not save your widget. Please try again.",
        'widgets:add:success' => "The widget was successfully added.",
        'widgets:add:failure' => "We could not add your widget.",
        'widgets:move:failure' => "We could not store the new widget position.",
        'widgets:remove:failure' => "Unable to remove this widget",
-       'widgets:handlernotfound' => 'This widget is either broken or has been disabled by the site administrator.',
 
 /**
  * Groups
index e0be90b2b0c40e03c2147186f5b59ee321a45278..4e38aadc0d8e662dce404852164da22623ef5ac5 100644 (file)
@@ -931,16 +931,34 @@ li.navigation_more ul li {
        list-style: none;
 }
 .widget_title li {
-       margin: 0 4px;
+       margin: 5px 2px;
+}
+.widget_title li a {
+       display: block;
+       width: 18px;
+       height: 18px;
+       border: 1px solid transparent;
+}
+.widget_title li a:hover {
+       border: 1px solid #cccccc;
+}
+a.widget_edit_button {
+       background:transparent url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png) no-repeat -300px -1px;
+}
+a.widget_delete_button {
+       background:transparent url(<?php echo elgg_get_site_url(); ?>_graphics/elgg_sprites.png) no-repeat -198px 3px;
+}
+.widget_container {
+       background-color: white;
+       width: 100%;
 }
 .widget_edit {
        display: none;
-       margin-bottom:2px;
-       padding: 8px;
-       background-color: white;
+       width: 96%;
+       padding: 2%;
+       border-bottom: 2px solid #dedede;
 }
 .widget_content {
-       background-color: #ffffff;
        padding: 10px;
 }
 .drag_handle {
@@ -1754,6 +1772,8 @@ p.elgg_likes_owner {
 *************************************** */
 #dashboard_info {
        float: left;
-       width: 66%;
-       margin-bottom: 15px;
+       width: 625px;
+       margin: 0 5px 15px;
+       padding: 5px;
+       border: 2px solid #dedede;
 }
\ No newline at end of file
index 40b5b70a4a19b06bf9139dfad233cf41ceed632b..9450d2676f699bf859ff7a2b0686db03d9f0daec 100644 (file)
@@ -1,22 +1,12 @@
 <?php
 /**
- * Elgg comments add form
+ * Elgg dashboard blurb
  *
- * @package Elgg
- *
- * @uses $vars['entity']
  */
 ?>
 
 <div id="dashboard_info">
-<p>
-<?php
-
-       echo elgg_echo("dashboard:nowidgets");
-
-?>
-</p>
-<p>
-       <a href="<?php echo elgg_get_site_url(); ?>pages/dashboard/latest.php"><?php echo elgg_echo('content:latest:blurb'); ?></a>
-</p>
+       <p>
+               <?php echo elgg_echo("dashboard:nowidgets"); ?>
+       </p>
 </div>
\ No newline at end of file
index 891a53595f3ea0cbcaac9216620eb53d67c61ae3..4336a350664d4354c0ca2394b02cca7fe47edbcc 100644 (file)
@@ -9,7 +9,8 @@
 $widget = $vars['widget'];
 
 $params = array(
-       'text' => 'delete',
+       'text' => ' ',
+       'title' => elgg_echo('widget:delete', array($widget->getTitle())),
        'href' => elgg_get_site_url() . "action/widgets/delete?guid=$widget->guid",
        'is_action' => true,
        'class' => 'widget_delete_button',
@@ -18,7 +19,8 @@ $params = array(
 $delete_link = elgg_view('output/url', $params);
 
 $params = array(
-       'text' => 'edit',
+       'text' => ' ',
+       'title' => elgg_echo('widget:edit'),
        'href' => "#",
        'class' => 'widget_edit_button',
        'internalid' => "widget_edit_button_$widget->guid"
index a8651e6667580c28954ada9f8f5cc8bf8b8a25f5..8d589aabd95912d4e5ef25fc8494369f23f47474 100644 (file)
@@ -16,10 +16,7 @@ $widgettypes = elgg_get_widget_types('all');
 
 $handler = $widget->handler;
 
-$title = $widget->title;
-if (!$title) {
-       $title = $widgettypes[$handler]->name;
-}
+$title = $widget->getTitle();
 
 $can_edit = $widget->canEdit();
 
@@ -36,12 +33,14 @@ $widget_instance = "widget_instance_$handler";
                }
                ?>
        </div>
-       <?php
-       if ($can_edit) {
-               echo elgg_view('widgets/settings', array('widget' => $widget));
-       }
-       ?>
-       <div class="widget_content">
-               <?php echo elgg_view("widgets/$handler/view", $vars); ?>
+       <div class="widget_container">
+               <?php
+               if ($can_edit) {
+                       echo elgg_view('widgets/settings', array('widget' => $widget));
+               }
+               ?>
+               <div class="widget_content">
+                       <?php echo elgg_view("widgets/$handler/view", $vars); ?>
+               </div>
        </div>
 </div>