Skip to content

Commit

Permalink
MDL-62586 Themes: use Boostrap media compontent for author display
Browse files Browse the repository at this point in the history
  • Loading branch information
Bas Brands committed May 30, 2018
1 parent 0da8ef6 commit 6dc178e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 24 deletions.
8 changes: 5 additions & 3 deletions mod/forum/lib.php
Expand Up @@ -3850,14 +3850,16 @@ function forum_print_discussion_header(&$post, $forum, $group = -1, $datestring
$postuser = username_load_fields_from_object($postuser, $post, null, $postuserfields);
$postuser->id = $post->userid;
echo '<td class="author">';
echo '<span class="picture">';
echo '<div class="media">';
echo '<span class="pull-left">';
echo $OUTPUT->user_picture($postuser, array('courseid'=>$forum->course));
echo '</span>';
echo '<span class="name">';
// User name
echo '<div class="media-body">';
$fullname = fullname($postuser, has_capability('moodle/site:viewfullnames', $modcontext));
echo '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$post->userid.'&amp;course='.$forum->course.'">'.$fullname.'</a>';
echo '</span>';
echo '</div>';
echo '</div>';
echo "</td>\n";

// Group picture
Expand Down
7 changes: 1 addition & 6 deletions mod/forum/styles.css
Expand Up @@ -122,10 +122,6 @@
margin: 0 .3em;
}

.path-mod-forum .forumheaderlist .picture {
width: 35px;
}

.path-mod-forum .forumheaderlist .discussion .starter {
vertical-align: middle;
}
Expand All @@ -139,8 +135,7 @@
text-align: right;
}

.path-mod-forum .forumheaderlist .replies,
.path-mod-forum .forumheaderlist .discussion .author {
.path-mod-forum .forumheaderlist .replies {
white-space: nowrap;
}

Expand Down
3 changes: 0 additions & 3 deletions theme/boost/scss/moodle/modules.scss
Expand Up @@ -77,7 +77,6 @@ select {
}

.discussion {
.author,
.replies,
.lastpost {
white-space: normal;
Expand All @@ -91,8 +90,6 @@ select {
.topic,
.discussionsubscription,
.topic.starter,
.picture,
.author,
.replies,
.lastpost {
vertical-align: top;
Expand Down
6 changes: 0 additions & 6 deletions theme/bootstrapbase/less/moodle/modules.less
Expand Up @@ -104,7 +104,6 @@ body.path-mod-feedback #region-main .mform.feedback_form .feedback-item-pagebrea
}
}
.discussion {
.author,
.replies,
.lastpost {
white-space: normal;
Expand All @@ -116,15 +115,10 @@ body.path-mod-feedback #region-main .mform.feedback_form .feedback-item-pagebrea
.topic,
.discussionsubscription,
.topic.starter,
.author,
.replies,
.lastpost {
vertical-align: top;
}
.picture {
margin: 0 20px;
float: left;
}
.unread {
img {
margin: 0;
Expand Down
6 changes: 0 additions & 6 deletions theme/bootstrapbase/style/moodle.css
Expand Up @@ -17342,7 +17342,6 @@ body.path-mod-feedback #region-main .mform.feedback_form .feedback-item-pagebrea
padding-left: 0.5em;
padding-right: 0.5em;
}
.path-mod-forum .forumheaderlist .discussion .author,
.path-mod-forum .forumheaderlist .discussion .replies,
.path-mod-forum .forumheaderlist .discussion .lastpost {
white-space: normal;
Expand All @@ -17354,15 +17353,10 @@ body.path-mod-feedback #region-main .mform.feedback_form .feedback-item-pagebrea
.path-mod-forum .forumheaderlist .discussion .topic,
.path-mod-forum .forumheaderlist .discussion .discussionsubscription,
.path-mod-forum .forumheaderlist .discussion .topic.starter,
.path-mod-forum .forumheaderlist .discussion .author,
.path-mod-forum .forumheaderlist .discussion .replies,
.path-mod-forum .forumheaderlist .discussion .lastpost {
vertical-align: top;
}
.path-mod-forum .forumheaderlist .discussion .picture {
margin: 0 20px;
float: left;
}
.path-mod-forum .forumheaderlist .discussion .unread img {
margin: 0;
}
Expand Down

0 comments on commit 6dc178e

Please sign in to comment.