diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-20 18:55:24 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-20 18:55:24 +0000 |
commit | 566b755be286b794a07bc92655ec6791012b58ca (patch) | |
tree | 90b60a9f010a61403b51916c9e2e906922fb562f | |
parent | faf079af4ddc0f35fc2b5835c20f184b4c93e303 (diff) | |
download | elgg-566b755be286b794a07bc92655ec6791012b58ca.tar.gz elgg-566b755be286b794a07bc92655ec6791012b58ca.tar.bz2 |
added some light styling to the widget control buttons
git-svn-id: http://code.elgg.org/elgg/trunk@7388 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/classes/ElggWidget.php | 15 | ||||
-rw-r--r-- | languages/en.php | 16 | ||||
-rw-r--r-- | views/default/css.php | 34 | ||||
-rw-r--r-- | views/default/dashboard/blurb.php | 18 | ||||
-rw-r--r-- | views/default/widgets/controls.php | 6 | ||||
-rw-r--r-- | views/default/widgets/wrapper.php | 21 |
6 files changed, 64 insertions, 46 deletions
diff --git a/engine/classes/ElggWidget.php b/engine/classes/ElggWidget.php index 1622aa5b3..15e942aa3 100644 --- a/engine/classes/ElggWidget.php +++ b/engine/classes/ElggWidget.php @@ -102,6 +102,21 @@ class ElggWidget extends ElggObject { } /** + * 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 * * @param int $column The widget column diff --git a/languages/en.php b/languages/en.php index 9ca58e736..09c025f29 100644 --- a/languages/en.php +++ b/languages/en.php @@ -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 diff --git a/views/default/css.php b/views/default/css.php index e0be90b2b..4e38aadc0 100644 --- a/views/default/css.php +++ b/views/default/css.php @@ -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 diff --git a/views/default/dashboard/blurb.php b/views/default/dashboard/blurb.php index 40b5b70a4..9450d2676 100644 --- a/views/default/dashboard/blurb.php +++ b/views/default/dashboard/blurb.php @@ -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 diff --git a/views/default/widgets/controls.php b/views/default/widgets/controls.php index 891a53595..4336a3506 100644 --- a/views/default/widgets/controls.php +++ b/views/default/widgets/controls.php @@ -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" diff --git a/views/default/widgets/wrapper.php b/views/default/widgets/wrapper.php index a8651e666..8d589aabd 100644 --- a/views/default/widgets/wrapper.php +++ b/views/default/widgets/wrapper.php @@ -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> |