Permalink
Browse files

MDL-21610 (partial) - converting table to css for discussion display …

…controls.
  • Loading branch information...
1 parent 5e044ef commit 12a24e00cfe54ad6f3aa572cf1f19446e5173716 Rossiani Wijaya committed Jul 1, 2010
Showing with 17 additions and 12 deletions.
  1. +12 −11 mod/forum/discuss.php
  2. +5 −1 mod/forum/styles.css
View
@@ -207,26 +207,26 @@
}
/// Print the controls across the top
-
- echo '<table width="100%" class="discussioncontrols"><tr><td>';
+ echo '<div class="discussioncontrols">';
// groups selector not needed here
-
- echo "</td><td>";
+ echo '<div class="displaymode">';
forum_print_mode_form($discussion->id, $displaymode);
- echo "</td><td>";
+ echo "</div>";
- if (has_capability('mod/forum:exportdiscussion', $modcontext)) {
+ if (has_capability('mod/forum:exportdiscussion', $modcontext) && (!empty($CFG->enableportfolios))) {
+ echo '<div class="exporttoportfolio">';
require_once($CFG->libdir.'/portfoliolib.php');
$button = new portfolio_add_button();
$button->set_callback_options('forum_portfolio_caller', array('discussionid' => $discussion->id), '/mod/forum/locallib.php');
- $button->render();
- echo '</td><td>';
+ $button->render();
+ echo '</div>';
}
if ($forum->type != 'single'
&& has_capability('mod/forum:movediscussions', $modcontext)) {
+ echo '<div class="movediscussion">';
// Popup menu to move discussions to other forums. The discussion in a
// single discussion forum can't be moved.
$modinfo = get_fast_modinfo($course);
@@ -250,15 +250,16 @@
}
}
if (!empty($forummenu)) {
-
- echo "<div style=\"float:right;\">";
+ echo '<div class="movediscussionoption">';
$select = new url_select($forummenu, '', array(''=>get_string("movethisdiscussionto", "forum")), 'forummenu');
echo $OUTPUT->render($select);
echo "</div>";
}
}
+ echo "</div>";
}
- echo "</td></tr></table>";
+ echo '<div class="clearfloat">&nbsp;</div>';
+ echo "</div>";
if (!empty($forum->blockafter) && !empty($forum->blockperiod)) {
$a = new object();
@@ -28,7 +28,11 @@
#page-mod-forum-subscribers .subscribertable tr td.potential {width:42%;}
/** Styles for discuss.php **/
-#page-mod-forum-discuss .discussioncontrols td {width: 33%;text-align:center;}
+#page-mod-forum-discuss .discussioncontrols {width:100%;margin:5px;}
+#page-mod-forum-discuss .displaymode {float:left;width:55%;}
+#page-mod-forum-discuss .exporttoportfolio {float:left;width:15%;text-align:right;}
+#page-mod-forum-discuss .movediscussion .movediscussionoption {float:right;width:25%;text-align:right;padding-right:10px;}
+#page-mod-forum-discuss .discussioncontrols .displaymode .singleselect {text-align:right;margin: 0;}
/** Styles for view.php **/
#page-mod-forum-view .forumaddnew {margin-bottom: 20px;}

0 comments on commit 12a24e0

Please sign in to comment.