From 0665c52765abcd3b63df45de1f175c6e8e176a80 Mon Sep 17 00:00:00 2001 From: Pat Kira Date: Tue, 15 Sep 2015 17:12:49 +1200 Subject: [PATCH] A lot of minor styling fixes (bug: 1465107) behatnotneeded: Styling fixes only Change-Id: I064dc0e6d859249ff3c58f7e576fca9287d779eb --- htdocs/account/institutions.php | 2 + htdocs/admin/site/licenses.php | 1 + htdocs/admin/site/networking.php | 2 +- htdocs/admin/users/edit.php | 2 +- htdocs/artefact/annotation/lib.php | 5 +- .../blocktype/recentposts/js/recentposts.js | 19 ++-- .../blog/lang/en.utf8/artefact.blog.php | 2 +- htdocs/artefact/file/blocktype/html/lib.php | 1 + .../file/blocktype/internalmedia/lib.php | 13 +-- htdocs/collection/views.json.php | 2 +- htdocs/collection/views.php | 2 +- htdocs/group/addmembers.php | 2 +- htdocs/group/invite.php | 1 + htdocs/interaction/forum/topic.php | 5 +- htdocs/js/customlayout.js | 2 +- htdocs/lang/en.utf8/admin.php | 4 +- htdocs/lib/group.php | 10 +-- htdocs/lib/license.php | 4 +- htdocs/lib/objectionable.php | 2 +- .../pieforms/pieform/elements/fieldset.php | 2 +- htdocs/search/elasticsearch/lib.php | 2 +- .../sass/utilities/_theme-variables.scss | 1 + htdocs/theme/raw/js/filebrowser.js | 4 +- htdocs/theme/raw/pieforms/export.php | 4 +- .../templates/annotationfeedbackview.tpl | 11 +-- .../recentposts/templates/recentposts.tpl | 38 ++++---- .../taggedposts/templates/taggedposts.tpl | 52 +++++------ .../templates/artefactchooser-element.tpl | 13 ++- .../artefact/blog/templates/blog.tpl | 15 ++-- .../artefact/blog/templates/bloglist.tpl | 2 +- .../artefact/blog/templates/index.tpl | 2 +- .../artefact/blog/templates/viewposts.tpl | 70 ++++++++------- .../blocktype/comment/templates/comment.tpl | 2 +- .../comment/templates/commentlist.tpl | 2 +- .../artefact/file/templates/form/filelist.tpl | 14 +-- .../profileinfo/templates/content.tpl | 4 +- .../templates/artefactchooser-element.tpl | 6 +- .../html-artefactchooser-element.tpl | 8 +- .../blocktype/plans/templates/content.tpl | 4 +- .../templates/artefactchooser-element.tpl | 4 +- .../artefact/plans/templates/taskrows.tpl | 37 ++++---- .../templates/artefactchooser-element.tpl | 4 +- .../blocktype/externalfeed/templates/feed.tpl | 45 +++++----- .../groupmembers/templates/groupmembers.tpl | 2 +- .../groupviews/templates/allsubmissions.tpl | 8 +- .../groupviews/templates/groupviews.tpl | 53 +++++------ .../templates/groupviewssection.tpl | 29 ++++--- .../templates/sharedcollections.tpl | 15 ++-- .../groupviews/templates/sharedviews.tpl | 9 +- .../blocktype/inbox/templates/inboxmr.tpl | 15 +++- .../mygroups/templates/mygroupslist.tpl | 11 +-- .../myviews/templates/myviewspaginator.tpl | 7 +- .../navigation/templates/navigation.tpl | 20 +++-- .../blocktype/newviews/templates/newviews.tpl | 26 +++--- .../templates/latestforumposts.tpl | 8 +- .../templates/recentforumposts.tpl | 9 +- .../blocktype/wall/templates/inlineposts.tpl | 2 +- .../interaction/forum/templates/index.tpl | 11 ++- .../interaction/forum/templates/post.tpl | 32 +++---- .../forum/templates/simplepost.tpl | 22 ++--- .../interaction/forum/templates/topic.tpl | 2 +- .../interaction/forum/templates/topics.tpl | 46 +++++----- .../interaction/forum/templates/view.tpl | 75 ++++++++-------- htdocs/theme/raw/sass/_custom.scss | 12 ++- htdocs/theme/raw/sass/_shame.scss | 1 - .../theme/raw/sass/components/_arrow-bar.scss | 4 +- .../raw/sass/components/_artefactchooser.scss | 12 +++ .../theme/raw/sass/components/_btn-group.scss | 44 +++++----- htdocs/theme/raw/sass/components/_btn.scss | 1 + .../theme/raw/sass/components/_indicator.scss | 14 +-- .../raw/sass/components/_list-group.scss | 16 ++++ htdocs/theme/raw/sass/components/_modal.scss | 2 +- .../raw/sass/components/_pagination.scss | 8 +- .../theme/raw/sass/components/_user-icon.scss | 16 +++- htdocs/theme/raw/sass/form/_form-group.scss | 6 ++ htdocs/theme/raw/sass/form/_form.scss | 12 ++- .../theme/raw/sass/form/_site-messages.scss | 11 ++- htdocs/theme/raw/sass/layout/_columns.scss | 14 ++- htdocs/theme/raw/sass/layout/_layout.scss | 20 ++++- .../raw/sass/layout/panel/_panel-body.scss | 2 +- .../raw/sass/layout/panel/_panel-form.scss | 2 +- .../raw/sass/layout/panel/_panel-items.scss | 4 + .../theme/raw/sass/layout/panel/_panel.scss | 6 +- htdocs/theme/raw/sass/lib/_draggable.scss | 5 ++ htdocs/theme/raw/sass/lib/_graph.scss | 2 +- htdocs/theme/raw/sass/lib/_tinymce.scss | 4 +- htdocs/theme/raw/sass/typography/_tables.scss | 6 +- .../raw/sass/typography/_typography.scss | 6 +- htdocs/theme/raw/sass/utilities/_index.scss | 1 + htdocs/theme/raw/templates/admin/index.tpl | 2 +- .../admin/institutionuserstatssummary.tpl | 4 +- .../raw/templates/admin/registersite.tpl | 5 +- .../raw/templates/admin/site/licenses.tpl | 17 ++-- .../theme/raw/templates/admin/site/menu.tpl | 15 ++-- .../theme/raw/templates/admin/statistics.tpl | 2 + htdocs/theme/raw/templates/admin/stats.tpl | 6 +- .../raw/templates/admin/userstatssummary.tpl | 2 +- .../raw/templates/admin/viewstatssummary.tpl | 2 +- .../theme/raw/templates/collection/index.tpl | 8 +- .../raw/templates/collection/views.json.tpl | 8 +- .../theme/raw/templates/collection/views.tpl | 8 +- htdocs/theme/raw/templates/collectionnav.tpl | 9 +- htdocs/theme/raw/templates/form/emaillist.tpl | 6 +- htdocs/theme/raw/templates/group/group.tpl | 33 ++++--- htdocs/theme/raw/templates/group/invite.tpl | 1 - .../templates/group/membersearchresults.tpl | 87 ++++++++----------- .../theme/raw/templates/group/simplegroup.tpl | 12 --- .../theme/raw/templates/group/topicrows.tpl | 6 +- htdocs/theme/raw/templates/group/topics.tpl | 2 +- htdocs/theme/raw/templates/group/view.tpl | 2 +- htdocs/theme/raw/templates/skin/index.tpl | 8 +- htdocs/theme/raw/templates/user/user.tpl | 18 ++-- htdocs/theme/raw/templates/user/userfind.tpl | 32 ++++--- htdocs/theme/raw/templates/user/view.tpl | 8 +- .../raw/templates/view/accesslistrow.tpl | 12 +-- htdocs/theme/raw/templates/view/blocks.tpl | 8 +- htdocs/theme/raw/templates/view/delete.tpl | 2 +- htdocs/theme/raw/templates/view/edit.tpl | 2 +- .../theme/raw/templates/view/groupviews.tpl | 2 +- htdocs/theme/raw/templates/view/share.tpl | 8 +- .../raw/templates/view/sharedviewrows.tpl | 6 +- .../theme/raw/templates/view/sharedviews.tpl | 2 +- htdocs/theme/raw/templates/view/skin.tpl | 6 +- htdocs/theme/raw/templates/view/view.tpl | 4 +- htdocs/user/requestfriendship.php | 2 +- htdocs/view/urls.php | 2 +- test/behat/features/blocktype/myviews.feature | 8 +- .../group/moving_pages_between_groups.feature | 6 +- 128 files changed, 762 insertions(+), 671 deletions(-) create mode 100644 htdocs/theme/raw/sass/components/_artefactchooser.scss delete mode 100644 htdocs/theme/raw/templates/group/simplegroup.tpl diff --git a/htdocs/account/institutions.php b/htdocs/account/institutions.php index f82dffd27d..5f0d10c676 100644 --- a/htdocs/account/institutions.php +++ b/htdocs/account/institutions.php @@ -31,6 +31,7 @@ if (!empty($member)) { $elements[] = array( 'type' => 'submit', 'name' => '_leave_' . $i->institution, + 'class' => 'btn-default', 'confirm' => get_string('reallyleaveinstitution'), 'title' => get_string('youareamemberof', 'mahara', $institutions[$i->institution]->displayname), 'value' => get_string('leaveinstitution') @@ -83,6 +84,7 @@ if (!empty($requested)) { $elements[] = array( 'type' => 'submit', 'name' => '_cancelrequest_' . $i, + 'class' => 'btn-default', 'title' => get_string('youhaverequestedmembershipof', 'mahara', $institutions[$i]->displayname), 'value' => get_string('cancelrequest') diff --git a/htdocs/admin/site/licenses.php b/htdocs/admin/site/licenses.php index 78934d073b..9f8afb18db 100644 --- a/htdocs/admin/site/licenses.php +++ b/htdocs/admin/site/licenses.php @@ -48,5 +48,6 @@ setpageicon($smarty, 'icon-legal'); $smarty->assign('PAGEHEADING', TITLE); $smarty->assign('licenses', $licenses); $smarty->assign('extralicenses', $extralicenses); +$smarty->assign('allowextralicenses', get_config('licenseallowcustom')); $smarty->assign('enabled', get_config('licensemetadata')); $smarty->display('admin/site/licenses.tpl'); diff --git a/htdocs/admin/site/networking.php b/htdocs/admin/site/networking.php index 1456b30d2d..0020e6aa36 100644 --- a/htdocs/admin/site/networking.php +++ b/htdocs/admin/site/networking.php @@ -106,7 +106,7 @@ $networkingform = pieform( 'value' => 'submit' ), 'deletesubmit' => array( - 'class' => 'btn-default', + 'class' => 'btn-default ptm', 'name' => 'submit', // must be called submit so we can access it's value 'type' => 'button', 'usebuttontag' => true, diff --git a/htdocs/admin/users/edit.php b/htdocs/admin/users/edit.php index 4014c9db86..d4d69d45cc 100644 --- a/htdocs/admin/users/edit.php +++ b/htdocs/admin/users/edit.php @@ -600,7 +600,7 @@ if (empty($suspended)) { ), 'reason' => array( 'type' => 'textarea', - 'class' => 'in-modal', + 'class' => 'under-label', 'rows' => 5, 'cols' => 28, 'title' => get_string('reason'), diff --git a/htdocs/artefact/annotation/lib.php b/htdocs/artefact/annotation/lib.php index 7f6afb9efa..3f7500f27a 100644 --- a/htdocs/artefact/annotation/lib.php +++ b/htdocs/artefact/annotation/lib.php @@ -1190,8 +1190,8 @@ class ArtefactTypeAnnotationfeedback extends ArtefactType { 'submit' => array( 'type' => 'button', 'usebuttontag' => true, - 'value' => get_string('delete'), 'class' => 'btn-default', + 'value' => '' . get_string('delete') . '', 'elementtitle' => get_string('delete'), 'confirm' => get_string('reallydeletethisannotationfeedback', 'artefact.annotation'), 'name' => 'delete_annotation_feedback_submit', @@ -1761,7 +1761,8 @@ class ActivityTypeArtefactAnnotationAnnotationfeedback extends ActivityTypePlugi $this->message = strip_tags(str_shorten_html($body, 200, true)); // Seen as things like emaildigest base the message on $this->message // we need to set the language for the $removedbyline here based on first user. - $user = $this->users[0]; + $firstuser = key($this->users); + $user = $this->users[$firstuser]; $lang = (empty($user->lang) || $user->lang == 'default') ? get_config('lang') : $user->lang; // Comment deleted notification diff --git a/htdocs/artefact/blog/blocktype/recentposts/js/recentposts.js b/htdocs/artefact/blog/blocktype/recentposts/js/recentposts.js index b1e6a1afd9..b7acda373d 100644 --- a/htdocs/artefact/blog/blocktype/recentposts/js/recentposts.js +++ b/htdocs/artefact/blog/blocktype/recentposts/js/recentposts.js @@ -1,14 +1,11 @@ function addNewPostShortcut(blockid) { - forEach( - getElementsByTagAndClassName('a', 'btnshortcut', 'blockinstance_' + blockid), - function(a) { - disconnectAll(a); - connect(a, 'onclick', function(e) { - e.stop(); - var p = getFirstParentByTagAndClassName(a, 'div', 'shortcut'); - var blogselect = getFirstElementByTagAndClassName('select','select', p); - window.open(config.wwwroot + 'artefact/blog/post.php?blog=' + blogselect.value,'_blank'); - }); + var addentry = jQuery('#blockinstance_' + blockid + ' .blockinstance-content'); + addentry.find('a').first().click(function(e) { + e.preventDefault(); + var blogselect = addentry.find('select').first().val(); + if (!blogselect) { + blogselect = jQuery(this).find('span').first().attr('id').match( /\d+/); } - ); + window.open(config.wwwroot + 'artefact/blog/post.php?blog=' + blogselect, '_blank'); + }); } diff --git a/htdocs/artefact/blog/lang/en.utf8/artefact.blog.php b/htdocs/artefact/blog/lang/en.utf8/artefact.blog.php index 501c7a313e..9ebdac9242 100644 --- a/htdocs/artefact/blog/lang/en.utf8/artefact.blog.php +++ b/htdocs/artefact/blog/lang/en.utf8/artefact.blog.php @@ -156,7 +156,7 @@ $string['enablemultipleblogstext'] = 'You have one journal. If you would like to $string['hiddenblogsnotification'] = 'Additional journal(s) have been made for you, but your account does not have the multiple journals option activated. You can enable it on the account settings page.'; $string['shortcutaddpost'] = 'Add a new entry to'; -$string['shortcutgo'] = 'Go'; +$string['shortcutadd'] = 'Add'; $string['shortcutnewentry'] = 'New entry'; $string['duplicatedblog'] = 'Duplicated journal'; diff --git a/htdocs/artefact/file/blocktype/html/lib.php b/htdocs/artefact/file/blocktype/html/lib.php index b32f1ccebe..0af67b2983 100644 --- a/htdocs/artefact/file/blocktype/html/lib.php +++ b/htdocs/artefact/file/blocktype/html/lib.php @@ -95,6 +95,7 @@ class PluginBlocktypeHtml extends PluginBlocktype { 'artefacttype' => array('file'), 'filetype' => self::get_allowed_mimetypes(), ); + $element['accept'] = implode(',', self::get_allowed_mimetypes()); return $element; } diff --git a/htdocs/artefact/file/blocktype/internalmedia/lib.php b/htdocs/artefact/file/blocktype/internalmedia/lib.php index 1e6c765702..af28ef06aa 100644 --- a/htdocs/artefact/file/blocktype/internalmedia/lib.php +++ b/htdocs/artefact/file/blocktype/internalmedia/lib.php @@ -128,6 +128,7 @@ class PluginBlocktypeInternalmedia extends PluginBlocktype { 'artefacttype' => array('file', 'audio', 'video'), 'filetype' => self::get_allowed_mimetypes(), ); + $element['accept'] = implode(',', self::get_allowed_mimetypes()); return $element; } @@ -280,7 +281,7 @@ class PluginBlocktypeInternalmedia extends PluginBlocktype { 'allowscriptaccess' => 'never', 'allownetworking' => 'never' ); - $html = '' . hsc($artefact->get('title')) . '
+ $html = '' . hsc($artefact->get('title')) . '
(' . get_string('flashanimation', 'blocktype.file/internalmedia') . ') {/if} - - {if ($editing && $canaddpost)} - - - {str tag='shortcutnewentry' section='artefact.blog'} - - {/if} diff --git a/htdocs/theme/raw/plugintype/artefact/blog/templates/bloglist.tpl b/htdocs/theme/raw/plugintype/artefact/blog/templates/bloglist.tpl index 078676de58..a7fd65ffc3 100644 --- a/htdocs/theme/raw/plugintype/artefact/blog/templates/bloglist.tpl +++ b/htdocs/theme/raw/plugintype/artefact/blog/templates/bloglist.tpl @@ -31,7 +31,7 @@
{if $blog->locked} - {str tag=submittedforassessment section=view} + {str tag=submittedforassessment section=view} {else} diff --git a/htdocs/theme/raw/plugintype/artefact/blog/templates/index.tpl b/htdocs/theme/raw/plugintype/artefact/blog/templates/index.tpl index 3c657ae650..0066606632 100644 --- a/htdocs/theme/raw/plugintype/artefact/blog/templates/index.tpl +++ b/htdocs/theme/raw/plugintype/artefact/blog/templates/index.tpl @@ -7,7 +7,7 @@
{if !$blogs->data} -
{str tag=youhavenoblogs section=artefact.blog}
+

{str tag=youhavenoblogs section=artefact.blog}

{else}
diff --git a/htdocs/theme/raw/plugintype/artefact/blog/templates/viewposts.tpl b/htdocs/theme/raw/plugintype/artefact/blog/templates/viewposts.tpl index bc1a31ef91..596f51c515 100644 --- a/htdocs/theme/raw/plugintype/artefact/blog/templates/viewposts.tpl +++ b/htdocs/theme/raw/plugintype/artefact/blog/templates/viewposts.tpl @@ -17,41 +17,51 @@ {/if}
+
+ {$post->description|clean_html|safe} +
+ {if $post->files} -
+
+ {/if} {if $options.viewid && $post->allowcomments}
diff --git a/htdocs/theme/raw/plugintype/artefact/comment/blocktype/comment/templates/comment.tpl b/htdocs/theme/raw/plugintype/artefact/comment/blocktype/comment/templates/comment.tpl index 47d849e5cf..978a45e150 100644 --- a/htdocs/theme/raw/plugintype/artefact/comment/blocktype/comment/templates/comment.tpl +++ b/htdocs/theme/raw/plugintype/artefact/comment/blocktype/comment/templates/comment.tpl @@ -1,6 +1,6 @@ {if $editing}
- +

{$editing}

{elseif $feedback} {* Do not change the id because it is used by paginator.js *} diff --git a/htdocs/theme/raw/plugintype/artefact/comment/templates/commentlist.tpl b/htdocs/theme/raw/plugintype/artefact/comment/templates/commentlist.tpl index 20c74bfaf7..f9bacd91ce 100644 --- a/htdocs/theme/raw/plugintype/artefact/comment/templates/commentlist.tpl +++ b/htdocs/theme/raw/plugintype/artefact/comment/templates/commentlist.tpl @@ -65,7 +65,7 @@ > {str tag=reply section=artefact.comment} - + {/if}
diff --git a/htdocs/theme/raw/plugintype/artefact/file/templates/form/filelist.tpl b/htdocs/theme/raw/plugintype/artefact/file/templates/form/filelist.tpl index c31951671a..bac0b385b9 100644 --- a/htdocs/theme/raw/plugintype/artefact/file/templates/form/filelist.tpl +++ b/htdocs/theme/raw/plugintype/artefact/file/templates/form/filelist.tpl @@ -35,11 +35,13 @@ {if $file->isparent} {if $file->artefacttype == 'folder'} - - - - {str tag=folder section=artefact.file}:{$displaytitle} - + + + + + {str tag=folder section=artefact.file}:{$displaytitle} + + {/if} {else} {if $editable} @@ -171,7 +173,7 @@ {else}
-

+

{str tag=nofilesfound section=artefact.file}

diff --git a/htdocs/theme/raw/plugintype/artefact/internal/blocktype/profileinfo/templates/content.tpl b/htdocs/theme/raw/plugintype/artefact/internal/blocktype/profileinfo/templates/content.tpl index 98aa35d421..87c4d0ef4d 100644 --- a/htdocs/theme/raw/plugintype/artefact/internal/blocktype/profileinfo/templates/content.tpl +++ b/htdocs/theme/raw/plugintype/artefact/internal/blocktype/profileinfo/templates/content.tpl @@ -9,7 +9,7 @@ {$profileinfo.introduction|clean_html|safe} {/if} {if $profileinfo && (count($profileinfo) != 1 || !$profileinfo.introduction || !$profileinfo.socialprofiles)} -