20 lines
847 B
Plaintext
20 lines
847 B
Plaintext
<% active_expanded = @custom_data_field[:expanded] rescue nil %>
|
|
<div class="control-group input-content hide archive_expanded">
|
|
<label class="control-label muted" for="custom_expanded"><%=t("archive.expanded")%> :</label>
|
|
<div class="controls">
|
|
<%= select_tag("#{@field_name}[custom_data_field][expanded]", options_for_select(["yes","no"].map{|opt| [t("archive.#{opt}"),opt]},active_expanded),{:id=>"custom_expanded"})%>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
if($("#page_layout").val() == "archive_index12"){
|
|
$(".archive_expanded").addClass("show").removeClass("hide");
|
|
}
|
|
$("#page_layout").change(function(){
|
|
var value = $(this).val();
|
|
if(value == "archive_index12"){
|
|
$(".archive_expanded").addClass("show").removeClass("hide");
|
|
}else{
|
|
$(".archive_expanded").removeClass("show").addClass("hide");
|
|
}
|
|
})
|
|
</script> |