Commit 51af094b authored by Robert Lyon's avatar Robert Lyon

Bug 1829940: Move 'add placeholder' to float on right

Done in this patch: -
- have the add block button on right
- have text on large screens but only icon on smaller screens

behatnotneeded

Change-Id: I37b6a8e44036d2d9a43b25700c3f1812f94c9a81
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 4d9a5645
......@@ -448,7 +448,7 @@
helper: function(event) {
var original = $(this),
helper = $("<div />").append(original.clone());
helper.find('label span').removeClass('hidden');
helper.children().each(function(index) {
// Set helper cell sizes to match at least the original sizes
$(this).css('min-width', '200px');
......
<p class="content-text lead text-center">{str tag=placeholdertext section=blocktype.placeholder}</p>
\ No newline at end of file
<p class="content-text lead">{str tag=placeholdertext section=blocktype.placeholder}</p>
\ No newline at end of file
......@@ -296,23 +296,20 @@ td.action-list-copy {
}
.title {
white-space: normal;
margin-left: 5px;
display: inline-block;
display: none;
@include media-breakpoint-up(lg) {
display: inline-block;
margin-left: 5px;
}
}
.block-icon {
display: inline-block;
vertical-align: top;
margin-top: 5px;
margin-left: -2px;
font-size: 14px;
.col-collapsed & {
margin-left: 2px;
font-size: 18px;
@include media-breakpoint-up(lg) {
display: none;
}
}
&.btn-accordion {
.btn {
font-size: 13px;
margin-bottom: -1px;
max-width: 100%;
overflow: hidden;
......@@ -338,11 +335,10 @@ td.action-list-copy {
white-space: normal;
vertical-align: middle;
padding: 0;
padding-right: 5px;
padding-top: 3px;
width: auto;
max-width: 85%;
margin-left: 2px;
margin-bottom: 0;
}
}
//page builder collapsible
......
......@@ -19,13 +19,8 @@
}
.col-with-collapse {
@extend .col-lg-10;
@extend .col-sm-9;
.col-collapsed & {
@extend .col-lg-11;
@extend .col-sm-10;
}
@extend .col-lg-11;
@extend .col-sm-10;
}
.col-collapse-offset {
......
......@@ -191,6 +191,9 @@ body.presentation-iframe {
right: -1px;
margin-top: 30px;
z-index: $zindex-fixed;
.btn.first-of-group {
border-top-left-radius: $border-radius;
}
}
}
......
{include file="header.tpl"}
{include file="view/editviewtabs.tpl" selected='share' issiteview=$issiteview}
{include file="view/editviewtabs.tpl" issiteview=$issiteview}
{include file="view/editviewpageactions.tpl" selected='share'}
<div id="accessurl-container">
......
{include file="header.tpl"}
{include file="view/editviewtabs.tpl" selected='content' issiteview=$issiteview}
{include file="view/editviewtabs.tpl" issiteview=$issiteview}
<div class="view-instructions">
<form action="{$formurl}" method="post" class="row">
<input type="submit" name="{$action_name}" id="action-dummy" class="d-none">
......@@ -9,11 +9,6 @@
<input type="hidden" id="category" name="c" value="{$category}">
<input type="hidden" name="sesskey" value="{$SESSKEY}">
<div id="editcontent-sidebar-wrapper">
<div id="editcontent-sidebar">
{include file="view/contenteditor.tpl" selected='content'}
</div>
</div>
<div class="col-with-collapse">
{if $instructions}
<div id="viewinstructions" class="last form-group collapsible-group small-group">
......@@ -37,6 +32,7 @@
</div>
{/if}
</div>
{include file="view/editviewpageactions.tpl" selected='content' ineditor=true}
</form>
</div>
<div class="view-container" selected='content'>
......@@ -47,7 +43,7 @@
<input type="hidden" id="category" name="c" value="{$category}">
<input type="hidden" name="sesskey" value="{$SESSKEY}">
<div class="fullwidth">
<div class="col">
<div id="bottom-pane" data-role="workspace">
<div id="column-container" class="user-page-content">
{$columns|safe}
......@@ -56,7 +52,7 @@
</div>
</form>
<div id="view-return-controls" class="col-collapse-offset col-with-collapse">
<div id="view-return-controls">
{if !$issitetemplate}
<a class="btn btn-secondary" href="{$displaylink}">
{str tag=displayview section=view}
......
......@@ -2,19 +2,15 @@
{if $javascript}
<div class='btn-group-vertical'>
{/if}
{foreach from=$blocktypes item=blocktype}
{* TODO at this point we have now $blocktype.singleonly *}
<a class="blocktype-drag blocktypelink btn btn-secondary hide-title-collapsed text-left" href="#" title="{$blocktype.description}">
<span class="icon icon-arrows-alt icon-sm left move-indicator" role="presentation" aria-hidden="true"></span>
{foreach from=$blocktypes item=blocktype}{strip}
<a class="blocktype-drag blocktypelink btn btn-primary hide-title-collapsed text-left" href="#" title="{$blocktype.title}">
<input type="radio" id="blocktype-list-radio-{$blocktype.name}" class="blocktype-radio" name="blocktype" value="{$blocktype.name}">
{if $blocktype.cssicon}{*
*}<span class="icon icon-{$blocktype.cssicon} {$blocktype.cssicontype} block-icon" title="{$blocktype.title}" role="presentation" aria-hidden="true"></span>{*
*}{else}{*
*}<img class="icon block-icon" src="{$blocktype.thumbnail_path}" title="{$blocktype.description}" alt="{$blocktype.description}" width="14" height="14">{*
*}{/if}
<label for="blocktype-list-radio-{$blocktype.name}" class="blocktypetitle title">{$blocktype.title}</label>
<span class="icon icon-{$blocktype.cssicon} {$blocktype.cssicontype} icon-lg" title="{$blocktype.title}" role="presentation" aria-hidden="true"></span>
<label for="blocktype-list-radio-{$blocktype.name}" class="blocktypetitle title">
<span class="hidden">{$blocktype.title}</span>
</label>
<span class="sr-only">({$blocktype.description})</span>
</a>
</a>{/strip}
{/foreach}
{if $javascript}
</div>
......
......@@ -2,7 +2,7 @@
<div id="content-editor-header" class="sr-only">
<div>{str tag=addcontent section=view}</div>
</div>
<div id="content-editor-foldable" class="btn-group-vertical btn-accordion fullwidth">
<div id="content-editor-foldable" class="btn-accordion">
{$placeholder_button|safe}
</div>
</div>
{include file="header.tpl"}
{include file="view/editviewtabs.tpl" selected='title' issiteview=$issiteview}
{include file="view/editviewtabs.tpl" issiteview=$issiteview}
{include file="view/editviewpageactions.tpl" selected='title'}
{if $ADMIN || $INSTITUTIONALADMIN}
<div class="row">
......
{include file="header.tpl"}
{include file="view/editviewtabs.tpl" selected='editlayout' issiteview=$issiteview}
{include file="view/editviewtabs.tpl"issiteview=$issiteview}
{include file="view/editviewpageactions.tpl" selected='editlayout'}
<!-- Layout -->
{$form|safe}
......
<div class="pageactions" id="toolbar-buttons">
<div class="btn-group-vertical in-editor">
{if $ineditor}
{include file="view/contenteditor.tpl" selected='content'}
<span>&nbsp;</span>
{/if}
<a class="btn btn-secondary first-of-group editviews editlayout {if $selected == 'layout' or $selected == 'editlayout'}active{/if}"
href="{$WWWROOT}view/editlayout.php?id={$viewid}"
title="{if $edittitle || $canuseskins}{str tag=settings section=view}{else}{str tag=editlayout section=view}{/if}">
<span class="icon icon-lg icon-cogs"></span>
<span class="btn-title sr-only">{if ($edittitle || $canuseskins) }{str tag=settings section=view}{else}{str tag=editlayout section=view}{/if}</span>
</a>
<a class="btn btn-secondary editviews editcontent {if $selected == 'content'}active{/if}" href="{$WWWROOT}view/blocks.php?id={$viewid}" title="{str tag=editcontent1 section=view}">
<span class="icon icon-lg icon-pencil-alt" aria-hidden="true" role="presentation"></span>
<span class="btn-title sr-only">{str tag=editcontent1 section=view}</span>
</a>
{if !$accesssuspended && ($edittitle || $viewtype == 'share') && !$issitetemplate}
<a class="btn btn-secondary editviews editshare {if $selected == 'share'}active{/if}" href="{$WWWROOT}view/accessurl.php?id={$viewid}{if $collectionid}&collection={$collectionid}{/if}" title="{str tag=shareview1 section=view}">
<span class="icon icon-lg icon-unlock" aria-hidden="true" role="presentation"></span>
<span class="btn-title sr-only">{str tag=shareview1 section=view}</span>
</a>
{/if}
</div>
</div>
\ No newline at end of file
<div id="toolbar-buttons" class="btn-group btn-toolbar btn-group-top">
<a class="btn btn-secondary editviews editlayout {if $selected == 'layout' or $selected == 'editlayout'}active{/if}"
href="{$WWWROOT}view/editlayout.php?id={$viewid}"
title="{if $edittitle || $canuseskins}{str tag=settings section=view}{else}{str tag=editlayout section=view}{/if}">
<span class="icon icon-lg icon-cogs"></span>
<span class="btn-title">{if ($edittitle || $canuseskins) }{str tag=settings section=view}{else}{str tag=editlayout section=view}{/if}</span>
</a>
<a class="btn btn-secondary editviews editcontent {if $selected == 'content'}active{/if}" href="{$WWWROOT}view/blocks.php?id={$viewid}" title="{str tag=editcontent1 section=view}">
<span class="icon icon-lg icon-pencil-alt" aria-hidden="true" role="presentation"></span>
<span class="btn-title">{str tag=editcontent1 section=view}</span>
</a>
{if !$accesssuspended && ($edittitle || $viewtype == 'share') && !$issitetemplate}
<a class="btn btn-secondary editviews editshare {if $selected == 'share'}active{/if}" href="{$WWWROOT}view/accessurl.php?id={$viewid}{if $collectionid}&collection={$collectionid}{/if}" title="{str tag=shareview1 section=view}">
<span class="icon icon-lg icon-unlock" aria-hidden="true" role="presentation"></span>
<span class="btn-title">{str tag=shareview1 section=view}</span>
</a>
{/if}
</div>
{if !$issitetemplate}
<div id="view-wizard-controls" class="with-heading">
<a href="{$displaylink}" id="display_page" class="">
......
{include file="header.tpl"}
{include file="view/editviewtabs.tpl" selected='layout' issiteview=$issiteview}
{include file="view/editviewtabs.tpl" issiteview=$issiteview}
{include file="view/editviewpageactions.tpl" selected='layout'}
{$form|safe}
......
......@@ -201,7 +201,7 @@ $placeholderbutton = '';
if ($placeholderblock) {
// it's active so make the button with different display title
$placeholderblock[0]['title'] = get_string('addnewblock', 'view');
$placeholderblock[0]['cssicon'] = '_';
$placeholderblock[0]['cssicon'] = 'plus';
$smarty = smarty_core();
$smarty->assign('blocktypes', $placeholderblock);
$smarty->assign('javascript', false);
......
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