antville/code/Layout/$Layout.skin
Tobi Schäfer a920e6fb39 * Fixed stupid bugs in image uploader introduced lately
* Wrapped zipping of layout images in try/catch block to prevent exceptions when there is no thumbnail image
 * Introduced a more elegant way to include necessary script files (jQuery et al.) in Site.main_js_action()
 * Slightly modified jQuery "onload" calls
2008-04-28 12:19:20 +00:00

63 lines
1.8 KiB
Text

<% #main %>
<script type="text/javascript">
$(function() {
$("#addValueFields").hide();
$("#addValueLink").click(function() {
var name = prompt('<% gettext "Please enter the name of the new value:" %>');
if (name) {
var key = "value_" + name;
var emptyFields = $("#addValueFields").clone();
$("#newKey").html(name + ":").attr("id", null);
$("#newValue").attr("name", key).attr("id", key);
$("#addValueFields").show().after(emptyFields).attr("id", null);
}
return false;
});
});
</script>
<% breadcrumbs %>
<div class="ample"></div>
<p class="storyTitle"><br />
<% gettext "Layout of site {0}" <% site.title %> %></p>
<p><% gettext "Show" prefix="... "%>
<% layout.link images <% gettext "layout images" %> %>
<% layout.link skins <% gettext "layout skins" %> prefix=" | " %></p>
<p><% layout.link import prefix="... " %>
<% layout.link export prefix=" | " %>
<% layout.link reset prefix=" | " suffix=" layout" %></p>
<form id="prefs" method="post" action="<% response.action %>">
<table border="0" cellspacing="0" cellpadding="2">
<% layout.values %>
<tr id="addValueFields">
<td id="newKey" class="small"></td>
<td><input type="text" name="newValue" id="newValue" /></td>
</tr>
<tr>
<td class="small"><a href="" id="addValueLink"><% gettext "Add value" %></a></td>
<td>
<br />
<button type="submit" name="save" value="1"><% gettext Save %></button>
<a href="" class="cancel"><% gettext Cancel %></a>
</td>
</tr>
</table>
</form>
<% #import %>
<form method="post" action="<% response.action %>"
enctype="multipart/form-data">
<input type="file" name="upload" />
<button type="submit" name="submit" value="1"><% gettext Import %></button>
</form>
<% #value %>
<tr>
<td class="small"><% param.key %>:</td>
<td><input type="text" name="value_<% param.key %>"
value="<% param.value %>" /></td>
</tr>