Skip to content

Commit

Permalink
MDL-20219 Deleted external blog block, and preferences link from blog…
Browse files Browse the repository at this point in the history
…_menu block. Placed these as links in settings block instead
  • Loading branch information
nicolasconnault committed Sep 15, 2009
1 parent ca497f4 commit 2367726
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 106 deletions.
92 changes: 0 additions & 92 deletions blocks/blog_externals/block_blog_externals.php

This file was deleted.

5 changes: 0 additions & 5 deletions blocks/blog_menu/block_blog_menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,6 @@ function get_content() {
$menulist->add_item($OUTPUT->link($myentrieslink));
}

// show link to manage blog prefs
$blogpreflink = html_link::make(new moodle_url($CFG->wwwroot .'/blog/preferences.php', array('userid' => $USER->id)), get_string('blogpreferences', 'blog'));
$blogpreflink->disableifcurrent = true;
$menulist->add_item($OUTPUT->link($blogpreflink));

// show Add entry link
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
if (has_capability('moodle/blog:create', $sitecontext)) {
Expand Down
1 change: 1 addition & 0 deletions blog/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@
$filters['entry'] = $entryid;
}
$blogheaders = blog_get_headers();
blog_extend_settings_navigation($PAGE->settingsnav);

// prints the tabs
$showroles = !empty($userid);
Expand Down
14 changes: 14 additions & 0 deletions blog/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -597,3 +597,17 @@ function blog_get_headers() {

return $headers;
}

function blog_extend_settings_navigation($settingsnav) {
global $USER, $PAGE, $FULLME, $CFG, $DB, $OUTPUT;
$blogkey = $settingsnav->add(get_string('blogadministration', 'blog'));
$blog = $settingsnav->get($blogkey);
$blog->forceopen = true;

$blog->add(get_string('preferences', 'blog'), new moodle_url('preferences.php'), navigation_node::TYPE_SETTING);
if ($CFG->useexternalblogs && $CFG->maxexternalblogsperuser > 0) {
$blog->add(get_string('externalblogs', 'blog'), new moodle_url('external.php'), navigation_node::TYPE_SETTING);
}

return $blogkey;
}
2 changes: 2 additions & 0 deletions lang/en_utf8/blog.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
$string['blocktagstitle'] = 'Blog Tags';
$string['blocktitle'] = 'Blog tags block title';
$string['blog'] = 'Blog';
$string['blogadministration'] = 'Blog administration';
$string['blogdeleteconfirm'] = 'Delete this blog?';
$string['blogdisable'] = 'Blogging is disabled!';
$string['blogentries'] = 'Blog entries';
Expand Down Expand Up @@ -73,6 +74,7 @@
$string['pagesize'] = 'Number of blog entries per Page';
$string['permalink'] = 'Permalink';
$string['personalblogs'] = 'Users can only see their own blog';
$string['preferences'] = 'Preferences';
$string['publishto'] = 'Publish to';
$string['publishtocourse'] = 'Users sharing a course with you';
$string['publishtocourseassoc'] = 'Members of the associated course';
Expand Down
9 changes: 0 additions & 9 deletions theme/standard/styles_layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -1993,15 +1993,6 @@ body.has_navigation_bar {
width: auto;
}

.block_blog_externals a.delete {
margin-left: 6px;
}

.block_blog_externals div.newlink {
margin-top: 10px;
text-align: center;
width: 100%;
}
/***
*** Calendar
***/
Expand Down

0 comments on commit 2367726

Please sign in to comment.