Commit 17894563 authored by Pat Kira's avatar Pat Kira
Browse files

Block detail links - comment, add comment, detail links (BUG 1465107)

Minor fixes - style login panel,
display block without content,
remove some styling on block heading,
remove get link function for wall block it was duplicated
Style SSO and Persona login buttons

behatnotneeded: styling only

Task 22787, 23057, 22661

Change-Id: I280947a17727eb1518551bfbb8ad05a0fb2fea80
parent 92e11f69
......@@ -239,7 +239,7 @@ class PluginAuthBrowserid extends PluginAuth {
public static function login_form_elements() {
return array(
'loginbrowserid' => array(
'value' => '<div class="login-externallink"><a class="persona-button" href="javascript:window.browserid_login()"><span>' . get_string('login', 'auth.browserid') . '</span></a></div>'
'value' => '<div class="login-externallink"><a class="persona-button btn btn-success btn-xs" href="javascript:window.browserid_login()"><span>' . get_string('login', 'auth.browserid') . '</span></a></div>'
)
);
}
......
......@@ -1252,7 +1252,6 @@ function auth_get_login_form_elements() {
'type' => 'text',
'class' => 'fullwidth',
'title' => get_string('username') . ':',
'description' => get_string('usernamedescription'),
'defaultvalue' => (isset($_POST['login_username'])) ? $_POST['login_username'] : '',
'rules' => array(
'required' => true
......@@ -1262,7 +1261,6 @@ function auth_get_login_form_elements() {
'type' => 'password',
'class' => 'fullwidth',
'title' => get_string('password') . ':',
'description' => get_string('passworddescription'),
'defaultvalue' => '',
'rules' => array(
'required' => true
......@@ -1270,7 +1268,7 @@ function auth_get_login_form_elements() {
),
'submit' => array(
'type' => 'submit',
'class' => 'btn-success btn-block mts mbl',
'class' => 'btn-success btn-block',
'value' => get_string('login')
),
'register' => array(
......
......@@ -392,7 +392,7 @@ function saml_auth_generate_login_form() {
)
),
'submit' => array(
'class' => 'btn-success btn-block mts mbl',
'class' => 'btn-success btn-block',
'type' => 'submit',
'value' => get_string('login')
),
......
......@@ -606,7 +606,7 @@ class PluginAuthSaml extends PluginAuth {
public static function login_form_elements() {
$elements = array(
'loginsaml' => array(
'value' => '<div class="login-externallink"><a class="btn" href="' . get_config('wwwroot') . 'auth/saml/index.php">' . get_string('login', 'auth.saml') . '</a></div>'
'value' => '<div class="login-externallink"><a class="btn btn-success btn-xs" href="' . get_config('wwwroot') . 'auth/saml/index.php">' . get_string('login', 'auth.saml') . '</a></div>'
)
);
return $elements;
......
......@@ -89,7 +89,7 @@ abstract class PluginBlocktype extends Plugin implements IPluginBlocktype {
}
/**
* Optionally specify a place for a block to link to. This will be rendered in the block header
* Optionally specify a place for a block to link to. This will be rendered in the block header
* in templates
* @var BlockInstance
* @return String or false
......@@ -984,7 +984,7 @@ class BlockInstance {
$smarty->assign('feedlink', call_static_method($classname, 'feed_url', $this));
}
$smarty->assign('link', call_static_method($classname, 'get_link', $this));
......
......@@ -37,11 +37,6 @@ class PluginBlocktypeWall extends SystemBlocktype {
return array('profile');
}
public static function get_link(BlockInstance $instance) {
$data = get_config('wwwroot') . 'blocktype/wall/wall.php?id=' . $instance->get('id');
return sanitize_url($data);
}
public static function render_instance(BlockInstance $instance, $editing=false) {
global $USER;
$owner = $instance->get_view()->get('owner');
......
This diff is collapsed.
......@@ -12,10 +12,10 @@
.panel {
border-radius: 0;
}
> .panel-heading, .panel-heading-nested {
border-bottom: 0;
border-bottom: 0;
> a.outer-link {
border-bottom: 2px solid $mahara-dark-brown;
}
......
......@@ -30,19 +30,6 @@ jQuery(function($) {
}
}
function hideEmptyBlocks() {
var blocks = $('.block[data-blocktype-noajax]'),
i;
for (i = 0; i < blocks.length; i = i + 1){
if($.trim($(blocks[i]).html()).length < 1) {
$(blocks[i]).closest('.panel').addClass('hidden');
}
}
}
// hack to fix issue with mochi kit js in inbox blocks
$('.mochi-collapse').on('click', function(){
$(window).trigger('colresize');
......@@ -53,6 +40,5 @@ jQuery(function($) {
});
ajaxBlocks();
hideEmptyBlocks();
});
......@@ -6,7 +6,8 @@
{$annotationfeedback->pagination|safe}
{if $allowfeedback}
<div class="annotationfeedback">
<a id="feedback_{$blockid}" class="placeannotationfeedback" data-toggle="modal-docked" data-target="#annotation_feedback_{$blockid}" href="#">
<a id="feedback_{$blockid}" class="placeannotationfeedback link-blocktype last" data-toggle="modal-docked" data-target="#annotation_feedback_{$blockid}" href="#">
<span class="icon icon-plus"></span>
{str tag=placeannotationfeedback section=artefact.annotation}
</a>
</div>
......
......@@ -62,17 +62,18 @@
{if !$editing}
{if $post->commentcount != null}
<div class="comments ptm pbl">
<div class="comments">
{if $post->commentcount > 0}
<a id="block_0{$post->id}{$blockid}" class="commentlink" data-toggle="modal-docked" data-target="#feedbacktable_0{$post->id}{$blockid}" href="#">
{str tag=Comments section=artefact.comment} ({$post->commentcount})
</a>
{else}
{if $post->allowcomments}
<a class="addcomment" href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&view={$view}">
{str tag=addcomment section=artefact.comment}
</a>
{/if}
<a id="block_0{$post->id}{$blockid}" class="commentlink link-blocktype" data-toggle="modal-docked" data-target="#feedbacktable_0{$post->id}{$blockid}" href="#">
<span class="icon icon-comments"></span>
{str tag=Comments section=artefact.comment} ({$post->commentcount})
</a>
{/if}
{if $post->allowcomments}
<a class="addcomment link-blocktype" href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&view={$view}">
<span class="icon icon-arrow-circle-right"></span>
{str tag=addcomment section=artefact.comment}
</a>
{/if}
</div>
<div id="feedbacktable_0{$post->id}{$blockid}" class="feedbacktable modal modal-docked">
......
......@@ -11,18 +11,19 @@
{/if}
</div>
<div id="postlist{if $blockid}_{$blockid}{/if}" class="postlist fullwidth list-group">
{$posts.tablerows|safe}
</div>
{if $posts.pagination}
<div id="blogpost_page_container{if $blockid}_{$blockid}{/if}" class="hidden center">{$posts.pagination|safe}</div>
{/if}
{if $license}
<div class="bloglicense">
{$license|safe}
</div>
{if $posts.tablerows}
<div id="postlist{if $blockid}_{$blockid}{/if}" class="postlist fullwidth list-group">
{$posts.tablerows|safe}
</div>
{if $posts.pagination}
<div id="blogpost_page_container{if $blockid}_{$blockid}{/if}" class="hidden center">{$posts.pagination|safe}</div>
{/if}
{if $license}
<div class="bloglicense">
{$license|safe}
</div>
{/if}
{/if}
{if $posts.pagination_js}
<script>
addLoadEvent(function() {literal}{{/literal}
......
......@@ -54,17 +54,18 @@
</div>
{if $options.viewid && $post->allowcomments}
<div class="comments ptm pbl">
<div class="comments">
{if $post->commentcount > 0}
<a id="blockpost_{$post->id}" class="commentlink" data-toggle="modal-docked" data-target="#feedbacktable_0{$post->id}{$options.blockid}" href="#">
<a id="blockpost_{$post->id}" class="commentlink link-blocktype" data-toggle="modal-docked" data-target="#feedbacktable_0{$post->id}{$options.blockid}" href="#">
<span class="icon icon-comments"></span>
{str tag=Comments section=artefact.comment} ({$post->commentcount})
</a>
{else}
{if $post->allowcomments}
<a class="addcomment" href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&view={$options.viewid}">
{str tag=addcomment section=artefact.comment}
</a>
{/if}
{/if}
{if $post->allowcomments}
<a class="addcomment link-blocktype" href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&view={$options.viewid}">
<span class="icon icon-arrow-circle-right"></span>
{str tag=addcomment section=artefact.comment}
</a>
{/if}
</div>
<div class="feedback modal modal-docked" id="feedbacktable_0{$post->id}{$options.blockid}">
......
......@@ -9,7 +9,8 @@
</div>
{$feedback->pagination|safe}
{if $enablecomments}
<a id="add_feedback_link" class="feedback" href="#" data-toggle="modal-docked" data-target="#feedback-form">
<a id="add_feedback_link" class="feedback link-blocktype last" href="#" data-toggle="modal-docked" data-target="#feedback-form">
<span class="icon icon-plus"></span>
{str tag=addcomment section=artefact.comment}
</a>
{/if}
......
......@@ -42,6 +42,10 @@
{/foreach}
</div>
{if $desiredtypes}
<a class="panel-footer" href="{$WWWROOT}account/activity/index.php?type={$desiredtypes}">{str tag=More section=blocktype.inbox} <span class="icon icon-arrow-circle-right mls pull-right"></span></a>
<div class="artefact-detail-link">
<a class="link-blocktype last" href="{$WWWROOT}account/activity/index.php?type={$desiredtypes}">
<span class="icon icon-arrow-circle-right"></span>
{str tag=More section=blocktype.inbox}</a>
</div>
{/if}
{/if}
......@@ -28,15 +28,12 @@
</a>
</div>
{/if}*}
</div>
{/foreach}
{/if}
</div>
{if !$wholewall}
<a class="panel-footer" href="{$WWWROOT}blocktype/wall/wall.php?id={$instanceid}">
{str tag='wholewall' section='blocktype.wall'}
<span class="icon icon-arrow-circle-right mls pull-right"></span>
</a>
{/if}
\ No newline at end of file
<a href="{$WWWROOT}blocktype/wall/wall.php?id={$instanceid}" class="detail-link link-blocktype"><span class="icon icon-arrow-circle-right"></span> {str tag='wholewall' section='blocktype.wall'}</a>
{/if}
......@@ -192,3 +192,8 @@
padding: 0;
border-bottom: 0 none;
}
// Login panel
.login-externallink {
display: inline-block;
}
......@@ -48,7 +48,8 @@
}
.sidebar-content {
.sidebar,
.login-panel {
.errmsg {
margin-left: 0;
}
......
......@@ -10,8 +10,9 @@
}
}
}
.sidebar & .form-group {
padding: 0;
.sidebar & .form-group,
.login-panel & .form-group {
padding: 8px 0 8px 0;
}
.form-group.login{
padding: 0;
......@@ -22,6 +23,6 @@
> .panel-footer,
form .panel-footer {
clear:both;
margin: 15px -15px -16px; //alter padding for panel footers inside panel-body (needed for some forms) c.f. login form
margin: 15px -15px -15px; //alter padding for panel footers inside panel-body (needed for some forms) c.f. login form
}
}
......@@ -11,9 +11,7 @@
font-family: $font-family-serif;
}
> .panel-heading, .panel-heading-nested {
border-left: 4px solid $panel-secondary-border;
background-color: $panel-secondary-heading-bg;
border-bottom: 1px solid $panel-default-border;
border-bottom: 2px solid $panel-default-border;
padding-left: 8px;
padding-right: 8px;
......
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