aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/css/mod_webpages.css85
-rw-r--r--view/js/mod_webpages.js15
-rw-r--r--view/tpl/webpage_import.tpl188
3 files changed, 216 insertions, 72 deletions
diff --git a/view/css/mod_webpages.css b/view/css/mod_webpages.css
index 1c6ec4aea..f72f632dd 100644
--- a/view/css/mod_webpages.css
+++ b/view/css/mod_webpages.css
@@ -34,3 +34,88 @@
.webpage-list-tool {
padding: 7px 10px;
}
+
+.webpage-import-button {
+ background-color: green;
+ color: white;
+}
+
+.webpage-import-button:hover {
+ background-color: darkgreen;
+}
+
+
+/* SQUARED TWO */
+.squaredTwo {
+ width: 28px;
+ height: 28px;
+ background: #fcfff4;
+
+ background: -webkit-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
+ background: -moz-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
+ background: -o-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
+ background: -ms-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
+ background: linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfff4', endColorstr='#b3bead',GradientType=0 );
+ margin: 20px auto;
+
+ -webkit-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
+ -moz-box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
+ box-shadow: inset 0px 1px 1px white, 0px 1px 3px rgba(0,0,0,0.5);
+ position: relative;
+}
+
+.squaredTwo label {
+ cursor: pointer;
+ position: absolute;
+ width: 20px;
+ height: 20px;
+ left: 4px;
+ top: 4px;
+
+ -webkit-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,1);
+ -moz-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,1);
+ box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,1);
+
+ background: -webkit-linear-gradient(top, #222 0%, #45484d 100%);
+ background: -moz-linear-gradient(top, #222 0%, #45484d 100%);
+ background: -o-linear-gradient(top, #222 0%, #45484d 100%);
+ background: -ms-linear-gradient(top, #222 0%, #45484d 100%);
+ background: linear-gradient(top, #222 0%, #45484d 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#222', endColorstr='#45484d',GradientType=0 );
+}
+
+.squaredTwo label:after {
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
+ filter: alpha(opacity=0);
+ opacity: 0;
+ content: '';
+ position: absolute;
+ width: 9px;
+ height: 5px;
+ background: transparent;
+ top: 4px;
+ left: 4px;
+ border: 3px solid #fcfff4;
+ border-top: none;
+ border-right: none;
+
+ -webkit-transform: rotate(-45deg);
+ -moz-transform: rotate(-45deg);
+ -o-transform: rotate(-45deg);
+ -ms-transform: rotate(-45deg);
+ transform: rotate(-45deg);
+}
+
+.squaredTwo label:hover::after {
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
+ filter: alpha(opacity=30);
+ opacity: 0.3;
+}
+
+.squaredTwo input[type=checkbox]:checked + label:after {
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
+ filter: alpha(opacity=100);
+ opacity: 1;
+}
+
diff --git a/view/js/mod_webpages.js b/view/js/mod_webpages.js
new file mode 100644
index 000000000..7cfe297e1
--- /dev/null
+++ b/view/js/mod_webpages.js
@@ -0,0 +1,15 @@
+$(document).ready(function() {
+ $("input[type=\"checkbox\"]").hide();
+});
+
+window.isChecked = true;
+
+function checkedAll(isChecked) {
+ window.isChecked = !window.isChecked ;
+ var c = document.getElementsByTagName('input');
+ for (var i = 0; i < c.length; i++){
+ if (c[i].type == 'checkbox'){
+ c[i].checked = isChecked;
+ }
+ }
+} \ No newline at end of file
diff --git a/view/tpl/webpage_import.tpl b/view/tpl/webpage_import.tpl
index 524460408..b047ee6f9 100644
--- a/view/tpl/webpage_import.tpl
+++ b/view/tpl/webpage_import.tpl
@@ -1,76 +1,120 @@
<div class="generic-content-wrapper">
- <div class="section-title-wrapper">
- {{if $editor}}
- <div class="pull-right">
- <button id="webpage-create-btn" class="btn btn-xs btn-success" onclick="openClose('webpage-editor');"><i class="fa fa-pencil-square-o"></i>&nbsp;{{$create}}</button>
+ <form action="" method="post" autocomplete="on" >
+ <input type="hidden" name="action" value="importselected">
+ <div class="section-title-wrapper">
+ <div class="pull-right">
+ <input class="webpage-import-button" type="submit" name="submit" value="Import selected"/>
+ </div>
+ <h2>{{$title}}</h2>
+ <div class="clear"></div>
+ </div>
+ <div id="import-website-content-wrapper" class="section-content-wrapper">
+ <div class="pull-left">
+ <button id="toggle-select-all" class="btn btn-xs btn-primary" onclick="checkedAll(window.isChecked); return false;"><i class="fa fa-check"></i>&nbsp;Toggle Select All</button>
+ </div>
+ <div class="clear"></div>
+ <h4>Scanned Pages</h4>
+ <div>
+ <table class="table-striped table-responsive table-hover" style="width: 100%;">
+ <tr><td>Import?</td><td>Page</td><td>Existing Page</td></tr>
+ {{foreach $pages as $page}}
+ <tr>
+ <td>
+ <div class='squaredTwo'>
+ <input type="checkbox" id="page_{{$page.pagelink}}" name="page[]" value="{{$page.pagelink}}">
+ <label for="page_{{$page.pagelink}}"></label>
+ </div>
+ </td>
+ <td>
+ <div class='desc'>
+ Page Link: {{$page.pagelink}}<br>
+ Layout: {{$page.layout}}<br>
+ Title: {{$page.title}}<br>
+ Content File: {{$page.contentfile}}<br>
+ Type: {{$page.type}}<br>
+ </div>
+ </td>
+ <td>
+ <div class='desc'>
+ Name: {{$page.curpage.pagelink}}<br>
+ Layout: {{$page.curpage.layout}}<br>
+ Title: {{$page.curpage.title}}<br>
+ Last edit: {{$page.curpage.edited}}<br>
+ Type: {{$page.curpage.type}}<br>
+ </div>
+ </td>
+ </tr>
+ {{/foreach}}
+ </table>
+ </div>
+
+
+ <h4>Scanned Layouts</h4>
+ <div>
+ <table class="table-striped table-responsive table-hover" style="width: 100%;">
+ <tr><td>Import?</td><td>Layout</td><td>Existing Layout</td></tr>
+ {{foreach $layouts as $layout}}
+ <tr>
+ <td>
+ <div class='squaredTwo'>
+ <input type="checkbox" id="layout_{{$layout.name}}" name="layout[]" value="{{$layout.name}}">
+ <label for="layout_{{$layout.name}}"></label>
+ </div>
+ </td>
+ <td>
+ <div class='desc'>
+ Name: {{$layout.name}}<br>
+ Description: {{$layout.description}}<br>
+ Content File: {{$layout.contentfile}}<br>
+ </div>
+ </td>
+ <td>
+ <div class='desc'>
+ Name: {{$layout.curblock.name}}<br>
+ Title: {{$layout.curblock.description}}<br>
+ Last edit: {{$layout.curblock.edited}}<br>
+ </div>
+ </td>
+ </tr>
+ {{/foreach}}
+ </table>
+ </div>
+
+ <h4>Scanned Blocks</h4>
+ <div>
+ <table class="table-striped table-responsive table-hover" style="width: 100%;">
+ <tr><td>Import?</td><td>Block</td><td>Existing Block</td></tr>
+ {{foreach $blocks as $block}}
+ <tr>
+ <td>
+ <div class='squaredTwo'>
+ <input type="checkbox" id="block_{{$block.name}}" name="block[]" value="{{$block.name}}">
+ <label for="block_{{$block.name}}"></label>
+ </div>
+ </td>
+ <td>
+ <div class='desc'>
+ Name: {{$block.name}}<br>
+ Title: {{$block.title}}<br>
+ Content File: {{$block.contentfile}}<br>
+ Type: {{$block.type}}<br>
+ </div>
+ </td>
+ <td>
+ <div class='desc'>
+ Name: {{$block.curblock.name}}<br>
+ Title: {{$block.curblock.title}}<br>
+ Last edit: {{$block.curblock.edited}}<br>
+ Type: {{$block.curblock.type}}<br>
+ </div>
+ </td>
+ </tr>
+ {{/foreach}}
+ </table>
+ </div>
+
</div>
- {{/if}}
- <h2>{{$listtitle}}</h2>
<div class="clear"></div>
- </div>
- {{if $editor}}
- <div id="webpage-editor" class="section-content-tools-wrapper">
- {{$editor}}
- </div>
- {{/if}}
- {{if $pages}}
- <div id="pagelist-content-wrapper" class="section-content-wrapper-np">
- <table id="webpage-list-table">
- <tr>
- <th width="1%">{{$pagelink_txt}}</th>
- <th width="95%">{{$title_txt}}</th>
- <th width="1%"></th>
- <th width="1%"></th>
- <th width="1%"></th>
- <th width="1%"></th>
- <th width="1%" class="hidden-xs">{{$created_txt}}</th>
- <th width="1%" class="hidden-xs">{{$edited_txt}}</th>
- </tr>
- {{foreach $pages as $key => $items}}
- {{foreach $items as $item}}
- <tr id="webpage-list-item-{{$item.url}}">
- <td>
- {{if $view}}
- <a href="page/{{$channel}}/{{$item.pagetitle}}" title="{{$view}}">{{$item.pagetitle}}</a>
- {{else}}
- {{$item.pagetitle}}
- {{/if}}
- </td>
- <td>
- {{$item.title}}
- </td>
- <td class="webpage-list-tool dropdown">
- {{if $item.lockstate=='lock'}}
- <i class="fa fa-lock dropdown-toggle lockview" data-toggle="dropdown" onclick="lockview('item',{{$item.url}});" ></i>
- <ul id="panel-{{$item.url}}" class="lockview-panel dropdown-menu"></ul>
- {{/if}}
- </td>
- <td class="webpage-list-tool">
- {{if $edit}}
- <a href="{{$baseurl}}/{{$item.url}}" title="{{$edit}}"><i class="fa fa-pencil"></i></a>
- {{/if}}
- </td>
- <td class="webpage-list-tool">
- {{if $item.bb_element}}
- <a href="rpost?attachment={{$item.bb_element}}" title="{{$share}}"><i class="fa fa-share-square-o"></i></a>
- {{/if}}
- </td>
- <td class="webpage-list-tool">
- {{if $edit}}
- <a href="#" title="{{$delete}}" onclick="dropItem('item/drop/{{$item.url}}', '#webpage-list-item-{{$item.url}}'); return false;"><i class="fa fa-trash-o drop-icons"></i></a>
- {{/if}}
- </td>
- <td class="hidden-xs">
- {{$item.created}}
- </td>
- <td class="hidden-xs">
- {{$item.edited}}
- </td>
- </tr>
- {{/foreach}}
- {{/foreach}}
- </table>
- </div>
- {{/if}}
- <div class="clear"></div>
+ </form>
</div>
+