Commit 76abfc58 authored by Pat Kira's avatar Pat Kira Committed by Aaron Wells
Browse files

Add view artefact to attachment list (bootstrap)

Bug 1465107: Use Bootstrap CSS Framework
Objectionable material in viewpage, artefact and topic (bootstrap)
Inpage menu (bootstrap)
Style commnet form as a tab (bootstrap)
Tidy up filebrowsers

Change-Id: I967612dfb3cde35673bd40ca20751058908de266
parent 87cd215b
......@@ -24,12 +24,11 @@
{/if}
{if $reportedaction}
<div class="reportedaction ptm pbl">
<div class="reportedaction alert alert-danger mtl">
{$post->postnotobjectionableform|safe}
</div>
{elseif $highlightreported}
<div class="reportedaction text-danger ptm">
{str tag=postobjectionable section=interaction.forum}
</div>
......@@ -37,7 +36,6 @@
<div class="forum-post-btns text-right">
{if !$chronological}
{if ($moderator || ($membership && !$closed)) && $ineditwindow}
<a href="{$WWWROOT}interaction/forum/editpost.php?parent={$post->id}" class="mll">
<span class="fa fa-reply"></span>
......
......@@ -40,11 +40,11 @@
{$post->body|clean_html|safe}
{if $post->edit}
<div class="editstopost">
<h4 class="title">
<div class="editstopost mtl">
<h5 class="title">
{str tag="editstothispost" section="interaction.forum"}
</h4>
<ul>
</h5>
<ul class="list-unstyled text-small">
{foreach from=$post->edit item=edit}
<li>
<a href="{profile_url($edit.editor)}"
......@@ -55,7 +55,7 @@
<img src="{profile_icon_url user=$edit.editor maxwidth=20 maxheight=20}" alt="{str tag=profileimagetext arg1=$edit.editor|display_default_name}">
{$edit.editor|display_name}
</a> -
<span class="posttime">
<span class="posttime text-muted">
{$edit.edittime}
</span>
</li>
......
......@@ -93,8 +93,7 @@ jQuery(function($) {
height = 0;
image = $(carousel[i]).find('.item img');
console.log(image);
for (j = 0; j < image.length; j = j + 1){
if($(image[j]).height() > height){
height = $(image[j]).height();
......
......@@ -10,34 +10,53 @@
{/if}
<p>{$description|clean_html|safe}</p>
{if isset($attachments)}
<table class="attachments fullwidth">
<thead class="expandable-head">
<tr>
<td colspan="2">
<a class="toggle" href="#">{str tag=attachedfiles section=artefact.blog}</a>
<span class="fr">
<img class="fl" src="{theme_url filename='images/attachment.png'}" alt="{str tag=attachments section=artefact.blog}">
{$attachments|count}
</span>
</td>
</tr>
</thead>
<tbody class="expandable-body">
<div class="has-attachment panel panel-default collapsible">
<h5 class="panel-heading">
<a href="#atrtefact-attach" class="text-left pts pbm collapsed" aria-expanded="false" data-toggle="collapse">
<span class="fa fa-paperclip prm"></span>
<span class="text-small">{str tag=attachedfiles section=artefact.blog}</span>
<span class="metadata">({$attachments|count})</span>
<span class="fa pts fa-chevron-down pull-right collapse-indicator"></span>
</a>
</h5>
<!-- Attachment list with view and download link -->
<div id="atrtefact-attach" class="collapse">
<ul class="list-unstyled list-group mb0">
{foreach from=$attachments item=item}
<tr class="{cycle values='r0,r1'}">
{if $icons}<td class="icon-container"><img src="{$item->iconpath}" alt=""></td>{/if}
<td><a href="{$item->viewpath}">{$item->title}</a>
({$item->size}) - <strong><a href="{$item->downloadpath}">{str tag=Download section=artefact.file}</a></strong>
<br>{$item->description}</td>
</tr>
<li class="list-group-item">
<a href="{$item->downloadpath}" class="outer-link icon-on-hover">
<span class="sr-only">
{str tag=Download section=artefact.file} {$item->title}
</span>
</a>
{if $item->icon}
<img src="{$item->iconpath}" alt="">
{else}
<span class="fa fa-{$item->artefacttype} fa-lg text-default"></span>
{/if}
<span class="title list-group-item-heading plm inline">
<a href="{$item->viewpath}" class="inner-link">
{$item->title}
</a>
<span class="metadata"> -
[{$item->size|display_size}]
</span>
</span>
<span class="fa fa-download fa-lg pull-right pts text-watermark icon-action"></span>
</li>
{/foreach}
</tbody>
</table>
</ul>
</div>
</div>
{/if}
{if $license}
<div class="artefactlicense">
<div class="artefactlicense ptl pbl">
{$license|safe}
</div>
{/if}
\ No newline at end of file
......@@ -4,7 +4,7 @@
<div class="col-md-9">
{if $notrudeform}
<div class="message deletemessage">
<div class="message deletemessage alert alert-danger">
{$notrudeform|safe}
</div>
{/if}
......@@ -44,28 +44,41 @@
<div class="text-right btn-top-right btn-group btn-group-top pull-right">
{if $LOGGEDIN}
<a id="toggle_watchlist_link" class="watchlist btn btn-sm btn-default" href="">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<span class="fa fa-ellipsis-h fa-lg"></span>
<span class="sr-only">More options</span>
</button>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
<li>
<a id="toggle_watchlist_link" class="watchlist" href="">
{if $viewbeingwatched}
<span class="fa fa-eye-slash prs"></span>
{else}
<span class="fa fa-eye prs"></span>
{/if}
{if $artefact}
{if $viewbeingwatched}
{str tag=removefromwatchlistartefact section=view arg1=$view->get('title')}
<span class="fa fa-eye-slash prs"></span>
{else}
{str tag=addtowatchlistartefact section=view arg1=$view->get('title')}
<span class="fa fa-eye prs"></span>
{/if}
{else}
{if $viewbeingwatched}
{str tag=removefromwatchlist section=view}
{if $artefact}
{if $viewbeingwatched}
{str tag=removefromwatchlistartefact section=view arg1=$view->get('title')}
{else}
{str tag=addtowatchlistartefact section=view arg1=$view->get('title')}
{/if}
{else}
{str tag=addtowatchlist section=view}
{if $viewbeingwatched}
{str tag=removefromwatchlist section=view}
{else}
{str tag=addtowatchlist section=view}
{/if}
{/if}
{/if}
</a>
</a>
</li>
<li>
<a id="objection_link" class="objection" href="#" data-toggle="modal" data-target="#report-form">
<span class="fa fa-lg fa-flag text-danger prs"></span>
{str tag=reportobjectionablematerial}
</a>
</li>
{/if}
</div>
......@@ -79,7 +92,6 @@
<div class="viewfooter ptxl">
{if $feedback->count || $enablecomments}
<h4 class="title">{str tag="Comments" section="artefact.comment"}</h4>
<hr />
......@@ -93,16 +105,25 @@
<div id="viewmenu" class="view-menu">
{include file="view/viewmenuartefact.tpl"}
</div>
<div class="tab-content pt0">
<div id="comment-form" role="tabpanel" class="tab-pane active">
{$addfeedbackform|safe}
</div>
<div id="report-form" role="tabpanel" class="tab-pane">
{$objectionform|safe}
{if $LOGGEDIN}
<div class="modal fade" id="report-form">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">
<span class="fa fa-lg fa-flag text-danger prs"></span>
{str tag=reportobjectionablematerial}
</h4>
</div>
<div class="modal-body">
{$objectionform|safe}
</div>
</div>
</div>
</div>
{/if}
</div>
</div>
</div>
......
{include file="header.tpl"}
<div class="text-right btn-top-right btn-group btn-group-top">
{$newform|safe}
</div>
{if !$allownew}
<div class="message info">
{if $onprobation}
......@@ -38,6 +42,4 @@
</div>
{/if}
{$newform|safe}
{include file="footer.tpl"}
......@@ -12,20 +12,7 @@
</h1>
{/if}
{if !$microheaders && ($mnethost || $editurl)}
<div class="btn-group btn-group-top">
{if $LOGGEDIN}
<a id="toggle_watchlist_link" class="watchlist btn btn-default" href="">
{if $viewbeingwatched}
<span class="fa fa-eye-slash prs"></span>
{str tag=removefromwatchlist section=view}
{else}
<span class="fa fa-eye prs"></span>
{str tag=addtowatchlist section=view}
{/if}
</a>
{/if}
{if $editurl}{strip}
{if $new}
<a class="btn btn-default" href="{$editurl}">
......@@ -52,8 +39,35 @@
{str tag=backto arg1=$mnethost.name}
</a>
{/if}
{if $LOGGEDIN}
<div class="btn-group" role="group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<span class="fa fa-ellipsis-h fa-lg"></span>
<span class="sr-only">More options</span>
</button>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
<li>
<a id="toggle_watchlist_link" class="watchlist" href="">
{if $viewbeingwatched}
<span class="fa fa-eye-slash prs"></span>
{str tag=removefromwatchlist section=view}
{else}
<span class="fa fa-eye prs"></span>
{str tag=addtowatchlist section=view}
{/if}
</a>
</li>
<li>
<a id="objection_link" href="#" data-toggle="modal" data-target="#report-form">
<span class="fa fa-lg fa-flag text-danger prs"></span>
{str tag=reportobjectionablematerial}
</a>
</li>
</ul>
</div>
{/if}
</div>
{/if}
{if $collection}
{include file=collectionnav.tpl}
......@@ -97,7 +111,7 @@
<h3 class="title">
{str tag="Comments" section="artefact.comment"}
</h3>
<hr>
<div id="feedbacktable" class="feedbacktable fullwidth">
{$feedback->tablerows|safe}
</div>
......@@ -107,23 +121,24 @@
<div id="viewmenu" class="view-menu ptxl pbl">
{include file="view/viewmenu.tpl"}
{if $feedback->position eq 'base' && $enablecomments}
<div class="tab-content">
<div id="comment-form" role="tabpanel" class="tab-pane active">
{$addfeedbackform|safe}
</div>
{if $LOGGEDIN}
<div id="report-form" role="tabpanel" class="tab-pane">
{$objectionform|safe}
{if $LOGGEDIN}
<div class="modal fade" id="report-form">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">
<span class="fa fa-lg fa-flag text-danger prs"></span>
{str tag=reportobjectionablematerial}
</h4>
</div>
<div class="modal-body">
{$objectionform|safe}
</div>
</div>
</div>
{/if}
</div>
{else}
{if $LOGGEDIN}
<div id="report-form">
{$objectionform|safe}
</div>
{/if}
{/if}
</div>
</div>
......
<div class="pull-right">
<!-- <div class="pull-right">
{contextualhelp plugintype='core' pluginname='view' section='viewmenu'}
</div>
-->
{if $feedback->position eq 'base' && $enablecomments}
<ul class="nav nav-tabs ">
<li class="active">
<a id="add_feedback_link" class="feedback" href="#comment-form" aria-controls="comment-form" role="tab" data-toggle="tab">
<ul class="nav nav-tabs" role="tablist">
<li id="add_feedback_link" class="feedback active" role="presentation">
<a href="#comment-form" aria-controls="comment-form" role="tab" data-toggle="tab">
<span class="fa fa-lg fa-comments prm"></span>
{str tag=Comment section=artefact.comment}
</a>
</li>
{if $LOGGEDIN}
<li>
<a id="objection_link" class="objection" href="#report-form" role="tab" aria-controls="report-form" data-toggle="tab">
<span class="fa fa-lg fa-flag prs"></span>
{str tag=reportobjectionablematerial}
{str tag=addcomment section=artefact.comment}
</a>
</li>
{/if}
</ul>
{else}
{if $LOGGEDIN}
<a id="objection_link" class="objection btn btn-default" href="#report-form">
<span class="fa fa-lg fa-flag prs"></span>
{str tag=reportobjectionablematerial}
</a>
{/if}
<div class="tab-panel">
<div role="tabpanel" class="tab-pane active" id="comment-form">
{$addfeedbackform|safe}
</div>
</div>
{/if}
<div class="mtxl mbxl">
<div class="pull-right">
{contextualhelp plugintype='core' pluginname='view' section='viewmenu'}
</div>
{if $enablecomments || $LOGGEDIN}
<ul class="nav nav-tabs ">
{if $enablecomments}
<li class="active">
<a id="add_feedback_link" class="feedback" href="#comment-form" aria-controls="comment-form" role="tab" data-toggle="tab">
<span class="fa fa-lg fa-comments prm"></span>
{str tag=Comment section=artefact.comment}
</a>
</li>
{/if}
{if $LOGGEDIN}
<li>
<a id="objection_link" class="objection " href="#report-form" role="tab" aria-controls="report-form" data-toggle="tab">
<span class="fa fa-lg fa-flag prs"></span>
{str tag=reportobjectionablematerial}
</a>
</li>
{/if}
</ul>
{/if}
</div>
\ No newline at end of file
<!-- <div class="pull-right">
{contextualhelp plugintype='core' pluginname='view' section='viewmenu'}
</div> -->
{if $enablecomments || $LOGGEDIN}
{if $enablecomments}
<ul class="nav nav-tabs" role="tablist">
<li id="add_feedback_link" class="feedback active" role="presentation">
<a href="#comment-form" aria-controls="comment-form" role="tab" data-toggle="tab">
<span class="fa fa-lg fa-comments prm"></span>
{str tag=addcomment section=artefact.comment}
</a>
</li>
</ul>
{/if}
<div class="tab-panel">
<div role="tabpanel" class="tab-pane active" id="comment-form">
{$addfeedbackform|safe}
</div>
</div>
{/if}
\ No newline at end of file
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