Commit 9a9eb5c8 authored by Pat Kira's avatar Pat Kira Committed by Robert Lyon
Browse files

Style import portfolio page (Bug 1465107)

behatnotneeded: styling only

Change-Id: I898fdda527eee910974cbf1472016d0127c8182d
parent 9f5e3119
...@@ -273,10 +273,11 @@ class PluginImportLeap extends PluginImport { ...@@ -273,10 +273,11 @@ class PluginImportLeap extends PluginImport {
} }
// core render for views // core render for views
$html .= self::render_import_entry_requests(); $html .= self::render_import_entry_requests();
$html .= ' $html .=
<input type="hidden" value="' . DOIMPORT_ACT . '" name="action"> '<div class="submitcancel form-group">'.
<input type="submit" value="' . get_string('Import', 'import') . '" name="import_submit" id="import_submit" class="submitcancel submit"> '<input type="hidden" value="' . DOIMPORT_ACT . '" name="action">
<input type="submit" value="' . get_string('cancel') . '" name="cancel_import_submit" id="cancel_import_submit" class="submitcancel cancel"> <input type="submit" value="' . get_string('Import', 'import') . '" name="import_submit" id="import_submit" class="btn btn-primary submitcancel submit">
<input type="submit" value="' . get_string('cancel') . '" name="cancel_import_submit" id="cancel_import_submit" class="btn-primary submitcancel cancel"></div>
</form>'; </form>';
return $html; return $html;
} }
......
{if count($entryannotations)} {if count($entryannotations)}
<div class="section fullwidth"> <div class="section-import">
<h2>{str tag=Annotation section=artefact.annotation}</h2> <h2>{str tag=Annotation section=artefact.annotation}</h2>
</div> {foreach from=$entryannotations item=annotation}
{foreach from=$entryannotations item=annotation} <div class="list-group-item">
<div class="{cycle name=rows values='r0,r1'} listrow"> <div id="entryannotation" class="row">
<div id="entryannotation" class="indent1"> <div class="col-md-8">
<div class="importcolumn importcolumn1"> <h3 class="title list-group-item-heading">
<h3 class="title"> {$annotation.title|str_shorten_text:80:true}
{if $annotation.description}<a class="annotationtitle hidden" href="" id="{$annotation.id}">{/if} </h3>
{$annotation.title|str_shorten_text:80:true} <div id="{$annotation.id}_desc" class="detail">
{if $annotation.description}</a>{/if} {$annotation.description|clean_html|safe}
</h3>
<div id="{$annotation.id}_desc" class="detail">{$annotation.description|clean_html|safe}</div>
{if $annotation.tags}
<div class="tags">
<strong>{str tag=tags}:</strong> {list_tags owner=0 tags=$annotation.tags}
</div>
{/if}
<div class="annotationfeedback">
<strong>{str tag=Annotationfeedback section=artefact.annotation}:</strong> <a class="showannotationfeedback" href="" id="{$annotation.id}">{str tag=nannotationfeedback section=artefact.annotation arg1=count($annotation.annotationfeedback)}</a>
</div>
</div>
<div class="importcolumn importcolumn2">
{if $annotation.duplicateditem}
<div class="duplicatedannotation">
<strong>{str tag=duplicatedannotation section=artefact.annotation}:</strong> <a class="showduplicatedannotation" href="" id="{$annotation.duplicateditem.id}">{$annotation.duplicateditem.title|str_shorten_text:80:true}</a>
<div id="{$annotation.duplicateditem.id}_duplicatedannotation" class="detail hidden">{$annotation.duplicateditem.html|clean_html|safe}</div>
</div>
{/if}
{if $annotation.existingitems}
<div class="existingannotations">
<strong>{str tag=existingannotation section=artefact.annotation}:</strong>
{foreach from=$annotation.existingitems item=existingitem}
<a class="showexistingannotation" href="" id="{$existingitem.id}">{$existingitem.title|str_shorten_text:80:true}</a><br>
<div id="{$existingitem.id}_existingannotation" class="detail hidden">{$existingitem.html|clean_html|safe}</div>
{/foreach}
</div>
{/if}
</div>
<div class="importcolumn importcolumn3">
{foreach from=$displaydecisions key=opt item=displayopt}
{if !$annotation.disabled[$opt]}
<input id="decision_{$annotation.id}_{$opt}" class="annotationdecision" id="{$annotation.id}" type="radio" name="decision_{$annotation.id}" value="{$opt}"{if $annotation.decision == $opt} checked="checked"{/if}>
<label for="decision_{$annotation.id}_{$opt}">{$displayopt}<span class="accessible-hidden">({$annotation.title})</span></label><br>
{/if}
{/foreach}
</div>
<div class="cb"></div>
</div>
<div id="{$annotation.id}_annotationfeedback" class="indent2 hidden">
{foreach from=$annotation.annotationfeedback item=feedback}
<div id="annotationfeedbacktitle_{$feedback.id}" class="{cycle name=rows values='r0,r1'} listrow {if $feedback.private}private{else}public{/if}">
<div class="importcolumn importcolumn1">
<h4 class="title">
{if $feedback.description}<a class="annotationfeedbacktitle" href="" id="{$feedback.id}">{/if}
{$feedback.title|str_shorten_text:80:true}
{if $feedback.description}</a>{/if}
</h4>
<div id="{$feedback.id}_desc" class="detail hidden">
{$feedback.description|clean_html|safe}
</div>
<span id="annotationfeedbackstatus{$feedback.id}" class="annotationfeedbackstatus">
{if $feedback.private}
{str tag=private section=artefact.annotation}
{else}
{str tag=public section=artefact.annotation}
{/if}
</span>
<div id="annotationfeedbackdetails_{$feedback.id}" class="annotationfeedbackdetails">
{str tag=enteredon section=artefact.annotation} {$feedback.ctime}
</div> </div>
</div> {if $annotation.tags}
<div class="importcolumn importcolumn2"> <div class="tags">
{if $feedback.duplicateditem} <strong>{str tag=tags}:</strong> {list_tags owner=0 tags=$annotation.tags}
<div class="duplicatedannotationfeedback">
<strong>{str tag=duplicatedannotationfeedback section=artefact.annotation}:</strong> <a class="showduplicatedannotationfeedback" href="" id="{$feedback.duplicateditem.id}">{$feedback.duplicateditem.title|str_shorten_text:80:true}</a>
<div id="{$feedback.duplicateditem.id}_duplicatedannotationfeedback" class="detail hidden">{$feedback.duplicateditem.html|clean_html|safe}</div>
</div> </div>
{/if} {/if}
{if $feedback.existingitems} <div class="annotationfeedback">
<div class="existingannotationfeedback"> <strong>{str tag=Annotationfeedback section=artefact.annotation}:</strong>
<strong>{str tag=existingannotationfeedback section=artefact.annotation}:</strong> {str tag=nannotationfeedback section=artefact.annotation arg1=count($annotation.annotationfeedback)}
{foreach from=$feedback.existingitems item=existingitem} </div>
<a class="showexistingannotationfeedback" href="" id="{$existingitem.id}">{$existingitem.title|str_shorten_text:80:true}</a><br> <!-- TODO Display existing annotation and annotation count with section title -->
<div id="{$existingitem.id}_existingannotationfeedback" class="detail hidden">{$existingitem.html|clean_html|safe}</div> <!-- {if $annotation.existingitems}
{/foreach} <div class="exsitingannotation">
<strong>{str tag=existingannotation section=artefact.annotation}:</strong>
<span>({count($annotation.existingitems)})</span>
</div>
{/if} -->
{if $annotation.duplicateditem}
<div class="duplicatedannotation">
<strong class="text-warning">{str tag=duplicatedannotation section=artefact.annotation}</strong>
</div> </div>
{/if} {/if}
</div> </div>
<div class="importcolumn importcolumn3"> <div class="col-md-4">
{foreach from=$displaydecisions key=opt item=displayopt} {foreach from=$displaydecisions key=opt item=displayopt}
{if !$feedback.disabled[$opt]} {if !$annotation.disabled[$opt]}
<input id="decision_{$feedback.id}_{$opt}" class="annotationfeedbackdecision" type="radio" name="decision_{$feedback.id}" value="{$opt}"{if $feedback.decision == $opt} checked="checked"{/if}> <label for="decision_{$annotation.id}_{$opt}">
<label for="decision_{$feedback.id}_{$opt}">{$displayopt}<span class="accessible-hidden">({$feedback.title})</span></label><br> <input id="decision_{$annotation.id}_{$opt}" class="annotationdecision" id="{$annotation.id}" type="radio" name="decision_{$annotation.id}" value="{$opt}"{if $annotation.decision == $opt} checked="checked"{/if}>
{$displayopt}
<span class="accessible-hidden">({$annotation.title})</span>
</label>
{/if} {/if}
{/foreach} {/foreach}
</div> </div>
<div class="cb"></div>
</div> </div>
{/foreach} <div id="{$annotation.id}_annotationfeedback" class="annotationfeedback list-group list-group-lite">
{foreach from=$annotation.annotationfeedback item=feedback}
<div class="list-group-item">
<div id="annotationfeedbacktitle_{$feedback.id}" class="{if $feedback.private}private{else}public{/if} row">
<div class="col-md-8">
<h4 class="title list-group-item-heading">
{$feedback.title|str_shorten_text:80:true}
</h4>
<div id="{$feedback.id}_desc" class="detail hidden">
{$feedback.description|clean_html|safe}
</div>
<span id="annotationfeedbackstatus{$feedback.id}" class="annotationfeedbackstatus text-small text-lighttone">
{if $feedback.private}
{str tag=private section=artefact.annotation}
{else}
{str tag=public section=artefact.annotation}
{/if}
</span>
<div id="annotationfeedbackdetails_{$feedback.id}" class="annotationfeedbackdetails text-small text-lighttone">
{str tag=enteredon section=artefact.annotation} {$feedback.ctime}
</div>
<!-- TODO Display existing annotation feedbacks and annotation feedback count with section title -->
<!-- {if $feedback.existingitems}
<div class="existingannotationfeedback">
<strong>{str tag=existingannotationfeedback section=artefact.annotation}:</strong>
<span>({count($feedback.existingitems)})</span>
</div>
{/if} -->
{if $feedback.duplicateditem}
<div class="duplicatedannotationfeedback">
<strong class="text-warning">{str tag=duplicatedannotationfeedback section=artefact.annotation}</strong>
</div>
{/if}
</div>
<div class="col-md-4">
{foreach from=$displaydecisions key=opt item=displayopt}
{if !$feedback.disabled[$opt]}
<label for="decision_{$feedback.id}_{$opt}">
<input id="decision_{$feedback.id}_{$opt}" class="annotationfeedbackdecision" type="radio" name="decision_{$feedback.id}" value="{$opt}"{if $feedback.decision == $opt} checked="checked"{/if}>
{$displayopt}
<span class="accessible-hidden">({$feedback.title})</span>
</label>
{/if}
{/foreach}
</div>
</div>
</div>
{/foreach}
</div>
</div> </div>
<div class="cb"></div> {/foreach}
</div> </div>
{/foreach}
<script type="application/javascript"> <script type="application/javascript">
jQuery(function() { jQuery(function() {
jQuery("a.showduplicatedannotation").click(function(e) {
e.preventDefault();
jQuery("#" + this.id + "_duplicatedannotation").toggleClass("hidden");
});
jQuery("a.showexistingannotation").click(function(e) {
e.preventDefault();
jQuery("#" + this.id + "_existingbannotation").toggleClass("hidden");
});
jQuery("a.showduplicatedannotationfeedback").click(function(e) {
e.preventDefault();
jQuery("#" + this.id + "_duplicatedannotationfeedback").toggleClass("hidden");
});
jQuery("a.showexistingannotationfeedback").click(function(e) {
e.preventDefault();
jQuery("#" + this.id + "_existingannotationfeedback").toggleClass("hidden");
});
jQuery("a.showannotationfeedback").click(function(e) {
e.preventDefault();
jQuery("#" + this.id + "_annotationfeedback").toggleClass("hidden");
});
jQuery("input.annotationdecision").change(function(e) { jQuery("input.annotationdecision").change(function(e) {
e.preventDefault(); e.preventDefault();
if (this.value == '1') { if (this.value == '1') {
......
{if count($entryblogs)} {if $entryblogs}
<div class="section fullwidth"> <div class="section-import">
<h2>{str tag=blog section=artefact.blog}</h2> <h2>{str tag=Blogs section=artefact.blog}</h2>
</div> {foreach from=$entryblogs item=blog}
{foreach from=$entryblogs item=blog} <div class="list-group-item">
<div class="{cycle name=rows values='r0,r1'} listrow"> <div id="entryblog-{$blog.id}" class="row">
<div id="entryblog" class="indent1"> <div class="col-md-8">
<div class="importcolumn importcolumn1"> <h3 class="title list-group-item-heading">
<h3 class="title"> {if $blog.description}<a class="blogtitle" href="" id="{$blog.id}">{/if}
{if $blog.description}<a class="blogtitle" href="" id="{$blog.id}">{/if} {$blog.title|str_shorten_text:80:true}
{$blog.title|str_shorten_text:80:true} {if $blog.description}</a>{/if}
{if $blog.description}</a>{/if} </h3>
</h3> <div id="{$blog.id}_desc" class="detail hidden">{$blog.description|clean_html|safe}</div>
<div id="{$blog.id}_desc" class="detail hidden">{$blog.description|clean_html|safe}</div> {if $blog.tags}
{if $blog.tags} <div class="tags">
<div class="tags"> <strong>{str tag=tags}:</strong> {list_tags owner=0 tags=$blog.tags}
<strong>{str tag=tags}:</strong> {list_tags owner=0 tags=$blog.tags} </div>
</div> {/if}
{/if} <div class="posts">
<div class="posts"> <strong>{str tag=blogpost section=artefact.blog}:</strong>
<strong>{str tag=blogpost section=artefact.blog}:</strong> <a class="showposts" href="" id="{$blog.id}">{str tag=nposts section=artefact.blog arg1=count($blog.entryposts)}</a> {str tag=nposts section=artefact.blog arg1=count($blog.entryposts)}
</div> </div>
</div> <!-- TODO Display existing journals and jounrnal count with section title -->
<div class="importcolumn importcolumn2"> <!-- {if $blog.existingitems}
{if $blog.duplicateditem} <div class="existingblogs">
<div class="duplicatedblog"> <strong>{str tag=existingblogs section=artefact.blog}</strong>
<strong>{str tag=duplicatedblog section=artefact.blog}:</strong> <a class="showduplicatedblog" href="" id="{$blog.duplicateditem.id}">{$blog.duplicateditem.title|str_shorten_text:80:true}</a> <span>({count($blog.existingitems)})</span>
<div id="{$blog.duplicateditem.id}_duplicatedblog" class="detail hidden">{$blog.duplicateditem.html|clean_html|safe}</div> </div>
</div> {/if} -->
{/if} {if $blog.duplicateditem}
{if $blog.existingitems} <div class="duplicatedblog">
<div class="existingblogs"> <strong class="text-warning">{str tag=duplicatedblog section=artefact.blog}</strong>
<strong>{str tag=existingblogs section=artefact.blog}:</strong> </div>
{foreach from=$blog.existingitems item=existingitem} {/if}
<a class="showexistingblog" href="" id="{$existingitem.id}">{$existingitem.title|str_shorten_text:80:true}</a><br>
<div id="{$existingitem.id}_existingblog" class="detail hidden">{$existingitem.html|clean_html|safe}</div>
{/foreach}
</div> </div>
{/if} <div class="col-md4">
</div>
<div class="importcolumn importcolumn3">
{foreach from=$displaydecisions key=opt item=displayopt} {foreach from=$displaydecisions key=opt item=displayopt}
{if !$blog.disabled[$opt]} {if !$blog.disabled[$opt]}
<input id="decision_{$blog.id}_{$opt}" class="blogdecision" id="{$blog.id}" type="radio" name="decision_{$blog.id}" value="{$opt}"{if $blog.decision == $opt} checked="checked"{/if}> <label for="decision_{$blog.id}_{$opt}">
<label for="decision_{$blog.id}_{$opt}">{$displayopt}<span class="accessible-hidden sr-only">({$blog.title})</span></label><br> <input id="decision_{$blog.id}_{$opt}" class="blogdecision" id="{$blog.id}" type="radio" name="decision_{$blog.id}" value="{$opt}"{if $blog.decision == $opt} checked="checked"{/if}>
{$displayopt}
<span class="accessible-hidden sr-only">({$blog.title})</span>
</label>
{/if} {/if}
{/foreach} {/foreach}
</div>
</div> </div>
<div class="cb"></div> <div id="{$blog.id}_posts" class="posts list-group list-group-lite">
</div> {foreach from=$blog.entryposts item=post}
<div id="{$blog.id}_posts" class="indent2 hidden"> <div id="posttitle_{$post.id}" class="{if $post.published} published{else} draft{/if} list-group-item">
{foreach from=$blog.entryposts item=post} <div class="row">
<div id="posttitle_{$post.id}" class="{cycle name=rows values='r0,r1'} listrow {if $post.published}published{else}draft{/if}"> <div class="col-md-8">
<div class="importcolumn importcolumn1"> <h4 class="title list-group-item-heading text-inline">
<h4 class="title"> {if $post.description}
{if $post.description}<a class="posttitle" href="" id="{$post.id}">{/if} <a class="posttitle" href="" id="{$post.id}">
{$post.title|str_shorten_text:80:true} {$post.title|str_shorten_text:80:true}
{if $post.description}</a>{/if} </a>
</h4> {else}
<div id="{$post.id}_desc" class="detail hidden"> {$post.title|str_shorten_text:80:true}
{$post.description|clean_html|safe} {/if}
</div> </h4>
<span id="poststatus{$post.id}" class="poststatus"> <span id="poststatus{$post.id}" class="poststatus text-small text-lighttone">
{if $post.published} {if $post.published}
{str tag=published section=artefact.blog} ({str tag=published section=artefact.blog})
{else} {else}
{str tag=draft section=artefact.blog} ({str tag=draft section=artefact.blog})
{/if} {/if}
</span> </span>
{if $post.files} <div id="{$post.id}_desc" class="detail hidden text-small">
<div id="postfiles" class="table-responsive"> {$post.description|clean_html|safe}
<table class="cb attachments fullwidth"> </div>
<thead class="expandable-head"> <p id="postdetails_{$post.id}" class="postdetails text-small">
<tr> {str tag=postedon section=artefact.blog} {$post.ctime}
<td> </p>
<a class="showpostfiles toggle expandable" id="{$blog.id}_{$post.id}" href="">{str tag=attachedfiles section=artefact.blog}</a> {if $post.files}
<span class="fr"> <div class="attachments">
<img class="fl" src="{theme_url filename='images/attachment.png'}" alt="{str tag=Attachments section=artefact.resume}"> <span class="icon prm icon-paperclip"></span>
{$post.files|count} <span class="text-small">{str tag=attachedfiles section=artefact.blog}</span>
</span> <span class="metadata">({$post.files|count})</span>
</td> </div>
</tr> {/if}
</thead> {if $post.duplicateditem}
<tbody id="{$blog.id}_{$post.id}_postfiles" class="expandable-body hidden"> <div class="duplicatedblog">
{foreach from=$post.files item=file} <strong class="text-warning">{str tag=duplicatedpost section=artefact.blog}</strong>
<tr class="{cycle values='r1,r0'}"> </div>
<td><h3 class="title">{$file.title}</h3> {/if}
<div class="detail">{$file.description}</div></td> <!-- {if $post.existingitems}
</tr> <div class="existingposts">
{/foreach} <div class="existingblogs">
</tbody> <strong>{str tag=existingposts section=artefact.blog}</strong>
</table> <span>({count($post.existingitems)})</span>
</div>
</div>
{/if} -->
</div>
<div class="col-md-4">
{foreach from=$displaydecisions key=opt item=displayopt}
{if !$post.disabled[$opt]}
<label for="decision_{$post.id}_{$opt}">
<input id="decision_{$post.id}_{$opt}" class="postdecision" type="radio" name="decision_{$post.id}" value="{$opt}"{if $post.decision == $opt} checked="checked"{/if}>
{$displayopt}
<span class="accessible-hidden sr-only">({$post.title})</span>
</label>
{/if}
{/foreach}
</div> </div>
{/if}
<div id="postdetails_{$post.id}" class="postdetails">
{str tag=postedon section=artefact.blog} {$post.ctime}
</div>
</div>
<div class="importcolumn importcolumn2">
{if $post.duplicateditem}
<div class="duplicatedpost">
<strong>{str tag=duplicatedpost section=artefact.blog}:</strong> <a class="showduplicatedpost" href="" id="{$post.duplicateditem.id}">{$post.duplicateditem.title|str_shorten_text:80:true}</a>
<div id="{$post.duplicateditem.id}_duplicatedpost" class="detail hidden">{$post.duplicateditem.html|clean_html|safe}</div>
</div>
{/if}
{if $post.existingitems}
<div class="existingposts">
<strong>{str tag=existingposts section=artefact.blog}:</strong>
{foreach from=$post.existingitems item=existingitem}
<a class="showexistingpost" href="" id="{$existingitem.id}">{$existingitem.title|str_shorten_text:80:true}</a><br>
<div id="{$existingitem.id}_existingpost" class="detail hidden">{$existingitem.html|clean_html|safe}</div>
{/foreach}
</div> </div>
{/if}
</div> </div>
<div class="importcolumn importcolumn3"> {/foreach}
{foreach from=$displaydecisions key=opt item=displayopt}
{if !$post.disabled[$opt]}
<input id="decision_{$post.id}_{$opt}" class="postdecision" type="radio" name="decision_{$post.id}" value="{$opt}"{if $post.decision == $opt} checked="checked"{/if}>
<label for="decision_{$post.id}_{$opt}">{$displayopt}<span class="accessible-hidden sr-only">({$post.title})</span></label><br>
{/if}
{/foreach}
</div>
<div class="cb"></div>
</div> </div>
{/foreach}
</div> </div>
<div class="cb"></div> {/foreach}
</div> </div>
{/foreach}
<script type="application/javascript"> <script type="application/javascript">
jQuery(function() { jQuery(function() {
jQuery("a.blogtitle").click(function(e) { jQuery("a.blogtitle").click(function(e) {
...@@ -138,30 +121,6 @@ ...@@ -138,30 +121,6 @@
e.preventDefault(); e.preventDefault();
jQuery("#" + this.id + "_desc").toggleClass("hidden"); jQuery("#" + this.id + "_desc").toggleClass("hidden");
}); });
jQuery("a.showduplicatedblog").click(function(e) {
e.preventDefault();
jQuery("#" + this.id + "_duplicatedblog").toggleClass("hidden");
});
jQuery("a.showexistingblog").click(function(e) {
e.preventDefault();
jQuery("#" + this.id + "_existingblog").toggleClass("hidden");
});
jQuery("a.showduplicatedpost").click(function(e) {
e.preventDefault();
jQuery("#" + this.id + "_duplicatedpost").toggleClass("hidden");
});
jQuery("a.showexistingpost").click(function(e) {
e.preventDefault();
jQuery("#" + this.id + "_existingpost").toggleClass("hidden");
});
jQuery("a.showposts").click(function(e) {
e.preventDefault();
jQuery("#" + this.id + "_posts").toggleClass("hidden");
});
jQuery("a.showpostfiles").click(function(e) {
e.preventDefault();
jQuery("#" + this.id + "_postfiles").toggleClass("hidden");
});
jQuery("input.blogdecision").change(function(e) { jQuery("input.blogdecision").change(function(e) {
e.preventDefault(); e.preventDefault();
if (this.value == '1') { if (this.value == '1') {
......
{if count($entryfiles)} {if count($entryfiles)}
<div class="section fullwidth"> <div class="section-import">
<h2>{str tag=file section=artefact.file}</h2> <h2>{str tag=file section=artefact.file}</h2>
</div> {foreach from=$entryfiles item=file}
{foreach from=$entryfiles item=file} <div class="{cycle name=rows values='r0,r1'} list-group-item">
<div class="{cycle name=rows values='r0,r1'} listrow"> <div id="entryfile-{$file.id}" class="row">
<div id="entryfile" class="indent1 fullwidth"> <div class="col-md-8">
<div class="importcolumn importcolumn1"> <h5 class="title list-group-item-heading text-inline">
<h3 class="title"> {$file.title|str_shorten_text:80:true}
{if $file.description}<a class="filetitle" href="" id="{$file.id}">{/if} </h5>
{$file.title|str_shorten_text:80:true} <span class="filesize text-small text-lighttone">
{if $file.description}</a>{/if} ({$file.filesize|display_size})
</h3> </span>
<div id="{$file.id}_desc" class="detail hidden">{$file.description|clean_html|safe}</div> <div id="{$file.id}_desc" class="detail">
{if $file.filesize} {$file.description|clean_html|safe}
<div class="filesize"> </div>