add authorization
This commit is contained in:
parent
c3a78aaf54
commit
abe3948b4c
|
@ -1,4 +1,5 @@
|
||||||
class Admin::AdBannersController < OrbitAdminController
|
class Admin::AdBannersController < OrbitAdminController
|
||||||
|
before_action ->(module_app = @app_title) { set_variables module_app }
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@banners = Banner.all
|
@banners = Banner.all
|
||||||
|
|
|
@ -111,7 +111,7 @@
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
.bottomnav{
|
.bottomnav{
|
||||||
z-index: 999;
|
/*z-index: 999;*/
|
||||||
}
|
}
|
||||||
.ad-banner-detail{
|
.ad-banner-detail{
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -167,7 +167,7 @@
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
.ad-image-btn{
|
.ad-image-btn{
|
||||||
padding: 2px 25px;
|
padding: 2px 20px;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
background: #000;
|
background: #000;
|
||||||
|
@ -198,7 +198,12 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
@media all and (max-width: 768px) {
|
@media all and (max-width: 1000px) {
|
||||||
|
.ad-banner-info table{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media all and (max-width: 767px) {
|
||||||
.ad-banner-detail{
|
.ad-banner-detail{
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
@ -227,6 +232,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<% if can_edit_or_delete?(banner) %>
|
||||||
<div class="ad-banner-edit">
|
<div class="ad-banner-edit">
|
||||||
<a data-title="<%= t(:setting) %>"
|
<a data-title="<%= t(:setting) %>"
|
||||||
data-id="<%= banner.id.to_s %>"
|
data-id="<%= banner.id.to_s %>"
|
||||||
|
@ -252,6 +258,7 @@
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div class="ad-banner-info">
|
<div class="ad-banner-info">
|
||||||
<table class="table">
|
<table class="table">
|
||||||
|
@ -268,6 +275,7 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<% if can_edit_or_delete?(banner) %>
|
||||||
<div id="ad-banner-<%= banner.id.to_s %>" class="ad-banner-detail">
|
<div id="ad-banner-<%= banner.id.to_s %>" class="ad-banner-detail">
|
||||||
<div class="ad-banner-images-wrap-arrow"></div>
|
<div class="ad-banner-images-wrap-arrow"></div>
|
||||||
<div class="ad-banner-images-wrap">
|
<div class="ad-banner-images-wrap">
|
||||||
|
@ -310,6 +318,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<% if ((i+1)%3==0) or (i+1 == @banners.count) %></div><br/ ><% end %>
|
<% if ((i+1)%3==0) or (i+1 == @banners.count) %></div><br/ ><% end %>
|
||||||
|
|
|
@ -3,19 +3,22 @@
|
||||||
<%= javascript_include_tag "cycle2" %>
|
<%= javascript_include_tag "cycle2" %>
|
||||||
<%= javascript_include_tag "ad_banner/banner_preview" %>
|
<%= javascript_include_tag "ad_banner/banner_preview" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div id="banner_index">
|
<div id="banner_index">
|
||||||
<%= render 'index' %>
|
<%= render 'index' %>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottomnav clearfix" style="left: 81px;">
|
|
||||||
|
<% if current_user.is_admin? or current_user.is_manager?(@module_app) %>
|
||||||
|
<div class="bottomnav clearfix" style="left: 81px;">
|
||||||
<div class="action pull-right">
|
<div class="action pull-right">
|
||||||
<a data-title="<%= t("ad_banner.new_banner") %>" data-id="new" data-fx="fade" class="btn btn-primary open-slide" href="#">
|
<a data-title="<%= t("ad_banner.new_banner") %>" data-id="new" data-fx="fade" class="btn btn-primary open-slide" href="#">
|
||||||
<i class="icon-plus"></i><%= t("ad_banner.new_banner") %>
|
<i class="icon-plus"></i><%= t("ad_banner.new_banner") %>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination pagination-centered"></div>
|
<div class="pagination pagination-centered"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="pageslide">
|
<div id="pageslide">
|
||||||
<div class="page-title clearfix">
|
<div class="page-title clearfix">
|
||||||
<a class="pull-right" href="javascript:$.pageslide.close()">
|
<a class="pull-right" href="javascript:$.pageslide.close()">
|
||||||
<i class="icons-arrow-left-2"></i>
|
<i class="icons-arrow-left-2"></i>
|
||||||
|
@ -37,6 +40,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= render 'layouts/delete_modal', delete_options: @delete_options %>
|
<%= render 'layouts/delete_modal', delete_options: @delete_options %>
|
||||||
|
<% end %>
|
Loading…
Reference in New Issue