Skip to content

Commit 7aa7602

Browse files
committed
Style add comment and delete comment links as buttons
These should be styled in the same manner as the add images button. Without this we have a mix of buttons and links that looks jarring.
1 parent e16555c commit 7aa7602

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ function lightboxgallery_print_comment($comment, $context) {
535535
'</td><td class="content" align="left">'.
536536
format_text($comment->commenttext, FORMAT_MOODLE).
537537
'<div class="commands">'.
538-
(has_capability('mod/lightboxgallery:edit', $context) ? html_writer::link($deleteurl, get_string('delete')) : '').
538+
(has_capability('mod/lightboxgallery:edit', $context) ? html_writer::link($deleteurl, get_string('delete'), ['class' => 'btn btn-link']) : '').
539539
'</div>'.
540540
'</td></tr></table>';
541541
}

view.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,11 @@
155155

156156
if ($gallery->comments && has_capability('mod/lightboxgallery:addcomment', $context)) {
157157
$opturl = new moodle_url('/mod/lightboxgallery/comment.php', ['id' => $gallery->id]);
158-
$options[] = html_writer::link($opturl, get_string('addcomment', 'lightboxgallery'));
158+
$options[] = html_writer::link($opturl, get_string('addcomment', 'lightboxgallery'), ['class' => 'btn btn-primary']);
159159
}
160160

161161
if (count($options) > 0) {
162-
echo $OUTPUT->box(implode(' | ', $options), 'center');
162+
echo $OUTPUT->box(implode(' ', $options), 'center');
163163
}
164164

165165
if (!$editing && $gallery->comments && has_capability('mod/lightboxgallery:viewcomments', $context)) {

0 commit comments

Comments
 (0)