Commit a8ce0379 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Minor styling fixes (bug: 1465107)"

parents d1c6ae24 df228e7d
......@@ -534,7 +534,7 @@ if ($institution || $add) {
$elements['lockedfields'] = array(
'type' => 'fieldset',
'class' => 'last',
'class' => 'last with-formgroup',
'legend' => get_string('Lockedfields', 'admin'),
'collapsible' => true,
'collapsed' => true,
......
......@@ -525,20 +525,21 @@ class ArtefactTypeBlog extends ArtefactType {
return pieform(array(
'name' => 'delete_' . $id,
'successcallback' => 'delete_blog_submit',
'renderer' => 'oneline',
'renderer' => 'div',
'class' => 'form-as-button pull-left btn-group-item',
'elements' => array(
'delete' => array(
'type' => 'hidden',
'value' => $id,
),
'submit' => array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn-default btn-sm',
'class' => 'btn-default btn-sm last',
'alt' => get_string('deletespecific', 'mahara', $title),
'elementtitle' => get_string('delete'),
'confirm' => $confirm,
'value' => '<span class="icon icon-trash icon-lg text-danger left"></span> ' .get_string('delete'),
'value' => '<span class="icon icon-trash icon-lg text-danger"></span><span class="sr-only">' . get_string('delete') . '</span>',
),
'delete' => array(
'type' => 'hidden',
'value' => $id,
),
),
));
......@@ -1156,7 +1157,7 @@ class ArtefactTypeBlogPost extends ArtefactType {
'class' => 'btn-default btn-sm',
'elementtitle' => get_string('delete'),
'confirm' => get_string('deleteblogpost?', 'artefact.blog'),
'value' => '<span class="icon icon-trash icon-lg text-danger"></span><span class="btn-title">' .get_string('delete') . '</span>',
'value' => '<span class="icon icon-trash icon-lg text-danger"></span><span class="sr-only">' .get_string('delete') . '</span>',
),
),
));
......
......@@ -1010,7 +1010,7 @@ class ArtefactTypeComment extends ArtefactType {
return array(
'name' => 'delete_comment',
'renderer' => 'div',
'class' => 'form-as-button pull-left delete-comment btn-group-items',
'class' => 'form-as-button pull-left delete-comment btn-group-item',
'elements' => array(
'comment' => array('type' => 'hidden', 'value' => $id),
'submit' => array(
......
......@@ -218,7 +218,7 @@ function FileBrowser(idprefix, folderid, config, globalconfig) {
this.callback_feedback = function (data) {
var infoclass = 'info';
if (data.problem) {
infoclass = 'warning';
infoclass = 'active';
}
else if (data.error) {
infoclass = 'error';
......@@ -666,11 +666,12 @@ function FileBrowser(idprefix, folderid, config, globalconfig) {
// remove visual selection if this is for selecting 1 file
if (self.config.selectone) {
for(j = 0; j < elem.length; j = j + 1){
removeElementClass(elem[j], 'warning');
removeElementClass(elem[j], 'active');
}
}
addElementClass(this, 'warning');
removeElementClass(this, 'warning');
addElementClass(this, 'active');
if (!self.selecteddata[id]) {
self.add_to_selected_list(id);
......@@ -728,7 +729,7 @@ function FileBrowser(idprefix, folderid, config, globalconfig) {
};
if ($(self.id + '_select_' + id)) {
addElementClass('file:' + id, 'warning');
addElementClass('file:' + id, 'active');
}
if (self.filedata[id].tags) {
self.selecteddata[id].tags = self.filedata[id].tags;
......@@ -791,7 +792,7 @@ function FileBrowser(idprefix, folderid, config, globalconfig) {
var rowbutton = getFirstElementByTagAndClassName('button', 'button', r);
var rowid = rowbutton.name.replace(/.*_unselect\[(\d+)\]$/, '$1');
if (typeof(self.selecteddata[rowid]) != 'undefined') {
setNodeAttribute(r, 'class', 'r' + rcount % 2 + ' warning');
setNodeAttribute(r, 'class', 'active');
removeElementClass(r, 'hidden');
rcount ++;
}
......@@ -846,7 +847,7 @@ function FileBrowser(idprefix, folderid, config, globalconfig) {
var rowbutton = getFirstElementByTagAndClassName('button', 'button', r);
var rowid = rowbutton.name.replace(/.*_unselect\[(\d+)\]$/, '$1');
if (typeof(self.selecteddata[rowid]) != 'undefined') {
setNodeAttribute(r, 'class', 'r' + rcount % 2 + ' warning');
setNodeAttribute(r, 'class', 'active');
removeElementClass(r, 'hidden');
rcount ++;
}
......@@ -863,7 +864,7 @@ function FileBrowser(idprefix, folderid, config, globalconfig) {
removeElementClass(self.id + '_empty_selectlist', 'hidden');
}
if ($(self.id + '_select_' + id)) {
removeElementClass('file:' + id, 'warning');
removeElementClass('file:' + id, 'active');
}
return false;
}
......
......@@ -1811,6 +1811,7 @@ class PluginAuthLdap extends PluginAuth {
'syncuserscronset' => array(
'type' => 'fieldset',
'legend' => get_string('syncuserssettings', 'auth.ldap'),
'class' => 'with-formgroup',
'collapsible' => true,
'collapsed' => (!self::$default_config['syncuserscron']),
'elements' => array(
......@@ -1851,6 +1852,7 @@ class PluginAuthLdap extends PluginAuth {
),
'syncgroupscronset' => array(
'type' => 'fieldset',
'class' => 'last',
'legend' => get_string('syncgroupssettings', 'auth.ldap'),
'collapsible' => true,
'collapsed' => (!self::$default_config['syncgroupscron']),
......
......@@ -1427,7 +1427,7 @@ function activate_plugin_form($plugintype, $plugin) {
'renderer' => 'div',
'elementclasses' => false,
'successcallback' => 'activate_plugin_submit',
'class' => 'form-inline form-as-button pull-left last btn-group-items',
'class' => 'form-inline form-as-button pull-left last btn-group-item',
'jsform' => false,
'action' => get_config('wwwroot') . 'admin/extensions/pluginconfig.php',
'elements' => array(
......
......@@ -27,17 +27,15 @@
<span class="icon icon-plus icon-lg left"></span>
{str tag=addpost section=artefact.blog}
</a>
<div class="pull-right">
<div class="btn-group pull-right">
{if $blog->locked}
<span class="text-small">{str tag=submittedforassessment section=view}</span>
{else}
<a href="{$WWWROOT}artefact/blog/settings/index.php?id={$blog->id}" title="{str(tag=settingsspecific arg1=$blog->title)|escape:html|safe}" class="btn btn-default btn-sm">
<span class="icon icon-pencil icon-lg left"></span>
{str tag=edit}
<a href="{$WWWROOT}artefact/blog/settings/index.php?id={$blog->id}" title="{str(tag=settingsspecific arg1=$blog->title)|escape:html|safe}" class="btn btn-default btn-sm btn-group-item">
<span class="icon icon-pencil icon-lg"></span>
<span class="sr-only">{str tag=edit}</span>
</a>
<span class="control">
{$blog->deleteform|safe}
</span>
{/if}
</div>
</div>
......
......@@ -31,9 +31,7 @@
<input type="hidden" name="id" value="{$post->id}">
<button type="submit" class="submit btn btn-default btn-sm" title="{str(tag=edit)|escape:html|safe}">
<span class="icon icon-pencil icon-lg"></span>
<span class="btn-title">
{str(tag=edit)|escape:html|safe}
</span>
<span class="sr-only">{str(tag=edit)|escape:html|safe}</span>
</button>
</form>
{$post->delete|safe}
......@@ -80,7 +78,7 @@
{if $file->icon}
<img src="{$file->icon}" alt="" class="file-icon">
{else}
<span class="icon icon-{$file->artefacttype} icon-lg text-default"></span>
<span class="icon icon-{$file->artefacttype} icon-lg text-default left"></span>
{/if}
<span class="file-title">{$file->title|truncate:40}</span>
<span class="file-size">
......
......@@ -45,7 +45,7 @@
<div class="btn-group btn-group-top comment-item-buttons">
{if !$onview}
{if $item->canedit}
<a href="{$WWWROOT}artefact/comment/edit.php?id={$item->id}&amp;view={$viewid}" class="btn btn-default btn-group-items form-as-button pull-left">
<a href="{$WWWROOT}artefact/comment/edit.php?id={$item->id}&amp;view={$viewid}" class="btn btn-default btn-group-item form-as-button pull-left">
<span class="icon icon-pencil icon-lg"></span>
<span class="sr-only">{str tag=edit}</span>
</a>
......@@ -55,7 +55,7 @@
{$item->deleteform|safe}
{/if}
{if $item->canreply}
<button class="btn btn-default pull-left commentreplyto btn-group-items js-reply" id="commentreplyto{$item->id}" title="{str tag=reply section=artefact.comment}" data-replyto="{$item->id}" data-canprivatereply="{$item->canprivatereply}" data-canpublicreply="{$item->canpublicreply}">
<button class="btn btn-default pull-left commentreplyto btn-group-item js-reply" id="commentreplyto{$item->id}" title="{str tag=reply section=artefact.comment}" data-replyto="{$item->id}" data-canprivatereply="{$item->canprivatereply}" data-canpublicreply="{$item->canpublicreply}">
<span class="icon icon-reply icon-lg"></span>
<span class="sr-only">{str tag=reply section=artefact.comment}</span>
</button>
......
......@@ -21,15 +21,15 @@
<tbody>
{foreach from=$filelist item=file}
{if !$publishing || !$file->permissions || $file->can_republish}
{assign var=publishable value=1}
{else}
{assign var=publishable value=0}
{/if}
{if !$publishing || !$file->permissions || $file->can_republish}
{assign var=publishable value=1}
{else}
{assign var=publishable value=0}
{/if}
<tr id="file:{$file->id}" class="file-item {if $file->isparent} parentfolder{/if}{if $highlight && $highlight == $file->id} warning{/if}{if $file->artefacttype == 'folder'} folder{else}{if !$publishable } disabled {/if}{if $file->artefacttype == 'profileicon'} profileicon{/if}{/if}{if $edit == $file->id} hidden{/if}{if $selectable && ($file->artefacttype != 'folder' || $selectfolders) && $publishable && !$file->isparent} js-file-select {else} no-hover{/if}" {if $selectable && ($file->artefacttype != 'folder' || $selectfolders) && $publishable && !$file->isparent} data-id="{$file->id}" data-select="select-file" {/if} {if !$publishable && $file->artefacttype != 'folder'} title="{str tag=notpublishable section=artefact.file}"{/if}>
{assign var=displaytitle value=$file->title|safe}
<tr id="file:{$file->id}" class="file-item {if $file->isparent} parentfolder{/if}{if $highlight && $highlight == $file->id} active{/if}{if $file->artefacttype == 'folder'} folder{else}{if !$publishable } disabled {/if}{if $file->artefacttype == 'profileicon'} profileicon{/if}{/if}{if $edit == $file->id} hidden{/if}{if $selectable && ($file->artefacttype != 'folder' || $selectfolders) && $publishable && !$file->isparent} js-file-select {else} no-hover{/if}{if $file->locked} warning{/if}" {if $selectable && ($file->artefacttype != 'folder' || $selectfolders) && $publishable && !$file->isparent} data-id="{$file->id}" data-select="select-file" {/if} {if !$publishable && $file->artefacttype != 'folder'} title="{str tag=notpublishable section=artefact.file}"{/if}>
{assign var=displaytitle value=$file->title|safe}
<td class="icon-cell">
{if $file->isparent}
......
......@@ -7,7 +7,7 @@
<tbody>
{foreach from=$selectedlist item=file}
{assign var=displaytitle value=$file->title|str_shorten_text:34|safe}
<tr class="{cycle values='r0,r1'} warning {if $highlight && $highlight == $file->id} highlight-file{/if}">
<tr class="active{if $highlight && $highlight == $file->id} highlight-file{/if}">
<td class="icon-container">
{if $file->artefacttype !== 'image'}
<span class="icon icon-{$file->artefacttype} icon-lg"></span>
......
{include file="header.tpl"}
<ul class="nav nav-tabs">
{foreach from=$navtabs item=item}
<li class="{if $item.class}{$item.class} {/if}{if $item.selected} active{/if}" role="presentation">
<li class="{if $item.class}{$item.class} hidden{/if} {if $item.selected} active{/if}" role="presentation">
<a href="{$WWWROOT}{$item.url}#profileform_{$item.page}_container">
{$item.title}
<span class="accessible-hidden sr-only">({str tag=tab}{if $item.selected} {str tag=selected}{/if})</span>
......
{if $rows}
<div class="text-right">
<a class="btn btn-default" href="{$WWWROOT}artefact/internal/socialprofile.php">
<span class="icon icon-lg icon-plus left"></span>
......@@ -54,4 +55,12 @@
</tbody>
</table>
</div>
{else}
<p class="no-results">
<a href="{$WWWROOT}artefact/internal/socialprofile.php">
<span class="icon icon-plus left"></span>
{str tag=newsocialprofile section=artefact.internal}
</a>
</p>
{/if}
{$pagination.html|safe}
......@@ -28,7 +28,9 @@
{if $n->description != ''}
{$n->description|clean_html|safe}
{else}
{str tag=nodescription section=artefact.resume}
<p class="no-results-small">
{str tag=nodescription section=artefact.resume}
</p>
{/if}
</div>
{if $n->files}
......
......@@ -25,11 +25,13 @@
</a>
{/if}
</h3>
<div class="panel-body flush">
<div class="panel-body">
{if $n->description != ''}
{$n->description|clean_html|safe}
{else}
{str tag=nodescription section=artefact.resume}
<p class="no-results-small">
{str tag=nodescription section=artefact.resume}
</p>
{/if}
</div>
......
......@@ -10,7 +10,7 @@
{if $view.group}
<a href="{group_homepage_url($view.groupdata)}" class="text-success text-small">
{$view.sharedby}
</a>,
</a>
{elseif $view.owner}
{if $view.anonymous}
{if $view.staff_or_admin}
......@@ -18,21 +18,21 @@
{assign var='realauthorlink' value=profile_url($view.user)}
{/if}
{assign var='author' value=get_string('anonymoususer')}
{include file=author.tpl},
{include file=author.tpl}
{else}
<a href="{profile_url($view.user)}" class="text-success text-small">
{$view.sharedby}
</a>,
</a>
{/if}
{else}
{$view.sharedby}
{/if}
</span>
<span class="postedon text-small text-midtone">
<div class="detail text-small">
{if $view.mtime == $view.ctime}{str tag=Created}{else}{str tag=Updated}{/if}
{$view.mtime|strtotime|format_date: 'strftimedate'}
</span>
</div>
{/if}
{if $view.description}
......
......@@ -267,3 +267,16 @@
.objectionable-message {
padding: 0 0 10px 0;
}
// Other social media input
#editprofileform_profiletype_other {
@extend .form-control;
width: 250px !important;
margin-top: 10px;
@media (min-width: $screen-xs-min) {
margin-left: 10px;
}
@media (min-width: $screen-sm-min) {
margin-top: 0;
}
}
......@@ -28,13 +28,12 @@
}
// Btn-group works when there are multiple elements eg a, form, button
.btn-group-items:not(:first-child) {
.btn-group-item:not(:first-child) {
margin-left: -1px;
}
.btn-group-items {
.btn-group-item {
&.btn,
.btn {
@include border-right-radius($border-radius-base);
border-right-width: 1px !important; // Overriding standard styling above
padding-top: 3px !important; // Override standard btn padding
}
......
......@@ -14,7 +14,7 @@
display: inline-block;
margin:0;
padding:0;
line-height: 14px;
line-height: 12px;
height: 17px;
vertical-align: middle;
}
......
......@@ -401,7 +401,7 @@
.form-control {
display: inline-block;
@media (min-width: $screen-sm-min) {
width: 420px;
width: 370px;
max-width: 85%;
.columns3 &,
.form-inline & {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment