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
*
*/
'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
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 {
*************************************** */
#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
<?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
$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',
$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"
$handler = $widget->handler;
-$title = $widget->title;
-if (!$title) {
- $title = $widgettypes[$handler]->name;
-}
+$title = $widget->getTitle();
$can_edit = $widget->canEdit();
}
?>
</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>