copy current state of medienstaatsvertrag.org, to be verified
This commit is contained in:
123
website/agenda/planung/templates/image.html
Normal file
123
website/agenda/planung/templates/image.html
Normal file
@@ -0,0 +1,123 @@
|
||||
|
||||
<link type="text/css" href="css/image_manager.css" rel="stylesheet"/>
|
||||
<link type="text/css" href="css/fileUploader.css" rel="stylesheet"/>
|
||||
<script src="js/fileUploader.js" type="text/javascript"></script>
|
||||
<script src="js/image.js" type="text/javascript"></script>
|
||||
<TMPL_IF .allow.create_image>
|
||||
<script src="js/image_upload.js" type="text/javascript"></script>
|
||||
</TMPL_IF>
|
||||
|
||||
<script>
|
||||
var project_id="<TMPL_VAR .project_id>";
|
||||
var studio_id="<TMPL_VAR .studio_id>";
|
||||
var selectedImageTab='select';
|
||||
|
||||
$(document).ready(
|
||||
function() {
|
||||
addLocalization('image');
|
||||
|
||||
//add tab change handler
|
||||
$("#image-tabs").tabs({
|
||||
activate: function(event, ui){
|
||||
if (ui==null) return;
|
||||
selectedImageTab=getSelectedTab('image-tabs');
|
||||
|
||||
<TMPL_IF .allow.create_image>
|
||||
if(selectedImageTab=="upload"){
|
||||
initUploadDialog();
|
||||
$('#imageList').hide();
|
||||
return
|
||||
}else{
|
||||
closeImageUpload();
|
||||
$('#imageList').show();
|
||||
}
|
||||
</TMPL_IF>
|
||||
}
|
||||
});
|
||||
// get initially selected tab
|
||||
selectedImageTab=getSelectedTab('image-tabs');
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<div id="content">
|
||||
<TMPL_IF .allow.read_image>
|
||||
|
||||
<div id="image-tabs">
|
||||
<ul>
|
||||
<li><a href="#image-tabs-select" value="select"><TMPL_VAR .loc.tab_select></a></li>
|
||||
<TMPL_IF .allow.update_image>
|
||||
<li><a href="#image-tabs-edit" value="edit"><TMPL_VAR .loc.tab_edit></a></li>
|
||||
</TMPL_IF>
|
||||
<TMPL_IF .allow.create_image>
|
||||
<li><a href="#image-tabs-upload" value="upload"><TMPL_VAR .loc.tab_upload></a></li>
|
||||
</TMPL_IF>
|
||||
</ul>
|
||||
|
||||
<!-- select image -->
|
||||
<div id="image-tabs-select">
|
||||
</div>
|
||||
|
||||
<!-- edit image -->
|
||||
<TMPL_IF .allow.update_image>
|
||||
<div id="image-tabs-edit">
|
||||
</div>
|
||||
</TMPL_IF>
|
||||
|
||||
<!-- upload images -->
|
||||
<TMPL_IF .allow.create_image>
|
||||
<div id="image-tabs-upload">
|
||||
<div id="img_upload">
|
||||
<div id="img_upload_result"></div>
|
||||
<form id="image_upload" method="post" action="imageUpload.cgi" enctype="multipart/form-data">
|
||||
<input type="hidden" name="project_id" value="<TMPL_VAR .project_id>">
|
||||
<input type="hidden" name="studio_id" value="<TMPL_VAR .studio_id>">
|
||||
<input id="uploader" type="file" name="image" value="<TMPL_VAR image escape=0>" accept="text/*" maxlength="1000000" size="10"/> </td>
|
||||
<button type="submit" name="action" value="upload" id="pxUpload" ><TMPL_VAR .loc.button_upload></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</TMPL_IF>
|
||||
|
||||
<!-- tabs -->
|
||||
</div>
|
||||
|
||||
<div id="imageList">
|
||||
<div style="float:right">
|
||||
<button onclick="decreaseImageSize();return false;" title="<TMPL_VAR .loc.button_zoom_out>">-</button>
|
||||
<button onclick="increaseImageSize();return false;" title="<TMPL_VAR .loc.button_zoom_in>">+</button>
|
||||
</div>
|
||||
<form id="image_manager" action="image.cgi">
|
||||
<input name="search" value="<TMPL_VAR search escape=0>" style="width:20em;">
|
||||
<input type="hidden" name="filename" value="<TMPL_VAR filename escape=0>">
|
||||
<input type="hidden" name="project_id" value="<TMPL_VAR .project_id>">
|
||||
<input type="hidden" name="studio_id" value="<TMPL_VAR .studio_id>">
|
||||
<button onclick="searchImage();return false;"><TMPL_VAR .loc.button_search></button>
|
||||
</form>
|
||||
<div style="clear:both;">
|
||||
<TMPL_VAR count> <TMPL_VAR .loc.label_search_hits><br />
|
||||
<div class="images">
|
||||
<TMPL_LOOP images>
|
||||
<div class="image"
|
||||
id="img_<TMPL_VAR id>"
|
||||
style="background-image:url('<TMPL_VAR thumb_url>')"
|
||||
title="<TMPL_VAR description>"
|
||||
onclick="imageAction('<TMPL_VAR filename>');return false;"
|
||||
>
|
||||
<div class="label"><TMPL_VAR name></div>
|
||||
</div>
|
||||
</TMPL_LOOP>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="img_editor" style="display:none"></div>
|
||||
<div id="img_image" style="display:none"></div>
|
||||
|
||||
</TMPL_IF>
|
||||
<!-- content -->
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user