Fix bug.
This commit is contained in:
parent
919bb6eca3
commit
5f24254ae3
|
@ -611,21 +611,53 @@ class Admin::PersonalPluginFieldsController < OrbitMemberController
|
|||
break
|
||||
end
|
||||
end
|
||||
new_text = new_text.gsub(/parse_again_start((?:(?!parse_again_start).)+)parse_again_end/m) do |ff|
|
||||
parse_content = $1 #last match
|
||||
new_text = new_text.gsub(/[ \t]*parse_again_start((?:(?!parse_again_start).)+)parse_again_end[ \t]*(\r\n|\n)/m) do |ff|
|
||||
@parse_again_mode = true
|
||||
parse_content = $1 #parse_again block contents
|
||||
result = ff
|
||||
if include_key($1,k)
|
||||
start_index = 0
|
||||
end_index = parse_content.length
|
||||
start_index = 2 if parse_content[0..1] == "\r\n"
|
||||
end_index = end_index - 2 if parse_content[(end_index - 2)..(end_index - 1)] == "\r\n"
|
||||
parse_content = parse_content.slice(start_index,end_index)
|
||||
match_count = parse_content.match(/^ *\* *\d+/m)
|
||||
match_count = match_count ? match_count[0] : nil
|
||||
exist_condition = parse_content.split("\n")[0].match(/if[ ]+#{::Regexp.escape(k)}(?=\.| |$)/)
|
||||
extra_cond = nil
|
||||
if exist_condition
|
||||
exist_condition = exist_condition[0]
|
||||
parse_content = parse_content[ parse_content.index(exist_condition) + exist_condition.length..-1]
|
||||
extra_cond = parse_content.match(/^\.count *(\!|\<|\>|\=)(\=|) *\d+/)
|
||||
if extra_cond
|
||||
extra_cond = extra_cond[0]
|
||||
exist_condition += extra_cond
|
||||
parse_content = parse_content[extra_cond.length..-1]
|
||||
exist_condition = eval("vv"+extra_cond) ? exist_condition : nil
|
||||
elsif vv.count == 0
|
||||
exist_condition = nil
|
||||
end
|
||||
if exist_condition.nil?
|
||||
match_count = nil
|
||||
parse_content = ""
|
||||
result = ""
|
||||
end
|
||||
elsif match_count
|
||||
parse_content = parse_content[match_count.length..-1]
|
||||
end
|
||||
parse_content = parse_content.sub(/[ \t]+\z/m, '').sub(/\A(\r\n|\n)/, '')
|
||||
if include_key(parse_content,k)
|
||||
vv_count = vv.count
|
||||
if match_count
|
||||
vv_count = [vv_count, match_count.strip[1..-1].to_i].min
|
||||
end
|
||||
if inner
|
||||
result = (0...vv.count).map {|ii| replace_text_with_pattern(parse_content,false,i,ii,true) }.join("")
|
||||
result = (0...vv_count).map {|ii| replace_text_with_pattern(parse_content,false,i,ii,true) }.join("")
|
||||
else
|
||||
result = (0...vv.count).map {|ii| replace_text_with_pattern(parse_content,false,ii) }.join("")
|
||||
result = (0...vv_count).map {|ii| replace_text_with_pattern(parse_content,false,ii) }.join("")
|
||||
end
|
||||
elsif match_count || exist_condition
|
||||
count = 1
|
||||
if match_count
|
||||
count = match_count.strip[1..-1].to_i
|
||||
end
|
||||
result = (0...count).map {|ii| parse_content }.join("")
|
||||
end
|
||||
@parse_again_mode = false
|
||||
result
|
||||
end
|
||||
end
|
||||
|
@ -637,7 +669,9 @@ class Admin::PersonalPluginFieldsController < OrbitMemberController
|
|||
end
|
||||
def gsub_text_by_key_value(text,k,v)
|
||||
@blank_texts = []
|
||||
text.gsub(/\n(\s*)[^\n]*(#{k}|#{k.classify})/m) {|ff| @blank_texts << $1.gsub(/(\r\n|\n)/,'')}
|
||||
if !@parse_again_mode
|
||||
text.gsub(/\n(\s+)[^\n]*(#{k}|#{k.classify})/m) {|ff| @blank_texts << $1.gsub(/(\r\n|\n)/,'')}
|
||||
end
|
||||
i = 0
|
||||
text = text.gsub(k + "s"){|ff| v.pluralize.gsub("\n","\n#{@blank_texts[i]}")}
|
||||
text = text.gsub(k ){|ff| v.gsub("\n","\n#{@blank_texts[i]}")}
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
<div class="controls">
|
||||
<% f.object.related_modal_name.each_with_index do |related_modal_name,i| %>
|
||||
<div>
|
||||
<%= text_field_tag "#{f.object_name}[related_modal_name][]", related_modal_name,placeholder: thead_field("related_modal_name"), class: "related_modal_name" %>
|
||||
<%= text_field_tag "#{f.object_name}[related_modal_name][]", related_modal_name,placeholder: thead_field("related_modal_name"), class: "related_modal_name", title: thead_field("related_modal_name") %>
|
||||
<button type="button" class="remove_related_modal" index="<%=i%>"><%=t(:remove)%></button>
|
||||
</div>
|
||||
<% end %>
|
||||
|
@ -162,7 +162,7 @@
|
|||
$(this).parents('.start-line').hide();
|
||||
}
|
||||
});
|
||||
var related_modal_name_html = '<%= text_field_tag "#{f.object_name}[related_modal_name][]", '',placeholder: thead_field("related_modal_name"), class: "related_modal_name" %>';
|
||||
var related_modal_name_html = '<%= text_field_tag "#{f.object_name}[related_modal_name][]", '',placeholder: thead_field("related_modal_name"), class: "related_modal_name", title: thead_field("related_modal_name") %>';
|
||||
related_modal_name_html = $("<div></div>").append(related_modal_name_html);
|
||||
related_modal_name_html.append("<button type=\"button\" class=\"remove_related_modal\"><%=t(:remove) %></button>")
|
||||
$(".remove_btn").off("click").on("click",function(){
|
||||
|
@ -276,7 +276,11 @@
|
|||
$('tr >:last-child').css( 'border','');
|
||||
}
|
||||
})
|
||||
|
||||
$(document).on('blur', 'input.related_modal_name', function(){
|
||||
var _this = $(this);
|
||||
var idx = _this.index('input.related_modal_name');
|
||||
$('span.related_modal_name').eq(idx).text(_this.val());
|
||||
})
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.module-area .control-group {
|
||||
|
|
|
@ -11,20 +11,20 @@
|
|||
<% ii = -1 %>
|
||||
<% object.primary_modal_fields.each do |field_value| %>
|
||||
<% next if (!access_field_types.include?(field_value[:field_type]) rescue false) %>
|
||||
<% content = check_box_tag("#{f.object_name}[]", field_value[:field_name] , (object.send(root_name)[page_name].include?(field_value[:field_name]) rescue false),:id=>nil,:class=>"#{page_name}_fields") %>
|
||||
<% content = check_box_tag("#{f.object_name}[#{root_name}][#{page_name}][]", field_value[:field_name] , (object.send(root_name)[page_name].include?(field_value[:field_name]) rescue false),:id=>nil,:class=>"#{page_name}_fields") %>
|
||||
<% tds << "<td data-index=\"#{ii+=1}\">#{field_value[:translation_name][I18n.locale] rescue ""}-#{field_value[:field_name]}<hr class=\"border-hr\">#{content}</td>" %>
|
||||
<% end %>
|
||||
<% if !defined?(access_field_types) %>
|
||||
<% f.object.related_modal_name.each_with_index do |related_modal_name,i| %>
|
||||
<% field_values = f.object.related_modal_fields[i].to_a %>
|
||||
<% field_values.each do |field_value| %>
|
||||
<% content = check_box_tag("#{f.object_name}[]", "#{related_modal_name+'.'+field_value[:field_name]}" , (object.send(root_name)[page_name].include?(related_modal_name+'.'+field_value[:field_name]) rescue false),:id=>nil,:class=>"#{page_name}_fields") %>
|
||||
<% content = check_box_tag("#{f.object_name}[#{root_name}][#{page_name}][]", "#{related_modal_name+'.'+field_value[:field_name]}" , (object.send(root_name)[page_name].include?(related_modal_name+'.'+field_value[:field_name]) rescue false),:id=>nil,:class=>"#{page_name}_fields") %>
|
||||
<% tds << "<td data-index=\"#{ii+=1}\">#{related_modal_name}-#{field_value[:translation_name][I18n.locale] rescue ""}-#{field_value[:field_name]}<hr class=\"border-hr\">#{content}</td>" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% author_name_translation = @personal_plugin_field.author_name_translations[locale] rescue ""
|
||||
author_name_translation = I18n.t("personal_plugins.author") if author_name_translation.blank? %>
|
||||
<% content = check_box_tag("#{f.object_name}[]", "member_profile" , (object.send(root_name)[page_name].include?("member_profile") rescue false),:id=>nil) %>
|
||||
<% content = check_box_tag("#{f.object_name}[#{root_name}][#{page_name}][]", "member_profile" , (object.send(root_name)[page_name].include?("member_profile") rescue false),:id=>nil) %>
|
||||
<% tds << "<td data-index=\"#{ii+=1}\">#{author_name_translation}<hr class=\"border-hr\">#{content}</td>" %>
|
||||
<% end %>
|
||||
<% fields_order = (0...tds.count).to_a
|
||||
|
|
|
@ -60,11 +60,11 @@ module Admin::PluginTemplatesHelper
|
|||
case type
|
||||
when "default"
|
||||
jls = []
|
||||
parse_again_start
|
||||
parse_again_start
|
||||
when "plugin_template_related"
|
||||
jls = PluginTemplateRelated.all
|
||||
main_field_name = "plugin_template_related_main_field"
|
||||
parse_again_end
|
||||
parse_again_end
|
||||
else
|
||||
jls = []
|
||||
end
|
||||
|
@ -102,10 +102,10 @@ parse_again_end
|
|||
case type
|
||||
when "default"
|
||||
t = filter_data(PluginTemplate, current_analysis_field_name, next_analysis_field_name, mps).count rescue 0
|
||||
parse_again_start
|
||||
parse_again_start
|
||||
when "plugin_template_related"
|
||||
t = filter_data(PluginTemplate, current_analysis_field_name, next_analysis_field_name, mps).where(:plugin_template_related_id => nil).count rescue 0
|
||||
parse_again_end
|
||||
parse_again_end
|
||||
else
|
||||
t = filter_data(PluginTemplate, current_analysis_field_name, next_analysis_field_name, mps).count rescue 0
|
||||
end
|
||||
|
|
|
@ -5,27 +5,26 @@ class PluginTemplate
|
|||
include MemberHelper
|
||||
include Slug
|
||||
|
||||
|
||||
col_fields
|
||||
|
||||
plugin_template_related_files_fields
|
||||
|
||||
parse_again_start
|
||||
parse_again_start
|
||||
belongs_to :plugin_template_related
|
||||
parse_again_end
|
||||
parse_again_end
|
||||
|
||||
field :rss2_id
|
||||
belongs_to :member_profile
|
||||
|
||||
index(plugin_template_sort_hash, { unique: false, background: false })
|
||||
scope :sort_hash, ->{ order_by(plugin_template_sort_hash) }
|
||||
scope :sort_for_frontend, ->{ where(:is_hidden=>false).order_by(plugin_template_sort_hash) }
|
||||
|
||||
parse_again_start
|
||||
parse_again_start
|
||||
member_methods_define
|
||||
parse_again_end
|
||||
parse_again_start
|
||||
parse_again_end
|
||||
parse_again_start
|
||||
periodic_methods_define
|
||||
parse_again_end
|
||||
parse_again_end
|
||||
before_save do
|
||||
before_save_codes
|
||||
end
|
||||
|
@ -57,23 +56,29 @@ parse_again_end
|
|||
|
||||
fields_to_show = fields_to_show - fields_to_remove
|
||||
|
||||
plugin_datas = datas.sort_for_frontend.collect.with_index do |p,index|
|
||||
plugin_datas = datas.sort_for_frontend.collect.with_index do |p,idx|
|
||||
|
||||
pd_data = []
|
||||
fields_to_show.collect do |t|
|
||||
pd_data << { "data_title" => p.display_field(t) }
|
||||
end
|
||||
|
||||
parse_again_start * 1 if plugin_template_related.count > 0
|
||||
{
|
||||
"pd_datas" => pd_data,
|
||||
"type-sort" => (p.course_category.sort_position.to_i rescue 1000),
|
||||
"sort-index" => index
|
||||
"type-sort" => (p.plugin_template_related.sort_position.to_i rescue 1000),
|
||||
"sort-index" => idx
|
||||
}
|
||||
|
||||
parse_again_end
|
||||
parse_again_start * 1 if plugin_template_related.count == 0
|
||||
{
|
||||
"pd_datas" => pd_data
|
||||
}
|
||||
parse_again_end
|
||||
end
|
||||
parse_again_start * 1 if plugin_template_related.count > 0
|
||||
plugin_datas = plugin_datas.sort_by{|pd| [pd["type-sort"], pd["sort-index"]]}
|
||||
parse_again_end
|
||||
return [pd_title,plugin_datas]
|
||||
|
||||
end
|
||||
|
||||
def get_plugin_data(fields_to_show)
|
||||
|
@ -105,5 +110,4 @@ parse_again_end
|
|||
plugin_template = self
|
||||
display_field_code
|
||||
end
|
||||
|
||||
end
|
|
@ -1,4 +1,3 @@
|
|||
class PluginTemplateIntro < PersonalPluginIntro
|
||||
|
||||
|
||||
end
|
|
@ -21,5 +21,4 @@ class PluginTemplateLink
|
|||
self.url = 'http://' + self.url
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -3,9 +3,10 @@ class PluginTemplateRelated
|
|||
include Mongoid::Timestamps
|
||||
|
||||
col_related_fields
|
||||
field :sort_position, type: Integer, default: 0
|
||||
|
||||
has_many :plugin_templates
|
||||
parse_again_start
|
||||
parse_again_start
|
||||
related_periodic_methods_define
|
||||
parse_again_end
|
||||
parse_again_end
|
||||
end
|
|
@ -40,7 +40,7 @@
|
|||
<% @site_in_use_locales.each_with_index do |locale, i| %>
|
||||
|
||||
<div class="<%= locale %> tab-pane fade <%= ( i == 0 ) ? "in active" : '' %>">
|
||||
parse_again_start
|
||||
parse_again_start
|
||||
<!-- locale_fields -->
|
||||
<div class="control-group input-title">
|
||||
<label class="control-label muted"><%= t("personal_plugin_template.locale_fields") %></label>
|
||||
|
@ -48,7 +48,7 @@ parse_again_start
|
|||
locale_fields_input_fields
|
||||
</div>
|
||||
</div>
|
||||
parse_again_end
|
||||
parse_again_end
|
||||
</div>
|
||||
<% end %>
|
||||
<!-- Link -->
|
||||
|
@ -164,7 +164,7 @@ parse_again_end
|
|||
</div>
|
||||
|
||||
<% end %>
|
||||
parse_again_start
|
||||
parse_again_start
|
||||
<!-- none_locale_fields -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t("personal_plugin_template.none_locale_fields") %></label>
|
||||
|
@ -172,8 +172,8 @@ parse_again_start
|
|||
none_locale_fields_input_fields
|
||||
</div>
|
||||
</div>
|
||||
parse_again_end
|
||||
parse_again_start
|
||||
parse_again_end
|
||||
parse_again_start
|
||||
<!-- plugin_template_related -->
|
||||
<div class="control-group big-group">
|
||||
<label class="control-label muted"><%= t("personal_plugin_template.plugin_template_related.plugin_template_related_main_field") %></label>
|
||||
|
@ -181,7 +181,7 @@ parse_again_start
|
|||
<%= f.select :plugin_template_related_id, PluginTemplateRelated.all.collect {|t| [ t.plugin_template_related_main_field, t.id ]}, { include_blank: true } %>
|
||||
</div>
|
||||
</div>
|
||||
parse_again_end
|
||||
parse_again_end
|
||||
</div>
|
||||
<!-- Status Module -->
|
||||
<div class="tab-pane fade" id="status">
|
||||
|
|
|
@ -1,19 +1,21 @@
|
|||
<thead>
|
||||
<tr>
|
||||
parse_again_start
|
||||
parse_again_start
|
||||
<th><%= t("personal_plugin_template.plugin_template_related.related_backend_index_fields") %></th>
|
||||
parse_again_end
|
||||
parse_again_end
|
||||
<th><%= t(:action) %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @plugin_template_relateds.each do |plugin_template_related| %>
|
||||
<tr id="<%= dom_id plugin_template_related %>">
|
||||
parse_again_start
|
||||
parse_again_start
|
||||
<td>related_backend_index_fields_contents</td>
|
||||
parse_again_end
|
||||
parse_again_end
|
||||
<td class="span2">
|
||||
<a href="<%= edit_admin_plugin_template_related_path(plugin_template_related) %>#plugin_template_related_modal" data-toggle="modal" data-remote="true" class="action"><%= t(:edit) %></a>
|
||||
<a href="<%= edit_admin_plugin_template_related_path(plugin_template_related) %>#plugin_template_related_modal" data-toggle="modal" data-remote="true" class="action">
|
||||
<%= t(:edit) %>
|
||||
</a>
|
||||
<%= link_to t(:delete_), admin_plugin_template_related_path(plugin_template_related), "data-confirm" => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<% @plugin_templates.each do |plugin_template| %>
|
||||
<tr id="<%= dom_id plugin_template %>" class="with_action">
|
||||
parse_again_start
|
||||
parse_again_start
|
||||
<td> backend_index_fields_contents </td>
|
||||
parse_again_end
|
||||
parse_again_end
|
||||
</tr>
|
||||
<% end %>
|
|
@ -48,10 +48,10 @@
|
|||
<div class="control-group input-title">
|
||||
<label class="control-label muted"><%= t("personal_plugin_template.graph_by") %> : </label>
|
||||
<div class="controls">
|
||||
parse_again_start
|
||||
parse_again_start
|
||||
<%= t("personal_plugin_template.plugin_template_related.plugin_template_related_main_field") %>
|
||||
<input type="radio" name="graph_by" class="graph-type" value="plugin_template_related">
|
||||
parse_again_end
|
||||
parse_again_end
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -84,8 +84,7 @@ parse_again_end
|
|||
form.form.on("submit",function(){return false;})
|
||||
|
||||
$("#generate_excel").on("click",function(){
|
||||
window.location.href = "/admin/plugin_templates/download_excel.xlsx?" + "analysis_field_name_start=" + form.form.find("[name=analysis_field_name_start]").val() + "&analysis_field_name_end=" + form.form.find("[name=analysis_field_name_end]").val() + "&time_zone=" +
|
||||
time_zone_string;
|
||||
window.location.href = "/admin/plugin_templates/download_excel.xlsx?" + "analysis_field_name_start=" + form.form.find("[name=analysis_field_name_start]").val() + "&analysis_field_name_end=" + form.form.find("[name=analysis_field_name_end]").val() + "&time_zone=" + time_zone_string;
|
||||
return false;
|
||||
})
|
||||
|
||||
|
@ -117,7 +116,3 @@ parse_again_end
|
|||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -8,18 +8,18 @@ wb = xlsx_package.workbook
|
|||
heading = sheet.styles.add_style(:b => true, :locked => true)
|
||||
|
||||
row = [t("personal_plugin_template.member_profile")]
|
||||
parse_again_start
|
||||
parse_again_start
|
||||
@site_in_use_locales.each do |locale|
|
||||
row << t("personal_plugin_template.locale_fields") + " - " + t(locale.to_s)
|
||||
end
|
||||
parse_again_end
|
||||
parse_again_start
|
||||
parse_again_end
|
||||
parse_again_start
|
||||
row << t("personal_plugin_template.none_locale_fields")
|
||||
parse_again_end
|
||||
parse_again_start
|
||||
parse_again_end
|
||||
parse_again_start
|
||||
row << t("personal_plugin_template.plugin_template_related.plugin_template_related_main_field")
|
||||
parse_again_end
|
||||
parse_again_start
|
||||
parse_again_end
|
||||
parse_again_start
|
||||
row << t("personal_plugin_template.plugin_template_file")
|
||||
@site_in_use_locales.each do |locale|
|
||||
row << t("personal_plugin_template.plugin_template_file") + " " + t("description") + " - " + t(locale.to_s)
|
||||
|
@ -27,29 +27,29 @@ parse_again_start
|
|||
@site_in_use_locales.each do |locale|
|
||||
row << t("personal_plugin_template.plugin_template_file") + " " + t("alternative") + " - " + t(locale.to_s)
|
||||
end
|
||||
parse_again_end
|
||||
parse_again_start
|
||||
parse_again_end
|
||||
parse_again_start
|
||||
row << t("personal_plugin_template.plugin_template_link")
|
||||
@site_in_use_locales.each do |locale|
|
||||
row << t("personal_plugin_template.plugin_template_link") + " " + t("url_alt") + " - " + t(locale.to_s)
|
||||
end
|
||||
parse_again_end
|
||||
parse_again_end
|
||||
sheet.add_row row, :style => heading
|
||||
|
||||
data.each do |plugin_template|
|
||||
row = [(plugin_template.member_profile.name rescue "")]
|
||||
parse_again_start
|
||||
parse_again_start
|
||||
@site_in_use_locales.each do |locale|
|
||||
row << plugin_template.locale_fields_translations[locale.to_s]
|
||||
end
|
||||
parse_again_end
|
||||
parse_again_start
|
||||
parse_again_end
|
||||
parse_again_start
|
||||
row << plugin_template.display_field("none_locale_fields",true)
|
||||
parse_again_end
|
||||
parse_again_start
|
||||
parse_again_end
|
||||
parse_again_start
|
||||
row << (plugin_template.plugin_template_related.plugin_template_related_main_field rescue "")
|
||||
parse_again_end
|
||||
parse_again_start
|
||||
parse_again_end
|
||||
parse_again_start
|
||||
plugin_template_files = plugin_template.plugin_template_files.asc(:created_at)
|
||||
row << plugin_template_files.collect{|f| (@host_url + f.file.url rescue nil)}.join(";")
|
||||
@site_in_use_locales.each do |locale|
|
||||
|
@ -58,14 +58,14 @@ parse_again_start
|
|||
@site_in_use_locales.each do |locale|
|
||||
row << plugin_template_files.collect{|l| l.title_translations[locale]}.join(";")
|
||||
end
|
||||
parse_again_end
|
||||
parse_again_start
|
||||
parse_again_end
|
||||
parse_again_start
|
||||
plugin_template_links = plugin_template.plugin_template_links.asc(:created_at)
|
||||
row << plugin_template_links.collect{|l| l.url}.join(";")
|
||||
@site_in_use_locales.each do |locale|
|
||||
row << plugin_template_links.collect{|l| l.title_translations[locale]}.join(";")
|
||||
end
|
||||
parse_again_end
|
||||
parse_again_end
|
||||
sheet.add_row row
|
||||
end
|
||||
end
|
||||
|
|
|
@ -53,11 +53,8 @@
|
|||
|
||||
<!-- Language -->
|
||||
<div class="tab-content language-area">
|
||||
|
||||
<% @site_in_use_locales.each_with_index do |locale, i| %>
|
||||
|
||||
<div class="<%= locale %> tab-pane fade <%= ( i == 0 ) ? "in active" : '' %>">
|
||||
|
||||
<!-- Content -->
|
||||
<div class="control-group input-content">
|
||||
<label class="control-label muted"><%= t(:content) %></label>
|
||||
|
@ -69,18 +66,9 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Form Actions -->
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
<div class="bottomnav clearfix">
|
||||
<div class="action pull-right">
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t(:new_), new_admin_plugin_template_path, :class => 'btn btn-primary' %>
|
||||
parse_again_start * 1 if plugin_template_related.count == 0
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-cog icon-white') + t('setting'), admin_plugin_template_setting_path, :class => 'btn btn-primary pull-right' %>
|
||||
parse_again_end
|
||||
</div>
|
||||
<div class="pagination pagination-centered">
|
||||
<%= content_tag :div, paginate(@plugin_templates), class: "pagination pagination-centered" %>
|
||||
|
|
|
@ -24,9 +24,9 @@ Rails.application.routes.draw do
|
|||
end
|
||||
end
|
||||
end
|
||||
parse_again_start
|
||||
parse_again_start
|
||||
resources :plugin_template_relateds
|
||||
parse_again_end
|
||||
parse_again_end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue