preview button fixed
This commit is contained in:
parent
66b37d17ee
commit
b854e25b30
|
@ -21,8 +21,14 @@ module Admin::AnnouncementsHelper
|
|||
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
|
||||
|
||||
def load_access_level
|
||||
|
|
|
@ -79,4 +79,15 @@
|
|||
content_tag :div, class: "bottomnav clearfix" do
|
||||
content_tag :div, paginate(@bulletins), class: "pagination pagination-centered"
|
||||
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>
|
|
@ -5,15 +5,4 @@
|
|||
|
||||
<%= render 'layouts/delete_modal', delete_options: @delete_options %>
|
||||
|
||||
<%= 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>
|
||||
<%= render :partial=> "approval_modal" %>
|
Reference in New Issue