Merge branch 'design_team' into ldap
Conflicts: Gemfile.lock app/controllers/admin/module_apps_controller.rb app/controllers/application_controller.rb vendor/built_in_modules/web_resource/web_resource.json
This commit is contained in:
commit
ebc8dd33ec
108 files changed
+1148
-619
No files matched your search
@@ -1 +1 @@
|
||||
<%= render_node_and_children(Item.first(:conditions => {:parent_id => nil})) %>
|
||||
<%= render_node_and_children(Item.first(:conditions => {:parent_id => nil})) %>
|
||||
@@ -1,2 +1,3 @@
|
||||
$('#app_page_url').html("<%= escape_javascript(select 'page', 'app_frontend_url', @module_app.app_pages) %>");
|
||||
$('#app_page_category').html("<%= escape_javascript(select 'page', 'category', @categories.collect{|category| [category.i18n_variable[I18n.locale], category.id]}) if @categories %>");
|
||||
$('#app_page_category').html("<%= j (select 'page', 'category', @categories.collect{|category| [category.i18n_variable[I18n.locale], category.id]}, {:include_blank => true}) if @categories %>");
|
||||
$('#app_page_tag').html("<%= j (select 'page', 'tag', @tags.collect{|tag| [tag[I18n.locale], tag.id]}, {:include_blank => true}) if @tags %>");
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,42 @@
|
||||
<% if ob_auth -%>
|
||||
|
||||
<div class="modal hide fade in" id="ob_auth-<%=ob_auth.id%>">
|
||||
<div class="modal-header">
|
||||
<a class="close" data-dismiss="modal">×</a>
|
||||
<h3><%= t("admin.object_auth.list_title_of_users",:auth_title => ob_auth.title) %></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="clear">
|
||||
<% ob_auth.auth_users.each do |user| %>
|
||||
<div class="checkbox clear checked">
|
||||
<div class='member-avatar'>
|
||||
<% if user.avatar? %>
|
||||
<%= image_tag(user.avatar.thumb.url,:class => "member-img") %>
|
||||
<% else %>
|
||||
<%= image_tag "person.png",:class => "member-img" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= label_tag "lab-user-#{user.id}", (user.name rescue ''),:class=>"member-name",:id=>nil -%>
|
||||
</div>
|
||||
<% end -%>
|
||||
<divl>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" class="btn" data-dismiss="modal"><%= t("modal.close") %></a>
|
||||
</div>
|
||||
<div>
|
||||
<script type="text/javascript" src="/static/kernel.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
|
||||
$("#ob_auth-<%=ob_auth.id%>").on("show", function () {
|
||||
});
|
||||
$(".modal").on("hidden", function () {
|
||||
$("#show_preview").remove();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% end -%>
|
||||
@@ -0,0 +1,25 @@
|
||||
<%= content_tag :div ,:id => "users_checkbox_ary",:class => 'clear' do -%>
|
||||
<% @sys_users.each do |sys_user| -%>
|
||||
|
||||
<div class="checkblock">
|
||||
|
||||
<% sys_user.sub_roles.each do |sr| %>
|
||||
<div class="for_unit" style="display:none;"> <%= sr.key %></div>
|
||||
<% end %>
|
||||
<%= content_tag :div,:data=>{'original-title'=>t('announcement.bulletin.approval_setting_window_title'),:content => "#{sys_user.sub_roles.collect{|sr| sr.i18n_variable[I18n.locale]}.join(',')}"},:class=>"checkbox clear" do %>
|
||||
<div class="check-icon">
|
||||
</div>
|
||||
<div class='member-avatar'>
|
||||
<% if sys_user.avatar? %>
|
||||
<%= image_tag(sys_user.avatar.thumb.url,:class => "member-img") %>
|
||||
<% else %>
|
||||
<%= image_tag "person.png",:class => "member-img" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= label_tag "lab-user-#{sys_user.id}", (sys_user.name rescue ''),:class=>"member-name",:id=>nil -%>
|
||||
<%= check_box_tag "[users][#{sys_user.id}]", 'true',users.include?(sys_user),:class => "check" -%>
|
||||
<%end -%>
|
||||
</div>
|
||||
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
@@ -0,0 +1,57 @@
|
||||
<% content_for :page_specific_css do %>
|
||||
<%= stylesheet_link_tag "inc/permission-checkbox" %>
|
||||
<% end %>
|
||||
<% content_for :page_specific_javascript do %>
|
||||
<%= javascript_include_tag "inc/permission-checkbox" %>
|
||||
<%= javascript_include_tag "inc/search" %>
|
||||
<%= javascript_include_tag "inc/modal-preview" %>
|
||||
<% end %>
|
||||
<%#= label_tag :fact_check_setting, t("announcement.bulletin.fact_check_setting") %>
|
||||
<%= form_tag('', :remote => true,:class => "prevent_enter_submit_form") %>
|
||||
<div class="subnav clear">
|
||||
<ul class="nav nav-pills filter pull-left">
|
||||
<li class="accordion-group">
|
||||
<div class="form-search" style="margin: 5px 10px;">
|
||||
<%= label_tag :object, @ob_auth.auth_obj.class %>
|
||||
<%= label_tag :module,"::" %>
|
||||
<%= select "ob_auth",'id',@options_from_collection_for_select_ob_auth %>
|
||||
<%= search_field_tag 'user_filter' %>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<%= link_to t("admin.object_auth.list_title_of_users",:auth_title => @ob_auth.title), admin_object_auth_ob_auth_show_path , :class=>'preview_trigger btn btn-success pull-right'%>
|
||||
|
||||
</div>
|
||||
<%#= label_tag :role, t("admin.roles") %>
|
||||
<div class="clear">
|
||||
<%= content_tag :div do -%>
|
||||
<% form_tag admin_object_auth_ob_auth_path do %>
|
||||
<%#= render :partial => "privilege_user", :locals => {:users => @users_array} %>
|
||||
<div class="form-actions form-fixed pagination-right">
|
||||
<%= submit_tag "Update", :class => 'btn btn-primary' %>
|
||||
</div>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var availableTags = [];
|
||||
$(document).ready(function() {
|
||||
|
||||
$(".prevent_enter_submit_form").bind("keypress", function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$('#category_id').change(function() {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
dataType: "script",
|
||||
url:$(this).parents("from").attr("href"),
|
||||
data:$(this).parents("form").serialize()
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,2 @@
|
||||
$("#users_checkbox_ary").replaceWith('<%= escape_javascript(render :partial => "privilege_user", :locals => {:users => @users_array})%>');
|
||||
permissionCheckbox();
|
||||
@@ -0,0 +1 @@
|
||||
alert( "<% flash.each do |key, msg| %><%= msg %><% end%>");
|
||||
@@ -0,0 +1,2 @@
|
||||
$('#show_preview').html("<%= escape_javascript(render(:partial => 'modal_list',:locals => {:ob_auth => @ob_auth})) %>");
|
||||
var start_modal_with_id = "ob_auth-<%=@ob_auth.id%>"
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<% LIST[:page_part_kinds].each do |kind| %>
|
||||
<%= f.radio_button :kind, kind, :class => 'part_kind' %>
|
||||
<%= t(kind) %>
|
||||
<%= t(kind, :scope => 'admin.page_part_kinds') %>
|
||||
<% end %>
|
||||
|
||||
<% LIST[:page_part_kinds].each do |kind| %>
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
<div>
|
||||
<%= f.fields_for :title, @part.title do |f| %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<p>
|
||||
<%= f.label :locale, "#{t('admin.title')} #{I18nVariable.from_locale(locale)}" %>
|
||||
<%= f.text_field locale %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<span id='module_app_list'>
|
||||
<%= f.select :module_app, options_from_collection_for_select(@module_apps, :id, :title, :selected => @module_app.id), {}, {:rel => admin_page_parts_path} %>
|
||||
</span>
|
||||
|
||||
@@ -5,4 +5,10 @@
|
||||
<%= f.text_area locale, :class => 'tinymce_textarea' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
load_tinymce();
|
||||
});
|
||||
</script>
|
||||
@@ -1,10 +1,11 @@
|
||||
<%= flash_messages %>
|
||||
|
||||
<h1><%= t('admin.editing_page') %></h1>
|
||||
|
||||
<%= form_for @item, :url => admin_page_path(@item) do |f| %>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<p>
|
||||
<%= f.submit t('update') %> <%= link_back %>
|
||||
</p>
|
||||
<% end %>
|
||||
<div id="poststuff">
|
||||
<h1><%= t('admin.editing_page') %></h1>
|
||||
<%= form_for @item, :url => admin_page_path(@item), :html => { :class => 'form-horizontal edit_page' } do |f| %>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<div class="form-actions">
|
||||
<%= f.submit t('update'), :class => 'btn btn-primary' %>
|
||||
<%= link_to t('cancel'), get_go_back, :class=>"btn" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -1,52 +1,95 @@
|
||||
<%= f.error_messages %>
|
||||
<%= f.hidden_field :parent, :value => (@item.parent.id rescue nil) %>
|
||||
|
||||
<p>
|
||||
<%= f.label :name, t('admin.name') %>
|
||||
<%= f.text_field :name, :class => 'text' %>
|
||||
</p>
|
||||
<div class="control-group">
|
||||
<%= f.label :name, t('admin.name'), :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.text_field :name, :class => 'text input-xlarge' %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= f.fields_for :i18n_variable, (@item.new_record? ? @item.build_i18n_variable : @item.i18n_variable) do |f| %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<p>
|
||||
<%= f.label :locale, "#{t('admin.title')} #{I18nVariable.from_locale(locale)}" %>
|
||||
<%= f.text_field locale %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<div class="control-group">
|
||||
<%= f.label :locale, "#{t('admin.title')} #{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.text_field locale, :class => 'text input-xlarge' %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<%= t('admin.design_name') %>
|
||||
<%= f.collection_select :design, @designs, :id, :title, {:selected => @design.id}, {:rel => admin_pages_path} %>
|
||||
</p>
|
||||
<p>
|
||||
<%= t('admin.theme') %>
|
||||
<%= f.select :theme_id, @design.themes.collect { |t| [t.name.capitalize, t.id] }, :include_blank => true %>
|
||||
</p>
|
||||
<p>
|
||||
<%= t('admin.module_app') %>
|
||||
<%= render :partial => "app_selector", :locals => { :f => f } %>
|
||||
<span id="app_page_url"><%= select('page','app_frontend_url', @app_frontend_urls, :selected => @item.app_frontend_url ) rescue ''%> </span>
|
||||
<span id="app_page_category"><%= select('page','category', @categories.collect{|category| [category.i18n_variable[I18n.locale], category.id]}, :selected => @item[:category], :include_blank => true ) rescue ''%> </span>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :is_published, "#{t('admin.is_published')} ?" %>
|
||||
<%= f.radio_button :is_published, true %>Yes <%= f.radio_button :is_published, false %> No
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :menu_enabled_for, "#{t('admin.menu_enabled_for')}:" %>
|
||||
<% @site_valid_locales.each do |valid_locale| %>
|
||||
<%= check_box_tag 'page[menu_enabled_for][]', valid_locale, (@item.menu_enabled_for.nil? ? true : @item.menu_enabled_for.include?(valid_locale)) %>
|
||||
<%= I18nVariable.from_locale(valid_locale) %>
|
||||
<% end %>
|
||||
<%= hidden_field_tag 'page[menu_enabled_for][]', '' %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :enabled_for, "#{t('admin.enabled_for')}:" %>
|
||||
<% @site_valid_locales.each do |valid_locale| %>
|
||||
<%= check_box_tag 'page[enabled_for][]', valid_locale, (@item.enabled_for.nil? ? true : @item.enabled_for.include?(valid_locale)) %>
|
||||
<%= I18nVariable.from_locale(valid_locale) %>
|
||||
<% end %>
|
||||
<%= hidden_field_tag 'page[enabled_for][]', '' %>
|
||||
</p>
|
||||
<div class="control-group">
|
||||
<%= f.label :name, t('admin.design_name'), :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.collection_select :design, @designs, :id, :title, {:selected => @design.id}, {:rel => admin_pages_path} %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<%= f.label :name, t('admin.theme'), :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.select :theme_id, @design.themes.collect { |t| [t.name.capitalize, t.id] }, :include_blank => true %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<%= f.label :name, t('admin.module_app'), :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= render :partial => "app_selector", :locals => { :f => f } %>
|
||||
<span id="app_page_url">
|
||||
<%= select('page','app_frontend_url', @app_frontend_urls, :selected => @item.app_frontend_url ) rescue ''%>
|
||||
</span>
|
||||
<span id="app_page_category">
|
||||
<%= select('page','category', @categories.collect{|category| [category.i18n_variable[I18n.locale], category.id]}, :selected => @item[:category], :include_blank => true ) rescue ''%>
|
||||
</span>
|
||||
<span id="app_page_tag">
|
||||
<%= select('page','tag', @tags.collect{|tag| [tag[I18n.locale], tag.id]}, :selected => @item[:tag], :include_blank => true ) rescue ''%>
|
||||
</span>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<%= f.label :is_published, "#{t('admin.is_published')} ?", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<label class="radio">
|
||||
<%= f.radio_button :is_published, true %>
|
||||
Yes
|
||||
</label>
|
||||
<label class="radio">
|
||||
<%= f.radio_button :is_published, false %>
|
||||
No
|
||||
</label>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<%= f.label :menu_enabled_for, "#{t('admin.menu_enabled_for')}:", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<% @site_valid_locales.each do |valid_locale| %>
|
||||
<label class="checkbox">
|
||||
<%= check_box_tag 'page[menu_enabled_for][]', valid_locale, (@item.menu_enabled_for.nil? ? true : @item.menu_enabled_for.include?(valid_locale)) %>
|
||||
<%= I18nVariable.from_locale(valid_locale) %>
|
||||
</label>
|
||||
<% end %>
|
||||
<%= hidden_field_tag 'page[menu_enabled_for][]', '' %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<%= f.label :enabled_for, "#{t('admin.enabled_for')}:", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<% @site_valid_locales.each do |valid_locale| %>
|
||||
<label class="checkbox">
|
||||
<%= check_box_tag 'page[enabled_for][]', valid_locale, (@item.enabled_for.nil? ? true : @item.enabled_for.include?(valid_locale)) %>
|
||||
<%= I18nVariable.from_locale(valid_locale) %>
|
||||
</label>
|
||||
<% end %>
|
||||
<%= hidden_field_tag 'page[enabled_for][]', '' %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
<h1><%= t('admin.new_page') %></h1>
|
||||
|
||||
<%= flash_messages %>
|
||||
|
||||
<%= form_for @item, :url => admin_pages_path, :html => { :class => 'form' } do |f| %>
|
||||
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
|
||||
<p>
|
||||
<%= f.submit t('create') %> <%= link_back %>
|
||||
</p>
|
||||
|
||||
<% end %>
|
||||
<div id="poststuff">
|
||||
<h1><%= t('admin.new_page') %></h1>
|
||||
<%= form_for @item, :url => admin_pages_path, :html => { :class => 'form-horizontal edit_page' } do |f| %>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<div class="form-actions">
|
||||
<%= f.submit t('update'), :class => 'btn btn-primary' %>
|
||||
<%= link_to t('cancel'), get_go_back, :class=>"btn" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
Reference in new issue
Block a user