diff options
Diffstat (limited to 'admin/template')
-rw-r--r-- | admin/template/goto/admin.tpl | 1 | ||||
-rw-r--r-- | admin/template/goto/default-layout.css | 51 | ||||
-rw-r--r-- | admin/template/goto/photos_add_direct.tpl | 185 | ||||
-rw-r--r-- | admin/template/goto/photos_add_settings.tpl | 74 |
4 files changed, 310 insertions, 1 deletions
diff --git a/admin/template/goto/admin.tpl b/admin/template/goto/admin.tpl index 2376f10b5..c2242fbca 100644 --- a/admin/template/goto/admin.tpl +++ b/admin/template/goto/admin.tpl @@ -58,6 +58,7 @@ jQuery().ready(function(){ldelim} <dt class="rdion"><span>{'Pictures'|@translate} </span></dt> <dd> <ul> + <li><a href="{$U_ADD_PHOTOS}">{'Add'|@translate}</a></li> <li><a href="{$U_WAITING}">{'Waiting'|@translate}</a></li> <li><a href="{$U_THUMBNAILS}">{'Thumbnails'|@translate}</a></li> <li><a href="{$U_RATING}">{'Rating'|@translate}</a></li> diff --git a/admin/template/goto/default-layout.css b/admin/template/goto/default-layout.css index 9f4437d06..b972ab2ec 100644 --- a/admin/template/goto/default-layout.css +++ b/admin/template/goto/default-layout.css @@ -498,4 +498,53 @@ ul.holder li.bit-box-focus a.closebutton, ul.holder li.bit-box-focus a.closebutt .hidden { display:none;} #demo ul.holder li.bit-input input { padding: 2px 0 1px; border: 1px solid #999; } -.ie6fix {height:1px;width:1px; position:absolute;top:0px;left:0px;z-index:1;}
\ No newline at end of file +.ie6fix {height:1px;width:1px; position:absolute;top:0px;left:0px;z-index:1;} + +/* Add photos, direct mode */ +#uploadBoxes P { + margin:0; + margin-bottom:2px; + padding:0; +} + +#batchLink { + text-align:center; +} + +.category_selection { + min-height:65px; + margin-top:5px; +} + +.category_selection TABLE { + margin:0; +} + +.formField { + width:650px; + margin:0 auto 20px auto; + padding:10px; + border: 2px solid #292929; +} + +.formFieldTitle { + font-weight:bold; + margin-bottom:10px; +} + +.formField P { + margin:0; +} + +.formField TH { + text-align:right; + padding-right: 5px; +} + +#uploadFormSettings input[type="text"] { + text-align:right; +} + +#uploadFormSettings TH { + width:50%; +}
\ No newline at end of file diff --git a/admin/template/goto/photos_add_direct.tpl b/admin/template/goto/photos_add_direct.tpl new file mode 100644 index 000000000..419946734 --- /dev/null +++ b/admin/template/goto/photos_add_direct.tpl @@ -0,0 +1,185 @@ +{known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"} + +{literal} +<script> +$(document).ready(function(){ + + $("input[name=category_type]").click(function () { + $("[id^=category_type_]").hide(); + $("#category_type_"+$(this).attr("value")).show(); + }); +}); +</script> +{/literal} + +{if $upload_mode eq 'html'} +{literal} +<script type="text/javascript"> +$(document).ready(function(){ + function addUploadBox() { + var uploadBox = '<p class="file"><input type="file" size="60" name="image_upload[]" /></p>'; + $(uploadBox).appendTo("#uploadBoxes"); + } + + addUploadBox(); + + $("#addUploadBox A").click(function () { + addUploadBox(); + }); +}); +</script> +{/literal} + +{elseif $upload_mode eq 'multiple'} +<script type="text/javascript" src="{$uploadify_path}/swfobject.js"></script> +<script type="text/javascript" src="{$uploadify_path}/jquery.uploadify.v2.1.0.min.js"></script> + +<script type="text/javascript"> +var uploadify_path = '{$uploadify_path}'; +var upload_id = '{$upload_id}'; +var session_id = '{$session_id}'; +var pwg_token = '{$pwg_token}'; +var buttonText = 'Browse'; + +{literal} +jQuery(document).ready(function() { + jQuery("#uploadify").uploadify({ + 'uploader' : uploadify_path + '/uploadify.swf', + 'script' : uploadify_path + '/uploadify.php', + 'scriptData' : { + 'upload_id' : upload_id, + 'session_id' : session_id, + 'pwg_token' : pwg_token, + }, + 'cancelImg' : uploadify_path + '/cancel.png', + 'queueID' : 'fileQueue', + 'auto' : false, + 'displayData' : 'speed', + 'buttonText' : buttonText, + 'multi' : true, + 'onAllComplete' : function(event, data) { + if (data.errors) { + return false; + } + else { + $("input[name=submit_upload]").click(); + } + } + }); +}); +{/literal} +</script> +{/if} + +<div class="titrePage" style="height:25px"> + <h2>{'Upload photos'|@translate}</h2> +</div> + +{if count($setup_errors) > 0} +<div class="errors"> + <ul> + {foreach from=$setup_errors item=error} + <li>{$error}</li> + {/foreach} + </ul> +</div> +{else} + +{if !empty($thumbnails)} +<fieldset> + <legend>{'Uploaded Photos'|@translate}</legend> + <div> + {foreach from=$thumbnails item=thumbnail} + <a href="{$thumbnail.link}" onclick="window.open(this.href); return false;"> + <img src="{$thumbnail.src}" alt="{$thumbnail.file}" title="{$thumbnail.title}" class="thumbnail"> + </a> + {/foreach} + </div> + <p id="batchLink"><a href="{$batch_link}">{$batch_label}</a></p> +</fieldset> +{/if} + + +<form id="uploadForm" enctype="multipart/form-data" method="post" action="{$F_ACTION}" class="properties"> +{if $upload_mode eq 'multiple'} +<input name="upload_id" value="{$upload_id}" type="hidden"> +{/if} + + <div class="formField"> + <div class="formFieldTitle">{'Drop into category'|@translate}</div> + + <label><input type="radio" name="category_type" value="existing"> {'existing category'|@translate}</label> + <label><input type="radio" name="category_type" value="new" checked="checked"> {'create a new category'|@translate}</label> + + <div id="category_type_existing" style="display:none" class="category_selection"> + <select class="categoryDropDown" name="category"> + {html_options options=$category_options} + </select> + </div> + + <div id="category_type_new" class="category_selection"> + <table> + <tr> + <td>{'Parent category'|@translate}</td> + <td> + <select class="categoryDropDown" name="category_parent"> + <option value="0">------------</option> + {html_options options=$category_options} + </select> + </td> + </tr> + <tr> + <td>{'Category name'|@translate}</td> + <td> + <input type="text" name="category_name" value="{$F_CATEGORY_NAME}" style="width:400px"> + </td> + </tr> + </table> + </div> + </div> + + <div class="formField"> + <div class="formFieldTitle">{'Who can see these photos?'|@translate}</div> + + <select name="level" size="1"> + {html_options options=$level_options selected=$level_options_selected} + </select> + </div> + + <div class="formField"> + <div class="formFieldTitle">{'Select files'|@translate}</div> + +{if $upload_mode eq 'html'} + <p><a href="{$switch_url}">{'... or switch to the multiple files form'|@translate}</a></p> + + <p>{'JPEG files or ZIP archives with JPEG files inside please.'|@translate}</p> + + <div id="uploadBoxes"></div> + <div id="addUploadBox"> + <a href="javascript:">{'+ Add an upload box'|@translate}</a> + </div> + + </div> <!-- formField --> + + <p> + <input class="submit" type="submit" name="submit_upload" value="{'Upload'|@translate}" {$TAG_INPUT_ENABLED}/> + </p> +{elseif $upload_mode eq 'multiple'} + </table> + + <p> + <input type="file" name="uploadify" id="uploadify" /> + </p> + + <p><a href="{$switch_url}">{'... or switch to the old style form'|@translate}</a></p> + + <div id="fileQueue"></div> + + </div> <!-- formField --> + <p> + <input class="submit" type="button" value="{'Upload'|@translate}" onclick="javascript:jQuery('#uploadify').uploadifyUpload()"/> + <input type="submit" name="submit_upload" style="display:none"/> + </p> +{/if} +</form> +{/if} diff --git a/admin/template/goto/photos_add_settings.tpl b/admin/template/goto/photos_add_settings.tpl new file mode 100644 index 000000000..10e4633dd --- /dev/null +++ b/admin/template/goto/photos_add_settings.tpl @@ -0,0 +1,74 @@ +{literal} +<script> +$(document).ready(function(){ + function toggleResizeFields() { + var checkbox = $("#websize_resize"); + var needToggle = $("input[name^=websize_]").not(checkbox).parents('tr'); + + if ($(checkbox).is(':checked')) { + needToggle.show(); + } + else { + needToggle.hide(); + } + } + + toggleResizeFields(); + $("#websize_resize").click(function () {toggleResizeFields()}); +}); +</script> +{/literal} + +<div class="titrePage" style="height:25px"> + <h2>{'Upload Photos'|@translate}</h2> +</div> + +<form id="uploadFormSettings" enctype="multipart/form-data" method="post" action="{$F_ACTION}" class="properties"> + + <div class="formField"> + <div class="formFieldTitle">{'Web size photo'|@translate}</div> + + <table> + <tr> + <th><label for="websize_resize">{'Resize'|@translate}</label></th> + <td><input type="checkbox" name="websize_resize" id="websize_resize" {$values.websize_resize}></td> + </tr> + <tr> + <th>{'Maximum Width'|@translate}</th> + <td><input type="text" name="websize_maxwidth" value="{$values.websize_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}</td> + </tr> + <tr> + <th>{'Maximum Height'|@translate}</th> + <td><input type="text" name="websize_maxheight" value="{$values.websize_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}</td> + </tr> + <tr> + <th>{'Image Quality'|@translate}</th> + <td><input type="text" name="websize_quality" value="{$values.websize_quality}" size="3" maxlength="3"> %</td> + </tr> + </table> + </div> + + <div class="formField"> + <div class="formFieldTitle">{'Thumbnail'|@translate}</div> + + <table> + <tr> + <th>{'Maximum Width'|@translate}</th> + <td><input type="text" name="thumb_maxwidth" value="{$values.thumb_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}</td> + </tr> + <tr> + <th>{'Maximum Height'|@translate}</th> + <td><input type="text" name="thumb_maxheight" value="{$values.thumb_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}</td> + </tr> + <tr> + <th>{'Image Quality'|@translate}</th> + <td><input type="text" name="thumb_quality" value="{$values.thumb_quality}" size="3" maxlength="3"> %</td> + </tr> + </table> + </div> + + <p> + <input class="submit" type="submit" name="submit" value="{'Save Settings'|@translate}"/> + </p> + +</form> |