Move to html5 / utf8
authorJean-Michel Vourgère <jvourger@greenpeace.org>
Mon, 27 Feb 2017 15:12:01 +0000 (15:12 +0000)
committerJean-Michel Vourgère <jvourger@greenpeace.org>
Thu, 9 Mar 2017 18:06:30 +0000 (18:06 +0000)
Also some bank / whitespace / autoclosing tags cleaning

css/squasher.css
templates/admin.tpl
templates/index.tpl
templates/login.tpl
templates/logs.tpl
templates/udmin.tpl

index 82fc6208706840343d9155ee754a41e925250038..52a7ebec6f56b57c2987a55ab14d58478849a642 100644 (file)
@@ -254,6 +254,7 @@ tr.logentry_download:hover, tr.logentry_delete:hover, tr.logentry_login:hover {
 
 /* users: user list/form wrapper */
 .white_border {
+       clear:both;
        float:left;
        border-top:0px solid #FFFFFF;
        border-bottom:0px solid #FFFFFF;
index e78c024160700709cc5b01ec7c6a5a02bb7d0b86..268e75d553a274388761d9c8604b1f9547a57444 100644 (file)
@@ -1,7 +1,5 @@
-<!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" />
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel=stylesheet href="css/squasher.css">
 <title>Squasher</title>
 <style>
@@ -9,22 +7,16 @@
 {$style_row}
 {/foreach}
 </style>
-</head>
-<body>
+
 <div class="wrappercontainer">
 
        <div class="banner">&nbsp;<div class="control">{if $user_level > 99}<a href="?">home</a>&nbsp;|&nbsp;<a href="?tools=access">access</a>&nbsp;|&nbsp;<a href="?tools=users">users</a>&nbsp;|&nbsp;<a href="?tools=logs">logs</a>&nbsp;|{/if}&nbsp;<a href="index.php?tools=logout">logout({$user_name|escape})</a>&nbsp;</div></div>
 
        <div class="menucontainer">
-
                <div class="menu">
-
                        <div class="menuhead">users</div>
-
                        {foreach item=user key=user_id from=$users}<a {if $user_id eq $edited_user}class="selected"{/if} href="?tools=access&amp;user={$user.id|escape:'url'}">{$user.name|escape}</a>{/foreach}
-
                </div>
-
        </div>
 
 <div class="content">
        </div>
 
        <form method='post'>
-       <input type='hidden' name='formtype' value='folderrights' />
-       <input type='hidden' name='edited_user' value='{$edited_user|escape}' />
+       <input type='hidden' name='formtype' value='folderrights'>
+       <input type='hidden' name='edited_user' value='{$edited_user|escape}'>
        {$layout}
 
-       <div style='float:left;'><input type='submit' value='Save'/></div>
+       <div style='float:left;'><input type='submit' value='Save'></div>
 
        </form>
 
@@ -51,5 +43,4 @@
        <div class="footer">&nbsp;</div>
 </div>
 {if $debug}{debug}{/if}
-</body>
-</html>
+{* vim: set syntax=smarty ts=4 sw=4 sts=4 sr noet: *}
index cd5e8c7be4b7a12db56aa18d2babe7b0b12daf0e..ff8fac77bc8ccecd17c023e3c7658b6a9c60246d 100644 (file)
@@ -1,74 +1,64 @@
-<!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" />
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel=stylesheet href="css/squasher.css">
 <title>Squasher</title>
-<script type="text/javascript" language="JavaScript">{literal}
-   function toggle_id(hideshow){
-    if(document.getElementById(hideshow).style.visibility == 'visible') {
-     document.getElementById(hideshow).style.visibility = 'hidden';
-    }else{
-     document.getElementById(hideshow).style.visibility = 'visible';
-    }
-   }
-   function selectAllList() {
-    var aSelect = document.deletetool["h[]"];
-    var aSelectLen = aSelect.length;
-    for(i = 0; i < aSelectLen; i++) {
-     aSelect.options[i].selected = true;
-    }
-   }
-   function deleteFolder(foldername) {
-    if (!confirm('Are you sure you want to delete folder '+foldername+' ?'))
-     return;
-    document.rmdir.submit();
-   }
-   function deleteFolderNotEmpty(foldername) {
-    alert(foldername+' in not empty. Please empty it first');
-   }
-   function createFolder() {
-    var folder = prompt("New folder name");
-    if (folder == null)
-     return; // canceled
-    if (folder.indexOf('/')>=0 || folder=='.' || folder=='..') {
-     // detect the most common errors
-     alert('Invalid name');
-     return;
-    }
-    document.mkdir.newname.value = folder;
-    document.mkdir.submit();
-   }
-{/literal}</script>
-</head>
-<body>
+<script type="text/javascript" language="JavaScript">
+       {literal}
+       function toggle_id(hideshow){
+               if(document.getElementById(hideshow).style.visibility == 'visible') {
+                       document.getElementById(hideshow).style.visibility = 'hidden';
+               }else{
+                       document.getElementById(hideshow).style.visibility = 'visible';
+               }
+       }
+       function selectAllList() {
+               var aSelect = document.deletetool["h[]"];
+               var aSelectLen = aSelect.length;
+               for(i = 0; i < aSelectLen; i++) {
+                       aSelect.options[i].selected = true;
+               }
+       }
+       function deleteFolder(foldername) {
+               if (!confirm('Are you sure you want to delete folder '+foldername+' ?'))
+                       return;
+               document.rmdir.submit();
+       }
+       function deleteFolderNotEmpty(foldername) {
+               alert(foldername+' in not empty. Please empty it first');
+       }
+       function createFolder() {
+               var folder = prompt("New folder name");
+               if (folder == null)
+                       return; // canceled
+               if (folder.indexOf('/')>=0 || folder=='.' || folder=='..') {
+                       // detect the most common errors
+                       alert('Invalid name');
+                       return;
+               }
+               document.mkdir.newname.value = folder;
+               document.mkdir.submit();
+       }
+       {/literal}
+</script>
+
 <div class="wrappercontainer">
 
        <div class="banner">&nbsp;<div class="control">{if $user_level > 99}<a href="?">home</a>&nbsp;|&nbsp;<a href="?tools=access">access</a>&nbsp;|&nbsp;<a href="?tools=users">users</a>&nbsp;|&nbsp;<a href="?tools=logs">logs</a>&nbsp;|{/if}&nbsp;<a href="index.php?tools=logout">logout({$user_name|escape})</a>&nbsp;</div></div>
 
        <div class="menucontainer">
-
                <div class="menu">
-       
                        <div class="menuhead">current folder</div>
-       
                        {foreach item=crumb key=cookie from=$base}<a href="?path={$cookie|escape:'url'}">{$crumb|escape}</a>{/foreach}
-
                        {if $user_level > 99 AND count($base)>1 }
                                <form name=rmdir method=post>
                                <input type=hidden name=tools value=rmdir>
                                <a href="javascript:deleteFolder{if count($squashed)>0 || count($subfolders)>0}NotEmpty{/if}('{$currentfolder|escape:'javascript'|escape}');" class=tool>delete this folder</a>
                                </form>
                        {/if}
-
                </div>
-       
                <div class="menu">
-
                        <div class="menuhead">subfolders</div>
-
                        {foreach item=folder key=folderpath from=$subfolders}<a href="?path={$folderpath|escape:'url'}">{$folder|escape}</a>{/foreach}
-
                        {if $user_level > 99}
                                <form name=mkdir method=post>
                                <input type=hidden name=tools value=mkdir>
@@ -76,9 +66,7 @@
                                <a href="javascript:createFolder();" class=tool>new subfolder</a>
                                </form>
                        {/if}
-
                </div>
-
        </div>
        
        <div class="content">
        <div class="footer">&nbsp;</div>
 </div>
 {if $debug}{debug}{/if}
-</body>
-</html>
+{* vim: set syntax=smarty ts=4 sw=4 sts=4 sr noet: *}
index dae1d23b2e07208d9f2c4e036763b708d572c3fc..559f27abe07d7a1e86267968e43de6c9a2b40ad7 100644 (file)
@@ -1,7 +1,5 @@
-<!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" />
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel=stylesheet href="css/squasher.css">
 <title>Squasher</title>
 <script type="text/javascript" src="js/md5.js"></script>
@@ -11,7 +9,7 @@ function hasher(){ldelim}
        document.loginform.pass.value=hex_md5(hex_md5(document.loginform.pass.value)+salt);
 {rdelim}
 </script>
-<body>
+
 <div class="wrappercontainer" style="text-align:center;">
 
        <div class="banner">&nbsp;</div>
@@ -34,5 +32,4 @@ function hasher(){ldelim}
 
 </div>
 {if $debug}{debug}{/if}
-</body>
-</html>
+{* vim: set syntax=smarty ts=4 sw=4 sts=4 sr noet: *}
index fc9b4ec320d36725e64408fe5e9bc543a702b60d..67433eabc5351693955d5f76de478277387fe342 100644 (file)
-<!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" />
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel=stylesheet href="css/squasher.css">
 <title>Squasher</title>
-</head>
-<body>
+
 <div class="wrappercontainer">
 
        <div class="banner">&nbsp;<div class="control">{if $user_level > 99}<a href="?">home</a>&nbsp;|&nbsp;<a href="?tools=access">access</a>&nbsp;|&nbsp;<a href="?tools=users">users</a>&nbsp;|&nbsp;<a href="?tools=logs">logs</a>&nbsp;|{/if}&nbsp;<a href="index.php?tools=logout">logout({$user_name|escape})</a>&nbsp;</div></div>
 
        <div class="menucontainer">
-
                <div class="menu">
-
                        <div class="menuhead">logs</div>
-
                        <a {if $logtype eq "all"     }class="selected"{/if} href="?tools=logs&amp;logtype=all"     >all</a>
                        <a {if $logtype eq "delete"  }class="selected"{/if} href="?tools=logs&amp;logtype=delete"  >delete</a>
                        <a {if $logtype eq "download"}class="selected"{/if} href="?tools=logs&amp;logtype=download">download</a>
                        <a {if $logtype eq "login"   }class="selected"{/if} href="?tools=logs&amp;logtype=login"   >login</a>
                        <a {if $logtype eq "debug"   }class="selected"{/if} href="?tools=logs&amp;logtype=debug"   >squasher</a>
-
                </div>
-
        </div>
 
 <div class="content">
   <table class="log">
 
    <tr class="logentry_header">
-    <td width='*' colspan="5">Today</td>
-   </tr>
+    <td width='*' colspan="5">Today
 
 {foreach item=entry from=$logs.today key=id}
    <tr class="logentry_{$entry.action|escape}" align="left">
-    <td width='160px'>&nbsp;{$entry.date|escape}</td>
-    <td width='40px' >&nbsp;{$entry.user_name|escape}</td>
-    <td width='120px' title="{$entry.users_from_ip|escape}">&nbsp;{$entry.ip|escape}</td>
-    <td width='80px' >&nbsp;{$entry.action|escape}</td>
-    <td width='*' title="{$entry.file|substr:10|escape}{if $entry.ip eq 'retry'}\n : This file did not pass validation. A request was mailed to the RO to restart the upload.{/if}{if $entry.ip eq 'cleanup'}\n : This file entry was missing all chunks. This entry was removed.{/if}">&nbsp;{$entry.file|substr:10:64|escape}</td>
-   </tr>
+    <td width='160px'>&nbsp;{$entry.date|escape}
+    <td width='40px' >&nbsp;{$entry.user_name|escape}
+    <td width='120px' title="{$entry.users_from_ip|escape}">&nbsp;{$entry.ip|escape}
+    <td width='80px' >&nbsp;{$entry.action|escape}
+    <td width='*' title="{$entry.file|substr:10|escape}{if $entry.ip eq 'retry'}\n : This file did not pass validation. A request was mailed to the RO to restart the upload.{/if}{if $entry.ip eq 'cleanup'}\n : This file entry was missing all chunks. This entry was removed.{/if}">&nbsp;{$entry.file|substr:10:64|escape}
 {foreachelse}
    <tr class="logentry_empty">
-    <td width='*' colspan="3"><hr></td>
-    <td width='120px'>Log is empty</td>
-    <td width='*'><hr></td>
-   </tr>
+    <td width='*' colspan="3"><hr>
+    <td width='120px'>Log is empty
+    <td width='*'><hr>
 {/foreach}
 
    <tr class="logentry_header">
-    <td width='*' colspan="5">Yesterday</td>
-   </tr>
+    <td width='*' colspan="5">Yesterday
 
 {foreach item=entry from=$logs.yesterday key=id}   <tr class="logentry_{$entry.action|escape}" align="left">
-    <td width='160px'>&nbsp;{$entry.date|escape}</td>
-    <td width='40px' >&nbsp;{$entry.user_name|escape}</td>
-    <td width='120px' title="{$entry.users_from_ip|escape}">&nbsp;{$entry.ip|escape}</td>
-    <td width='80px'>&nbsp;{$entry.action|escape}</td>
-    <td width='*' title="{$entry.file|substr:10|escape}{if $entry.ip eq 'retry'}\n : This file did not pass validation. A request was mailed to the RO to restart the upload.{/if}{if $entry.ip eq 'cleanup'}\n : This file entry was missing all chunks. This entry was removed.{/if}">&nbsp;{$entry.file|substr:10:64|escape}</td>
-   </tr>
+    <td width='160px'>&nbsp;{$entry.date|escape}
+    <td width='40px' >&nbsp;{$entry.user_name|escape}
+    <td width='120px' title="{$entry.users_from_ip|escape}">&nbsp;{$entry.ip|escape}
+    <td width='80px'>&nbsp;{$entry.action|escape}
+    <td width='*' title="{$entry.file|substr:10|escape}{if $entry.ip eq 'retry'}\n : This file did not pass validation. A request was mailed to the RO to restart the upload.{/if}{if $entry.ip eq 'cleanup'}\n : This file entry was missing all chunks. This entry was removed.{/if}">&nbsp;{$entry.file|substr:10:64|escape}
 {foreachelse}
    <tr class="logentry_empty">
-    <td width='*' colspan="3"><hr></td>
-    <td width='120px'>Log is empty</td>
-    <td width='*'><hr></td>
-   </tr>
+    <td width='*' colspan="3"><hr>
+    <td width='120px'>Log is empty
+    <td width='*'><hr>
 {/foreach}
 
    <tr class="logentry_header">
-    <td width='*' colspan="5">Last week</td>
-   </tr>
+    <td width='*' colspan="5">Last week
 
 {foreach item=entry from=$logs.lastweek key=id}
    <tr class="logentry_{$entry.action|escape}" align="left">
-    <td width='160px'>&nbsp;{$entry.date|escape}</td>
-    <td width='40px' >&nbsp;{$entry.user_name|escape}</td>
-    <td width='120px' title="{$entry.users_from_ip|escape}">&nbsp;{$entry.ip|escape}</td>
-    <td width='80px'>&nbsp;{$entry.action|escape}</td>
-    <td width='*' title="{$entry.file|substr:10|escape}{if $entry.ip eq 'retry'}\n : This file did not pass validation. A request was mailed to the RO to restart the upload.{/if}{if $entry.ip eq 'cleanup'}\n : This file entry was missing all chunks. This entry was removed.{/if}">&nbsp;{$entry.file|substr:10:64|escape}</td>
-   </tr>
+    <td width='160px'>&nbsp;{$entry.date|escape}
+    <td width='40px' >&nbsp;{$entry.user_name|escape}
+    <td width='120px' title="{$entry.users_from_ip|escape}">&nbsp;{$entry.ip|escape}
+    <td width='80px'>&nbsp;{$entry.action|escape}
+    <td width='*' title="{$entry.file|substr:10|escape}{if $entry.ip eq 'retry'}\n : This file did not pass validation. A request was mailed to the RO to restart the upload.{/if}{if $entry.ip eq 'cleanup'}\n : This file entry was missing all chunks. This entry was removed.{/if}">&nbsp;{$entry.file|substr:10:64|escape}
 {foreachelse}
    <tr class="logentry_empty">
-    <td width='*' colspan="3"><hr></td>
-    <td width='120px'>Log is empty</td>
-    <td width='*'><hr></td>
-   </tr>
+    <td width='*' colspan="3"><hr>
+    <td width='120px'>Log is empty
+    <td width='*'><hr>
 {/foreach}
 
    <tr class="logentry_header">
-    <td width='*' colspan="5">Older</td>
-   </tr>
+    <td width='*' colspan="5">Older
 
 {foreach item=entry from=$logs.older key=id}
    <tr class="logentry_{$entry.action|escape}" align="left">
-    <td width='160px'>&nbsp;{$entry.date|escape}</td>
-    <td width='40px' >&nbsp;{$entry.user_name|escape}</td>
-    <td width='120px' title="{$entry.users_from_ip|escape}">&nbsp;{$entry.ip|escape}</td>
-    <td width='80px'>&nbsp;{$entry.action|escape}</td>
-    <td width='*' title="{$entry.file|substr:10|escape}{if $entry.ip eq 'retry'}\n : This file did not pass validation. A request was mailed to the RO to restart the upload.{/if}{if $entry.ip eq 'cleanup'}\n : This file entry was missing all chunks. This entry was removed.{/if}">&nbsp;{$entry.file|substr:10:64|escape}</td>
-   </tr>
+    <td width='160px'>&nbsp;{$entry.date|escape}
+    <td width='40px' >&nbsp;{$entry.user_name|escape}
+    <td width='120px' title="{$entry.users_from_ip|escape}">&nbsp;{$entry.ip|escape}
+    <td width='80px'>&nbsp;{$entry.action|escape}
+    <td width='*' title="{$entry.file|substr:10|escape}{if $entry.ip eq 'retry'}\n : This file did not pass validation. A request was mailed to the RO to restart the upload.{/if}{if $entry.ip eq 'cleanup'}\n : This file entry was missing all chunks. This entry was removed.{/if}">&nbsp;{$entry.file|substr:10:64|escape}
 {foreachelse}
    <tr class="logentry_empty">
-    <td width='*' colspan="3"><hr></td>
-    <td width='120px'>Log is empty</td>
-    <td width='*'><hr></td>
-   </tr>
+    <td width='*' colspan="3"><hr>
+    <td width='120px'>Log is empty
+    <td width='*'><hr>
 {/foreach}
   </table>
 </div>
        <div class="footer">&nbsp;</div>
 </div>
 {if $debug}{debug}{/if}
-</body>
-</html>
+{* vim: set syntax=smarty ts=4 sw=4 sts=4 sr noet: *}
index 06092caac0c9a4884bb509751e094c17205ae79d..2a20a9a074e92f68933a88882e4f85c5f3043ed7 100644 (file)
@@ -1,18 +1,17 @@
-<!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" />
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link rel=stylesheet href="css/squasher.css">
 <title>Squasher</title>
-<script>{literal}
+<script>
+   {literal}
    function confirm_delete(formID) {
     if (confirm("Are you sure you want to delete this user?")) {
      document.getElementById(formID).submit();
     }
    }
-   {/literal}</script>
-</head>
-<body>
+   {/literal}
+</script>
+
 <div class="wrappercontainer">
 
        <div class="banner">&nbsp;<div class="control">{if $user_level > 99}<a href="?">home</a>&nbsp;|&nbsp;<a href="?tools=access">access</a>&nbsp;|&nbsp;<a href="?tools=users">users</a>&nbsp;|&nbsp;<a href="?tools=logs">logs</a>&nbsp;|{/if}&nbsp;<a href="index.php?tools=logout">logout({$user_name|escape})</a>&nbsp;</div></div>
        <div class="content">
 
 {foreach item=user key=user_id from=$users}
-<div class="white_border"><form method='post' name='user_{$user.id|escape}' id='user_{$user.id|escape}'><input type='hidden' name='u[user_id]' id='user_id' value='{$user.id|escape}' /><input type='hidden' name='type' id='type' value='' /><input name='u[user_name]' id='user_name' value='{$user.name|escape}' readonly /> | {html_options name='u[user_level]' id='user_level' options=$user_levels selected=$user.level} | {if $user.enabled}<a onClick="document.user_{$user.id}.type.value='disable';document.user_{$user.id}.submit();" style="cursor:pointer" >remove password</a>{else}<input name='u[user_pass]' id='user_pass' /> {/if} | <a onClick="document.user_{$user.id}.type.value='delete';confirm_delete('user_{$user.id}');" style="cursor:pointer" >delete</a> | <a onClick="document.user_{$user.id}.type.value='update';document.user_{$user.id}.submit();" style="cursor:pointer" >update</a></form></div>
-<div class="clear"></div>
+<div class="white_border">
+       <form method='post' name='user_{$user.id|escape}' id='user_{$user.id|escape}'>
+       <input type='hidden' name='u[user_id]' id='user_id' value='{$user.id|escape}'>
+       <input type='hidden' name='type' id='type' value=''>
+       <input name='u[user_name]' id='user_name' value='{$user.name|escape}' readonly>
+        | {html_options name='u[user_level]' id='user_level' options=$user_levels selected=$user.level}
+        |
+               {if $user.enabled}
+               <a onClick="document.user_{$user.id}.type.value='disable';document.user_{$user.id}.submit();" style="cursor:pointer" >remove password</a>
+               {else}
+               <input name='u[user_pass]' id='user_pass'>
+               {/if}
+        | <a onClick="document.user_{$user.id}.type.value='delete';confirm_delete('user_{$user.id}');" style="cursor:pointer" >delete</a>
+        | <a onClick="document.user_{$user.id}.type.value='update';document.user_{$user.id}.submit();" style="cursor:pointer" >update</a>
+       </form>
+</div>
 {/foreach}
-<div class="white_border"><form method='post' name='user_new' id='user_new'><input type='hidden' name='type' id='type' value='' /><input name='u[user_name]' value='' /> | {html_options name='u[user_level]' options=$user_levels } | <input name='u[user_pass]' /> | <a onClick="document.user_new.type.value='new';document.user_new.submit();" style="cursor:pointer" >add</a></form></div>
-<div class="clear"></div>
+
+<div class="white_border">
+       <form method='post' name='user_new' id='user_new'><input type='hidden' name='type' id='type' value=''>
+               <input name='u[user_name]' value=''>
+               | {html_options name='u[user_level]' options=$user_levels }
+               | <input name='u[user_pass]'>
+               | <a onClick="document.user_new.type.value='new';document.user_new.submit();" style="cursor:pointer" >add</a>
+       </form>
+</div>
 
        </div>
 
@@ -33,5 +53,4 @@
 
 </div>
 {if $debug}{debug}{/if}
-</body>
-</html>
+{* vim: set syntax=smarty ts=4 sw=4 sts=4 sr noet: *}