preview button fixed
This commit is contained in:
parent
66b37d17ee
commit
b854e25b30
|
@ -21,8 +21,14 @@ module Admin::AnnouncementsHelper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
ann_page = pages.first if ann_page.nil?
|
|
||||||
request.protocol+(request.host_with_port+ann_page.url+'/'+bulletin.to_param).gsub('//','/') rescue "/"
|
if Page.where(:module=>'announcement',:url => "/announcement").count ==1
|
||||||
|
ann_page = '/announcement'
|
||||||
|
else
|
||||||
|
ann_page = pages.first.url if ann_page.nil?
|
||||||
|
end
|
||||||
|
|
||||||
|
request.protocol+(request.host_with_port+ann_page+'/'+bulletin.to_param).gsub('//','/') rescue "/"
|
||||||
end
|
end
|
||||||
|
|
||||||
def load_access_level
|
def load_access_level
|
||||||
|
|
|
@ -80,3 +80,14 @@
|
||||||
content_tag :div, paginate(@bulletins), class: "pagination pagination-centered"
|
content_tag :div, paginate(@bulletins), class: "pagination pagination-centered"
|
||||||
end
|
end
|
||||||
%>
|
%>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(".appoval_button").on("click",function(){
|
||||||
|
var url = $(this).data("approve-link"),
|
||||||
|
modal = $("#approvalModal");
|
||||||
|
modal.find("iframe").attr("src", url);
|
||||||
|
modal.find("#object_id").val($(this).data("id"));
|
||||||
|
modal.modal("show");
|
||||||
|
return false;
|
||||||
|
})
|
||||||
|
</script>
|
|
@ -6,14 +6,3 @@
|
||||||
<%= render 'layouts/delete_modal', delete_options: @delete_options %>
|
<%= render 'layouts/delete_modal', delete_options: @delete_options %>
|
||||||
|
|
||||||
<%= render :partial=> "approval_modal" %>
|
<%= render :partial=> "approval_modal" %>
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(".appoval_button").on("click",function(){
|
|
||||||
var url = $(this).data("approve-link"),
|
|
||||||
modal = $("#approvalModal");
|
|
||||||
modal.find("iframe").attr("src", url);
|
|
||||||
modal.find("#object_id").val($(this).data("id"));
|
|
||||||
modal.modal("show");
|
|
||||||
return false;
|
|
||||||
})
|
|
||||||
</script>
|
|
Reference in New Issue