Removed mass delete wip
authorJean-Michel Vourgère <jvourger@greenpeace.org>
Fri, 24 Feb 2017 22:57:32 +0000 (11:57 +1300)
committerJean-Michel Vourgère <jvourger@greenpeace.org>
Thu, 9 Mar 2017 18:06:30 +0000 (18:06 +0000)
squasher.php
templates/wip_massdelete.tpl [deleted file]

index c403e9dab07b1b4a36be0b4d37cafec8ef9d234b..6550bd45f54d57ad96f08c573a756acd48c56df6 100644 (file)
@@ -265,10 +265,7 @@ if (@$_GET['f']) {
        $smarty->assign('subfolders', $subs);
 
        //if(@$_GET[debug]) print_r($configs);
-       if (!@$_GET['newtpl'])
-               $smarty->display('index.tpl'); //Display normal template
-       else
-               $smarty->display('wip_massdelete.tpl'); //Display Work In Progress template
+       $smarty->display('index.tpl'); //Display normal template
 
 }
 // vim: syntax=php ts=4 sw=4 sts=4 sr noet
diff --git a/templates/wip_massdelete.tpl b/templates/wip_massdelete.tpl
deleted file mode 100644 (file)
index 0132fbd..0000000
+++ /dev/null
@@ -1,381 +0,0 @@
-{literal}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Squasher</title>
-<style>
-
-body{
-background-color:#E2EBD8;
-min-width:1000px;
-font-family:Arial Narrow;
-font-size:16px;
-}
-
-.wrapper{
-width: 1000px;
-margin: 10px auto;
-}
-
-.container{
-border:5px solid;
-border-color:#FFFFFF;
-color:#FFFFFF;
-left:50%;
-background: #FFFFFF;
-}
-
-.control{
-float:right;
-text-align:right;
-}
-
-.menucontainer{
-background-color:#FFFFFF;
-}
-
-.menu{
-text-align:center;
-}
-
-.menuhead{
-float:left;
-background-color:#66CC00;
-color:#003300;
-margin:1px;
-border:1px solid;
-border-color:#66CC00;
-}
-
-.menuitem{
-float:left;
-background-color:#C7F09E;
-color:#003300;
-margin:1px;
-border:1px solid;
-border-color:#E2EBD8;
-}
-
-.menuitem:hover{
-background-color:#339900;
-color:#FFFFFF;
-}
-
-.content{
-float:left;
-padding-right:5px;
-}
-
-.item, .status1, .status2, .status3{
-position:relative;
-color:#003300;
-width:600px;
-border:2px solid;
-border-color:#FFFFFF;
-font-size:12px;
-}
-
-.item{
-background-color:#E2EBD8;
-}
-.status1{
-background-color:#FFCCCC;
-}
-.status2{
-background-color:#FFFFCC;
-}
-.status3{
-background-color:#CCFFCC;
-}
-
-.name{
-float:left;
-left:1px;
-top:1px;
-padding-left:1px;
-z-index:50;
-}
-
-.center{
-float:left;
-height:inherit;
-padding-left:1px;
-}
-
-.chunks{
-float:right;
-padding-left:2px;
-padding-right:3px;
-}
-
-.size{
-float:right;
-padding-left:2px;
-padding-right:3px;
-}
-
-.added{
-float:left;
-padding-left:2px;
-padding-right:3px;
-}
-
-.updated{
-float:left;
-padding-left:2px;
-padding-right:3px;
-}
-
-.status{
-float:right;
-top:1px;
-padding-right:2px;
-text-align:right;
-z-index:10;
-}
-
-.stream{
-float:right;
-padding-left:1px;
-padding-right:2px;
-}
-
-.download{
-float:right;
-padding-left:1px;
-padding-right:2px;
-}
-
-.clear{
-clear:both;
-height:1px;
-font-size: 0;
-}
-
-.spacer{
-clear:both;
-height:10px;
-}
-
-.videoframe{
-float:left;
-width:500px;
-height:400px;
-padding-left:25px;
-}
-
-.banner{
-background-color:#66CC00;
-text-align:center;
-width:100%;
-height:45px;
-background:#66CC00 url(img/squash.gif) no-repeat 30px 50%;
-}
-
-.titel{
-background-color:#66CC00;
-text-align:center;
-}
-
-.footer{
-background-color:#66CC00;
-text-align:center;
-background:#66CC00 url(img/gplogobottomright.gif) no-repeat 100%;
-}
-
-.bottomimage{
-background: #FFFFFF url(img/gp1.gif) no-repeat 95% 95%;
-float:right;
-width:300px;
-height:146px;
-}
-
-.massdelete{
-position:absolute;
-bottom:0;
-float:right;
-width:300px;
-#height:146px;
-}
-
-.deletebox{
-visibility: hidden;
-}
-
-.filler{
-position:relative;
-float:right;
-width:300px;
-height:500px;
-}
-
-a{
-color:#003300;
-}
-
-a:hover{
-color:#FF6600;
-}
-
-</style>
-  <script type="text/javascript" language="JavaScript">
-   function toggle_id(hideshow){
-    if(document.getElementById(hideshow).style.visibility == 'visible') {
-     document.getElementById(hideshow).style.visibility = 'hidden';
-    }else{
-     document.getElementById(hideshow).style.visibility = 'visible';
-    }
-   }
-  </script></head>
-{/literal}
-<body style="min-width:1000px;">
-<div class="wrapper">
-<div class="container">
-
-       <div class="banner">&nbsp;<div class="control">{if $user_level > 99}<a href="?">home</a>&nbsp;|&nbsp;<a href="?tools=access">access</a>&nbsp;|{/if}{if $user_level > 99}&nbsp;<a href="?tools=users">users</a>&nbsp;|{/if}&nbsp;<a href="index.php?tools=logout">logout({$user_name})</a>&nbsp;</div></div>
-
-       <div class="spacer"></div>
-
-       <div class="menucontainer">
-
-       <div class="menu">
-       
-       <div class="menuhead">current folder</div>
-       
-       {foreach item=crumb key=cookie from=$base}<div class="menuitem" onClick="location.href='?path={$cookie}'" style="cursor:pointer" >{$crumb}</div>{/foreach}
-       
-       </div>
-       
-       <div class="clear"></div>
-       
-       <div class="menu">
-       
-       <div class="menuhead">subfolders</div>
-       
-       {foreach item=folder key=folderpath from=$subfolders}<div class="menuitem" onClick="location.href='?path={$folderpath}'" style="cursor:pointer" >{$folder}</div>{/foreach}
-       
-       </div>
-       
-       <div class="clear"></div>
-{*     
-       <div class="menu">
-       
-       {foreach item=dir key=path from=$paths}{if $path!=$currentfolder}<div class="menuitem" onClick="location.href='squasher.php?path={$path}'" style="cursor:pointer" >{$dir}</div>{/if}{/foreach}
-       
-       </div>
-       
-       
-       
-       <div class="clear"></div>*}
-       
-       </div>
-       
-       <div class="spacer"></div>
-
-<div class="content">
-{foreach item=item key=id from=$squashed}
-{counter assign=mass_delete_size print=false}
-{if $item.squashed}{*These items are in chunks / uploaded by the squasher tool*}
-
-{if $item.hidden eq false OR $user_level > 99 }
-               <div class={if $item.finished==true}"status3"{elseif $item.finished!=true && $item.embedable==true}"status2"{elseif $item.finished!=true && $item.embedable!=true}"status1"{else}"item"{/if}>
-
-                               <div class="name">{$item.name} {if $user_level > 99}{if $item.hidden}<font color=red>|<a href='?tools=unhide&h={$id}'>publish</a>|</font>{else}<font color=green>|<a href='?tools=hide&h={$id}'>hide</a>|</font>{/if}{if $user_level > 100}<font color=red>|<a href='?tools=delete&h={$id}' onClick="javascript:return confirm('Are you sure you want to permanently delete {$item.name}?')">delete</a>|</font>{/if}{/if}</div>
-
-                               <div class="status">status: {$item.status}</div>
-
-               <div class="clear"></div>
-
-               <div class="added">added: {$item.date}</div>
-               
-                               <!--div class="chunks"></div-->
-                               <div class="size">size:&nbsp;{if $item.size>(1024*1024)}{math equation="((x / 1024) / 1024) * (y / z)" x=$item.size y=$item.chunks_finished z=$item.chunks format="%.2f"}&nbsp;/&nbsp;{math equation="(x / 1024) / 1024" x=$item.size format="%.2f"}mb{elseif $item.size>(1024)}{math equation="(x / 1024) * (y / z)" x=$item.size y=$item.chunks_finished z=$item.chunks format="%.2f"}&nbsp;/&nbsp;{math equation="(x / 1024)" x=$item.size format="%.2f"}kb{else}{math equation="x * (y / z)" x=$item.size y=$item.chunks_finished z=$item.chunks format="%.0f"}&nbsp;/&nbsp;{$item.size}b{/if}({math equation="(y / x) * 100" x=$item.chunks y=$item.chunks_finished format="%.0f"}%)</div>
-
-               <div class="clear"></div>
-
-               <div class="updated">last updated: {$item.lastchange}</div>
-
-
-{if $item.finished==true}
-                               <div class="download"><a href='?f={$id}'>download</a></div>
-{/if}
-{if $item.embedable eq true and $item.finished eq false}
-       {if $item.mime=='video/mpeg'}
-                               <div class="stream"><a href='?f={$id}'>download ({math equation="(y / x) * 100" x=$item.chunks y=$item.chunks_partial format="%.0f"}%)</a></div>
-       {/if}
-{/if}
-
-               <div class="clear"></div>
-               </div>
-       
-               <div class="clear"></div>
-{/if}
-
-{else}{*These items are plain files / uploaded manually by the user via ftp*}
-
-{if $item.hidden eq false OR $user_level > 99 }
-               <div class={if $item.finished==true}"status3"{elseif $item.finished!=true && $item.embedable==true}"status2"{elseif $item.finished!=true && $item.embedable!=true}"status1"{else}"item"{/if}>
-
-                               <div class="name">{$item.name} {if $user_level > 99}{if $item.hidden}<font color=red>|<a href='?tools=unhide&h={$id}'>publish</a>|</font>{else}<font color=green>|<a href='?tools=hide&h={$id}'>hide</a>|</font>{/if}{if $user_level > 199}<font color=red>|<a href='?tools=delete&h={$id}' onClick="javascript:return confirm('Are you sure you want to permanently delete {$item.name}?')">delete</a>|</font>{/if}{/if}</div>
-
-                               <div class="status">status: {$item.status}</div>
-
-               <div class="clear"></div>
-
-               <div class="added">added: {$item.date}</div>
-
-                               <div class="size">size:&nbsp;{if $item.size>(1024*1024)}{math equation="(x / 1024) / 1024" x=$item.size format="%.2f"}mb{elseif $item.size>(1024)}{math equation="(x / 1024)" x=$item.size format="%.2f"}kb{else}{$item.size}b{/if}</div>
-
-               <div class="clear"></div>
-
-               <div class="updated">last updated: {$item.lastchange}</div>
-
-
-{if $item.finished==true}
-                               <div class="download"><a href='?f={$id}'>download</a></div>
-{/if}
-{if $item.embedable eq true and $item.finished eq false}
-       {if $item.mime=='video/mpeg'}
-                               <div class="stream"><a href='?f={$id}'>download (partial)</a></div>
-       {/if}
-{/if}
-
-
-               <div class="clear"></div>
-               </div>
-       
-               <div class="clear"></div>
-{/if}
-{/if}
-{/foreach}
-
-       </div>
-
-       <div class="filler">
-       <div class="bottomimage"></div>
-{if $user_level > 100 and $mass_delete_size > 0}
-               <div class="massdelete"><input type="button" value="Delete multiple items:" OnClick="toggle_id('deletebox');" ><br>
-<div class="deletebox" id="deletebox">
-       <form action="?tools=delete&h=multiple" method="post">
-               <select multiple="" size="{$mass_delete_size}" id="h" name="h[]">
-{foreach item=item key=id from=$squashed}
-                       <option value="{$id}">{$item.name}</option>
-{/foreach}
-               </select>
-               <input type="submit" value="Delete Selected Items">
-       </form>
-</div>
-       </div>
-{/if}
-       </div>
-       <div class="clear"></div>
-
-       <div class="spacer"></div>
-
-       <div class="footer">&nbsp;</div>
-
-</div>
-</div>
-{if $debug}{debug}{/if}
-</body>
-</html>