Merge branch 'development' of github.com:Rulingcom/orbit into development
Conflicts: app/controllers/default_widget_controller.rb lib/tasks/migrate.rake
This commit is contained in:
commit
9fec7beb47
319 files changed
+3012
-4094
No files matched your search
@@ -31,5 +31,5 @@ label{
|
||||
}
|
||||
|
||||
label{
|
||||
white-space: nowrap !important ;
|
||||
}
|
||||
white-space: nowrap !important ;
|
||||
}
|
||||
+11
-8
@@ -35,7 +35,7 @@ div[data-role="page"] {
|
||||
}
|
||||
.main-menu ul {
|
||||
background-color: #333;
|
||||
width: 280px;
|
||||
width: 210px;
|
||||
list-style: none;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
@@ -128,8 +128,8 @@ div[data-role="page"] {
|
||||
left: 0;
|
||||
}
|
||||
.header .language .ui-btn-text i {
|
||||
font-size: .83em;
|
||||
margin-top: .2em;
|
||||
font-size: 1.1em;
|
||||
margin-top: .33em;
|
||||
}
|
||||
.header .language .ui-icon {
|
||||
background-image: none;
|
||||
@@ -213,6 +213,9 @@ div[data-role="page"] {
|
||||
padding: 0 10px 20px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
#announcement_content .content {
|
||||
padding: 10px;
|
||||
}
|
||||
#map div[data-role="content"] {
|
||||
padding: 0;
|
||||
}
|
||||
@@ -323,7 +326,7 @@ div[id^="dialog"] .content {
|
||||
}
|
||||
@media(min-width:600px) {
|
||||
.main-menu ul {
|
||||
width: 560px;
|
||||
width: 420px;
|
||||
}
|
||||
.main-menu ul li {
|
||||
width: 128px;
|
||||
@@ -331,7 +334,7 @@ div[id^="dialog"] .content {
|
||||
}
|
||||
@media(min-width:768px) {
|
||||
.main-menu ul {
|
||||
width: 640px;
|
||||
width: 480px;
|
||||
}
|
||||
.main-menu ul li {
|
||||
width: 148px;
|
||||
@@ -342,7 +345,7 @@ div[id^="dialog"] .content {
|
||||
}
|
||||
@media(min-width:800px) {
|
||||
.main-menu ul {
|
||||
width: 640px;
|
||||
width: 480px;
|
||||
}
|
||||
.main-menu ul li {
|
||||
width: 148px;
|
||||
@@ -350,7 +353,7 @@ div[id^="dialog"] .content {
|
||||
}
|
||||
@media(min-width:961px) {
|
||||
.main-menu ul {
|
||||
width: 640px;
|
||||
width: 480px;
|
||||
}
|
||||
.main-menu ul li {
|
||||
width: 148px;
|
||||
@@ -358,7 +361,7 @@ div[id^="dialog"] .content {
|
||||
}
|
||||
@media(min-width: 1024px) {
|
||||
.main-menu ul {
|
||||
width: 800px;
|
||||
width: 600px;
|
||||
}
|
||||
.main-menu ul li {
|
||||
width: 188px;
|
||||
@@ -88,7 +88,7 @@ class Admin::AssetsController < OrbitBackendController
|
||||
|
||||
def delete
|
||||
if params[:ids]
|
||||
asset = Asset.any_in(:_id => params[:ids]).delete_all
|
||||
asset = Asset.any_in(:_id => params[:ids]).destroy_all
|
||||
end
|
||||
redirect_to assets_url(:filter => params[:filter], :direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options])
|
||||
end
|
||||
|
||||
@@ -114,7 +114,7 @@ class Admin::DesignsController < OrbitBackendController
|
||||
|
||||
def delete
|
||||
if params[:ids]
|
||||
designs = Design.any_in(:_id => params[:ids]).delete_all
|
||||
designs = Design.any_in(:_id => params[:ids]).destroy_all
|
||||
end
|
||||
redirect_to admin_designs_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options])
|
||||
end
|
||||
|
||||
@@ -36,12 +36,11 @@ helper Admin::PagePartsHelper
|
||||
|
||||
if @item.module_app
|
||||
@module_app = @item.module_app
|
||||
|
||||
@frontend_path = @item.app_frontend_url ? @item.app_frontend_url : @module_app.widgets.keys[0]
|
||||
@frontend_path = @item.app_frontend_url
|
||||
|
||||
if @module_app && @module_app.widgets && @module_app.widgets.any?{|b| b.class == Array}
|
||||
@frontend_style = @module_app.widgets[@frontend_path] if !@frontend_path.blank? && !@module_app.widgets.blank?
|
||||
end
|
||||
if @module_app && @module_app.widgets && @module_app.widgets.any?{|b| b.class == Array}
|
||||
@frontend_style = @module_app.widgets[@frontend_path] if !@frontend_path.blank? && !@module_app.widgets.blank?
|
||||
end
|
||||
|
||||
case @item.module_app.key
|
||||
when 'announcement'
|
||||
@@ -59,7 +58,7 @@ helper Admin::PagePartsHelper
|
||||
end
|
||||
else
|
||||
@categories = nil
|
||||
@module_app = @module_apps[0]
|
||||
@module_app = @module_apps[0]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -4,10 +4,20 @@ class Admin::PluginsController < ApplicationController
|
||||
|
||||
def index
|
||||
|
||||
@plugins = OrbitApp::Module::Registration.all
|
||||
@plugins = OrbitApp::Plugin::Registration.all
|
||||
|
||||
if(!params[:show_plugin_profile].nil?)
|
||||
@right_partial = OrbitApp::Plugin::Registration.find_by_key(params[:show_plugin_profile]).profile_partial_path rescue 'plugin_summary'
|
||||
|
||||
@right_partial = OrbitApp::Plugin::Registration.find_by_key(params[:show_plugin_profile]).admin_partial_path
|
||||
|
||||
if !@right_partial.blank?
|
||||
respond_to do |format|
|
||||
format.html { redirect_to( @right_partial ) }
|
||||
end
|
||||
else
|
||||
@right_partial = "admin/users_new_interface/plugin_summary"
|
||||
end
|
||||
|
||||
else
|
||||
@right_partial = "admin/users_new_interface/plugin_summary"
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Admin::SubRolesController < RolesController
|
||||
class Admin::SubRolesController < Admin::RolesController
|
||||
|
||||
|
||||
end
|
||||
@@ -32,7 +32,11 @@ class DefaultWidgetController< OrbitWidgetController
|
||||
end
|
||||
|
||||
def default_widget
|
||||
@tag_class = nil
|
||||
|
||||
if !params[:id].blank?
|
||||
redirect_to eval("#{@page_part.module_app.widget_fields_link_method['title']['method']}('#{params[:id]}', {inner: #{params[:inner] || true}})")
|
||||
else
|
||||
@tag_class = nil
|
||||
@default_widget = @page_part.module_app.get_default_widget
|
||||
@widget_image_field = @default_widget["image"] || @default_widget[:image]
|
||||
case @page_part
|
||||
@@ -47,8 +51,10 @@ class DefaultWidgetController< OrbitWidgetController
|
||||
end
|
||||
if @paginate
|
||||
@data = query_for_default_widget.includes(@widget_image_field).page(params[:page_main]).per(@data_limit)
|
||||
# @data = query_for_default_widget.limit(@data_limit).includes(@widget_image_field)
|
||||
else
|
||||
@data = query_for_default_widget.limit(@data_limit).includes(@widget_image_field)
|
||||
@data = eval(@default_widget["query"]).includes(@widget_image_field).page(params[:page_main]).per(@data_limit).desc(:created_at)
|
||||
# @data = eval(@default_widget["query"]).limit(@data_limit).includes(@widget_image_field).desc(:created_at)
|
||||
end
|
||||
case params[:type]
|
||||
when "typeA"
|
||||
@@ -64,7 +70,7 @@ class DefaultWidgetController< OrbitWidgetController
|
||||
@partial = "typeC"
|
||||
render "typeC"
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
@@ -2,6 +2,11 @@ class FrontController < ApplicationController
|
||||
|
||||
layout false
|
||||
|
||||
def show_breadcrumb
|
||||
@ancestors = Page.find(params[:id]).ancestors_and_self
|
||||
@ancestors = nil if @ancestors.size == 1
|
||||
end
|
||||
|
||||
def show_banner
|
||||
@ad_banner = AdBanner.find(params[:id]) rescue nil
|
||||
end
|
||||
|
||||
@@ -64,17 +64,23 @@ class PagesController < ApplicationController
|
||||
protected
|
||||
|
||||
def get_item
|
||||
module_app = ModuleApp.first(:conditions => {:key => params[:app_name]})
|
||||
if !params[:category_id].blank? && !params[:tag_id].blank?
|
||||
@item = Item.first(:conditions => {:module_app_id => module_app.id, :app_frontend_url => params[:app_action], :category => params[:category_id], :tag => params[:tag_id]})
|
||||
@item = Item.first(:conditions => {:module_app_id => module_app.id, :app_frontend_url => params[:app_action], :category => params[:category_id], :tag => ''}) unless @item
|
||||
elsif !params[:category_id].blank?
|
||||
@item = Item.where(module_app_id: module_app.id,app_frontend_url:params[:app_action],category: params[:category_id]).any_in(tag: [nil,'']).first
|
||||
elsif !params[:tag_id].blank?
|
||||
@item = Item.where(module_app_id: module_app.id,app_frontend_url:params[:app_action],tag: params[:tag_id]).any_in(category: [nil,'']).first
|
||||
if params[:same_page_id]
|
||||
@item = Item.find(params[:same_page_id])
|
||||
else
|
||||
module_app = ModuleApp.first(:conditions => {:key => params[:app_name]})
|
||||
if !params[:category_id].blank? && !params[:tag_id].blank?
|
||||
@item = Item.first(:conditions => {:module_app_id => module_app.id, :app_frontend_url => params[:app_action], :category => params[:category_id], :tag => params[:tag_id]})
|
||||
@item = Item.first(:conditions => {:module_app_id => module_app.id, :app_frontend_url => params[:app_action], :category => params[:category_id], :tag => ''}) unless @item
|
||||
elsif !params[:category_id].blank?
|
||||
@item = Item.where(module_app_id: module_app.id, app_frontend_url: params[:app_action], category: params[:category_id]).any_in(tag: [nil,'']).first
|
||||
elsif !params[:tag_id].blank?
|
||||
@item = Item.where(module_app_id: module_app.id, app_frontend_url: params[:app_action], tag: params[:tag_id]).any_in(category: [nil,'']).first
|
||||
end
|
||||
@item = Item.find(params[:orig_page]) unless @item || params[:orig_page].blank?
|
||||
@item = Item.where(module_app_id: module_app.id, app_frontend_url: params[:app_action]).all_of("tag" => {"$in" => [nil,'']},"category" => { "$in" => [nil,'']}).first unless @item
|
||||
@item = Item.where(module_app_id: module_app.id, app_frontend_url: 'default_widget').first unless @item
|
||||
@item = Item.where(module_app_id: module_app.id, app_frontend_url: params[:app_action]).first unless @item
|
||||
end
|
||||
@item = Item.where(module_app_id: module_app.id,app_frontend_url:params[:app_action]).all_of("tag" => {"$in" => [nil,'']},"category" => { "$in" => [nil,'']}).first unless @item
|
||||
@item = Item.where(module_app_id: module_app.id,app_frontend_url:params[:app_action]).first unless @item
|
||||
raise PageError,'Missing Frontend Page' if @item.nil?
|
||||
end
|
||||
|
||||
|
||||
@@ -3,24 +3,24 @@ module DefaultWidgetHelper
|
||||
I18n.t("#{@page_part.module_app.key}.default_widget.#{field}")
|
||||
end
|
||||
|
||||
def link_to_field(row_data,field,switch)
|
||||
def link_to_field(row_data,field, switch, options=nil)
|
||||
method_ary = @page_part.module_app.widget_fields_link_method
|
||||
field = field.to_sym
|
||||
if(method_ary.has_key?(field) and (switch == "true"))
|
||||
url = case method_ary[field][:args]
|
||||
when nil # no args
|
||||
get_data_link(method_ary[field][:method])
|
||||
get_data_link(method_ary[field]["method"], options)
|
||||
when :self # passing self
|
||||
get_data_link(method_ary[field][:method],row_data.id)
|
||||
get_data_link(method_ary[field]['method'], options,row_data.id)
|
||||
else
|
||||
ary = method_ary[field][:args].clone
|
||||
object_hash = ary.each do |key,val|
|
||||
ary[key]= type_trans_or_to_s(row_data.send(val[0]).send(val[1]))
|
||||
end
|
||||
get_data_link(method_ary[field][:method],object_hash)
|
||||
get_data_link(method_ary[field]['method'], options,object_hash)
|
||||
end
|
||||
|
||||
link_to row_data.send(field),url
|
||||
|
||||
link_to row_data.send(field), url
|
||||
else
|
||||
type_trans_or_to_s(row_data.send(field) )
|
||||
end
|
||||
@@ -45,13 +45,17 @@ module DefaultWidgetHelper
|
||||
end
|
||||
end
|
||||
|
||||
def get_data_link(method_entry,object = nil)
|
||||
def get_data_link(method_entry, options=nil, object = nil)
|
||||
case object
|
||||
when nil
|
||||
eval method_entry
|
||||
when NilClass
|
||||
eval eval("#{method_entry}(#{options})")
|
||||
when BSON::ObjectId
|
||||
object = "'#{object.to_s}'"
|
||||
eval("#{method_entry}(#{object}, #{options})")
|
||||
when Hash
|
||||
eval("#{method_entry}(#{object.merge options})")
|
||||
else
|
||||
object = "'#{object.to_s}'" if object.class == BSON::ObjectId
|
||||
eval("#{method_entry}(#{object})" )
|
||||
''
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class AdImage
|
||||
belongs_to :ad_banner
|
||||
|
||||
before_validation :add_http
|
||||
validates :out_link, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix, :allow_blank => true
|
||||
validates :out_link, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i, :allow_blank => true
|
||||
|
||||
def display?
|
||||
if (self.post_date <= Date.today && (self.unpost_date.nil? || self.unpost_date>= Date.today) rescue false)
|
||||
|
||||
+3
-3
@@ -12,7 +12,7 @@ class Item
|
||||
field :enabled_for, :type => Array, :default => nil
|
||||
field :menu_enabled_for, :type => Array, :default => nil
|
||||
field :title, localize: true
|
||||
field :sitemap_enabled, :type => Hash
|
||||
field :sitemap_enabled, :type => Hash, :default => {}
|
||||
|
||||
|
||||
validates_format_of :name, :with => /^[0-9a-zA-Z\-_]+$/
|
||||
@@ -23,6 +23,7 @@ class Item
|
||||
|
||||
before_destroy :destroy_children
|
||||
after_rearrange :rebuild_path, :if => "parent_id_changed? || name_changed?"
|
||||
after_save :rebuild_children_path, :if => "path_changed?"
|
||||
|
||||
def enabled_for_lang(lang)
|
||||
enabled_for.include?(lang)
|
||||
@@ -57,7 +58,7 @@ class Item
|
||||
end
|
||||
|
||||
def show_in_sitemap_for(locale)
|
||||
if sitemap_enabled && !sitemap_enabled[locale].blank?
|
||||
if !sitemap_enabled.blank? && !sitemap_enabled[locale].blank?
|
||||
sitemap_enabled[locale].eql?('true') ? true : false
|
||||
else
|
||||
true
|
||||
@@ -68,7 +69,6 @@ class Item
|
||||
|
||||
def rebuild_path
|
||||
self.path = (self.ancestors_and_self - [Item.root]).collect{|x| x.name unless x.root?}.join('/')
|
||||
self.rebuild_children_path
|
||||
end
|
||||
|
||||
def rebuild_children_path
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ class Link < Item
|
||||
|
||||
field :url
|
||||
|
||||
validates :url, :presence => true, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix
|
||||
validates :url, :presence => true, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i
|
||||
|
||||
before_validation :add_http
|
||||
|
||||
|
||||
@@ -27,6 +27,11 @@ class Page < Item
|
||||
before_save :create_parts, if: Proc.new { |page| page.new_record? || page.design_id_changed? }
|
||||
before_save :delete_empty_frontend_field, :generate_html
|
||||
|
||||
def generate_parts
|
||||
create_parts
|
||||
self.save
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def create_parts
|
||||
|
||||
@@ -8,6 +8,20 @@
|
||||
<h4><span><%= t(eval(":#{@attribute_type}"))%></span></h4>
|
||||
<div class="form-horizontal">
|
||||
<div class="clear">
|
||||
|
||||
<div class="control-group pull-left">
|
||||
<label class="control-label" for="key"><%= t(:key) %></label>
|
||||
<div class="controls">
|
||||
<% if @attribute.new_record? %>
|
||||
<%= f.text_field :key, :placeholder => t(:key) %>
|
||||
<% else %>
|
||||
<div><%= @attribute.key%></div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>@attribute.title_translations,:class_ext=>"pull-left",:label_ext=>t(:item_name),:field_name=>"#{@attribute_type}[title_translations]"}%>
|
||||
|
||||
|
||||
|
||||
<div class="control-group pull-left">
|
||||
<label class="control-label" for="key"><%= t(:to_search) %></label>
|
||||
@@ -23,24 +37,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group pull-left">
|
||||
<label class="control-label" for="key"><%= t(:key) %></label>
|
||||
<div class="controls">
|
||||
<% if @attribute.new_record? %>
|
||||
<%= f.text_field :key, :placeholder => t(:key) %>
|
||||
<% else %>
|
||||
<div><%= @attribute.key%></div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>@attribute.title_translations,:class_ext=>"pull-left",:label_ext=>t(:item_name),:field_name=>"#{@attribute_type}[title_translations]"}%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% if @attribute._type == "Info" %>
|
||||
|
||||
<div class="map-block back attributes">
|
||||
<h4><span><%= @attribute.title+ t(:attributes)%></span></h4>
|
||||
<h4><span><%= @attribute.title+ t(:field)%></span></h4>
|
||||
<div id="attribute_field_list">
|
||||
<%= render :partial=>"shared/attribute_field/attribute_field",:collection=>@attribute.attribute_fields%>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
<%= f.hidden_field :public_r_tag_object_id, :value => @part.page.id %>
|
||||
<%#= f.select :public_r_tag_object_id, options_for_select([t(:horizontal), t(:vertical)], t(:horizontal)) %>
|
||||
<% elsif @r_tag.eql?('sitemap') %>
|
||||
<% elsif @r_tag.eql?('breadcrumb') %>
|
||||
<% else %>
|
||||
<%= f.select :public_r_tag_object_id, options_from_collection_for_select(@tag_objects, :id, :title, :selected => @part.public_r_tag_object_id) %>
|
||||
<% end %>
|
||||
</span>
|
||||
</span>
|
||||
@@ -0,0 +1,18 @@
|
||||
<div id="module-nav">
|
||||
<div class="arrow_next pull-right"><i class="icon-chevron-right"></i></div>
|
||||
<div class="arrow_prev pull-left"><i class="icon-chevron-left"></i></div>
|
||||
<div class="module-nav-view">
|
||||
<ul class="nav nav-pills">
|
||||
<%= content_tag :li, :class=>(params[:show_plugin_profile].nil? ? "active" : nil) do %>
|
||||
<%= link_to t(:all_plugin_summary)%>
|
||||
<% end -%>
|
||||
<% @plugins.each do |plugin| %>
|
||||
<%= content_tag :li, :class=>(params[:show_plugin_profile] == plugin.name ? "active" : nil) do %>
|
||||
<%= link_to plugin.name, admin_plugins_path(:show_plugin_profile => plugin.name) %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -4,23 +4,6 @@
|
||||
|
||||
|
||||
<div id="isotope" class="user-data">
|
||||
<div id="module-nav">
|
||||
<div class="arrow_next pull-right"><i class="icon-chevron-right"></i></div>
|
||||
<div class="arrow_prev pull-left"><i class="icon-chevron-left"></i></div>
|
||||
<div class="module-nav-view">
|
||||
<ul class="nav nav-pills">
|
||||
<%= content_tag :li, :class=>(params[:show_plugin_profile].nil? ? "active" : nil) do %>
|
||||
<%= link_to t(:all_plugin_summary)%>
|
||||
<% end -%>
|
||||
<% @plugins.each do |plugin| %>
|
||||
<%= content_tag :li, :class=>(params[:show_plugin_profile] == plugin.name ? "active" : nil) do %>
|
||||
<%= link_to plugin.name, :show_plugin_profile => plugin.name %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<%= render :partial => 'plugin_list' %>
|
||||
<%= render :partial => @right_partial %>
|
||||
</div>
|
||||
@@ -10,6 +10,17 @@
|
||||
<%= hidden_field "#{@field_name}[attribute_fields][#{@af_counter}]","to_delete",:value=>false,:class=>"attribute_field_to_delete"%>
|
||||
<a class="btn btn-small pull-right btn-danger remove_attribute"><i class="icon-trash icon-large"></i> <%= t(:delete_)%></a>
|
||||
<div class="clear">
|
||||
<div class="control-group pull-left">
|
||||
<label class="control-label" for="key"><%= t(:key) %></label>
|
||||
<div class="multipleInput">
|
||||
<div class="controls">
|
||||
<%= text_field "#{@field_name}[attribute_fields][#{@af_counter}]","key",:value=>attribute_field.key%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>attribute_field.title_translations,:class_ext=>"pull-left",:label_ext=>t(:name),:field_name=>"#{@field_name}[attribute_fields][#{@af_counter}][title_translations]"}%>
|
||||
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="key"><%= t(:to_search) %></label>
|
||||
<div class="controls">
|
||||
@@ -21,15 +32,8 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group pull-left">
|
||||
<label class="control-label" for="key"><%= t(:key) %></label>
|
||||
<div class="multipleInput">
|
||||
<div class="controls">
|
||||
<%= text_field "#{@field_name}[attribute_fields][#{@af_counter}]","key",:value=>attribute_field.key%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>attribute_field.title_translations,:class_ext=>"pull-left",:label_ext=>t(:name),:field_name=>"#{@field_name}[attribute_fields][#{@af_counter}][title_translations]"}%>
|
||||
|
||||
|
||||
<div class="control-group pull-left">
|
||||
<label class="control-label" for=""><%= t(:type)%></label>
|
||||
<div class="controls">
|
||||
@@ -46,7 +50,7 @@
|
||||
<div class="<%= attribute_field.disabled ? 'hide' : ''%>">
|
||||
<%= content_tag :div,:class=>show_type_panel(attribute_field,"typeA") do%>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t(:options)%></label>
|
||||
<label class="control-label"><%= t(:enabled_for)%></label>
|
||||
<div class="controls">
|
||||
<label class="checkbox inline">
|
||||
<%= check_box_tag("#{@field_name}[attribute_fields][#{@af_counter}][typeA][cross_lang]","true",attribute_field["typeA"]["cross_lang"]) %>
|
||||
@@ -103,7 +107,7 @@
|
||||
<% end %>
|
||||
<%= content_tag :div,:class=>show_type_panel(attribute_field,"typeD") do%>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t(:options)%></label>
|
||||
<label class="control-label"><%= t(:enabled_for)%></label>
|
||||
<div class="controls">
|
||||
<label class="checkbox inline">
|
||||
<%= check_box_tag("#{@field_name}[attribute_fields][#{@af_counter}][typeD][cross_lang]","true",attribute_field["typeD"]["cross_lang"]) %>
|
||||
|
||||
@@ -4,6 +4,18 @@
|
||||
<h4><span><%= t(eval(":#{@attribute_type}"))%>:<%= @attribute.title %></span></h4>
|
||||
<div class="form-horizontal">
|
||||
<div class="clear">
|
||||
|
||||
<div class="control-group pull-left">
|
||||
<label class="control-label" for="key"><%= t(:key) %></label>
|
||||
<div class="controls">
|
||||
<% if @sub_attribute.new_record? %>
|
||||
<%= f.text_field :key, :placeholder => t(:key) %>
|
||||
<% else %>
|
||||
<div><%= @sub_attribute.key%></div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>@sub_attribute.title_translations,:class_ext=>"pull-left",:label_ext=>t(:item_name),:field_name=>"sub_role[title_translations]"}%>
|
||||
|
||||
<div class="control-group pull-left">
|
||||
<label class="control-label" for="key"><%= t(:to_search) %></label>
|
||||
@@ -19,17 +31,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group pull-left">
|
||||
<label class="control-label" for="key"><%= t(:key) %></label>
|
||||
<div class="controls">
|
||||
<% if @sub_attribute.new_record? %>
|
||||
<%= f.text_field :key, :placeholder => t(:key) %>
|
||||
<% else %>
|
||||
<div><%= @sub_attribute.key%></div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>@sub_attribute.title_translations,:class_ext=>"pull-left",:label_ext=>t(:item_name),:field_name=>"sub_role[title_translations]"}%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="site-map role-block">
|
||||
|
||||
<div class="map-block back attributes">
|
||||
<h4><span><%= @attribute.title+ t(:attributes)%></span></h4>
|
||||
<h4><span><%= @attribute.title + t(:role)%></span></h4>
|
||||
<div id="attribute_field_list">
|
||||
<%= render :partial=>"attribute_field",:collection=>@attribute.attribute_fields%>
|
||||
</div>
|
||||
|
||||
@@ -56,5 +56,5 @@
|
||||
</table>
|
||||
|
||||
<div class="form-actions form-fixed pagination-right">
|
||||
<%= link_to content_tag(:i,t(:new_sub_role),:class=>"icon-plus icon-white"),eval("admin_#{@attribute_type}_add_sub_role_path(@attribute)"),:class=>"btn btn-primary pull-right"%>
|
||||
<%= link_to content_tag(:i,t("new.sub_role"),:class=>"icon-plus icon-white"),eval("admin_#{@attribute_type}_add_sub_role_path(@attribute)"),:class=>"btn btn-primary pull-right"%>
|
||||
</div>
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="site-map role-block">
|
||||
|
||||
<div class="map-block back attributes">
|
||||
<h4><span><%= @attribute.title+ t(:attributes)%> - <%= @sub_attribute.title %></span></h4>
|
||||
<h4><span><%= @attribute.title+ t(:role)%> - <%= @sub_attribute.title %></span></h4>
|
||||
<div id="attribute_field_list">
|
||||
<%= render :partial=>"attribute_field",:collection=>@sub_attribute.attribute_fields%>
|
||||
</div>
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
<div class="site-map">
|
||||
<% @items.each_with_index do |item, i| %>
|
||||
<div class="map-block">
|
||||
<h4><%= i+1 %> <a href='<%= item.path %>'><%= item.title %></a></h4>
|
||||
<ul>
|
||||
<% item.children.each_with_index do |child, ii| %>
|
||||
<li class="clear"><%= "#{i+1}-#{ii+1}" %> <a href='<%= child.path %>'><%= child.title %></a></span></li>
|
||||
<% end if item.children %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= javascript_include_tag "lib/jquery.masonry.min.js" %>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('.site-map').masonry({
|
||||
itemSelector: '.map-block',
|
||||
columnWidth: 220,
|
||||
isAnimated: true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -3,16 +3,24 @@
|
||||
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('users_new_interface')) do -%>
|
||||
<%= content_tag :li, link_to((t(:all_member) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, admin_users_new_interface_index_path), :class => active_for_action('users_new_interface', 'index') %>
|
||||
<%= content_tag :li, link_to((t(:add_member) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_admin_users_new_interface_path), :class => active_for_action('users_new_interface', 'new') if (is_admin? rescue nil) %>
|
||||
<%= content_tag :li, link_to((t(:roles) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_roles_path ), :class => active_for_action('users_new_interfacexx', 'index') if (is_admin? rescue nil) %>
|
||||
<%= content_tag :li, link_to((t(:info) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, edit_admin_info_path(Info.first.id.to_s)), :class => active_for_action('users_new_interfacexx', 'index') if (is_admin? rescue nil) %>
|
||||
<%= content_tag :li, link_to((t(:authorigation) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, '#'), :class => active_for_action('users_new_interfacexx', 'index') if (is_admin? rescue nil) %>
|
||||
<%= content_tag :li, link_to((t(:registrant) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, '#'), :class => active_for_action('users_new_interfacexx', 'index') if (is_admin? rescue nil) %>
|
||||
<%= content_tag :li, link_to((t(:member_authorization) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, '#'), :class => active_for_action('users_new_interfacexx', 'index') if (is_admin? rescue nil) %>
|
||||
<%= content_tag :li, link_to((t(:member_registration) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, '#'), :class => active_for_action('users_new_interfacexx', 'index') if (is_admin? rescue nil) %>
|
||||
<%= content_tag :li, link_to((t(:member_role) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_roles_path ), :class => active_for_action('users_new_interfacexx', 'index') if (is_admin? rescue nil) %>
|
||||
<%= content_tag :li, link_to((t(:member_info) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, edit_admin_info_path(Info.first.id.to_s)), :class => active_for_action('users_new_interfacexx', 'index') if (is_admin? rescue nil) %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
||||
<%= content_tag :li, :class => active_for_controllers('plugins') do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-pie')+ content_tag(:span, t(:analysis)), admin_plugins_path %>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-graduation')+ content_tag(:span, t(:academic_info)), admin_plugins_path %>
|
||||
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('plugins')) do -%>
|
||||
<%= content_tag :li, link_to((t(:all_plugins) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, admin_plugins_path), :class => active_for_action('users_new_interface', 'index') %>
|
||||
<%= content_tag :li, link_to((t(:list_) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, admin_plugins_path), :class => active_for_action('users_new_interface', 'index') %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
||||
<%= content_tag :li, :class => active_for_controllers('plugins') do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-pie')+ content_tag(:span, t(:analysis)), '#' %>
|
||||
<% end -%>
|
||||
|
||||
<%= content_tag :li, :class => active_for_controllers('plugins') do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-layout')+ content_tag(:span, t(:groups)), '#' %>
|
||||
<% end -%>
|
||||
@@ -2,10 +2,11 @@
|
||||
<td class="span1"><% if is_admin? %><input type="checkbox"><% end%></td>
|
||||
<td class="span3">
|
||||
<div class="label-group">
|
||||
<div class="label-td"><!--
|
||||
<span class="label label-teacher"># TODO:Teacher</span>
|
||||
<span class="label label-student"># TODO:Student</span>
|
||||
<span class="label label-staff"># TODO:Staff</span> -->
|
||||
<div class="label-td">
|
||||
<% user_for_listing.roles.each do |rf| %>
|
||||
<% @roledata = Role.find(rf.id) %>
|
||||
<span class="label label-<%= @roledata.key %>"><%= @roledata.title %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
<%= form_for @user, :url => admin_users_new_interface_path(@user), :html => { :multipart => true } do |f| %>
|
||||
<%= f.error_messages %>
|
||||
<%= render :partial => 'user_basic', :locals => {:f => f}%>
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<div class="button_bar">
|
||||
<%= link_back %>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<% @data.each do |row_data| %>
|
||||
<tr>
|
||||
<% @fields.each do |field|%>
|
||||
<td><%= content_tag(:span,link_to_field(row_data,field[0],field[2]),:class=>field[1])%></td>
|
||||
<td><%= content_tag(:span,link_to_field(row_data,field[0], field[2], {orig_page: @page_id.to_s}),:class=>field[1])%></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
@@ -7,7 +7,7 @@
|
||||
</div>
|
||||
<div class="wrap">
|
||||
<% @fields.each do |field|%>
|
||||
<%= content_tag(:span,link_to_field(row_data,field[0]),:class=>field[1])%>
|
||||
<%= content_tag(:span,link_to_field(row_data,field[0], field[2], {orig_page: @page_id.to_s}),:class=>field[1])%>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -6,7 +6,7 @@
|
||||
<% @data.each do |row_data| %>
|
||||
<%= content_tag(:li) do %>
|
||||
<% @fields.each do |field|%>
|
||||
<%= content_tag(:span,link_to_field(row_data,field[0]),:class=>field[1])%>
|
||||
<%= content_tag(:span, link_to_field(row_data,field[0], field[2], {orig_page: @page_id.to_s}),:class=>field[1])%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -0,0 +1,4 @@
|
||||
<%= render @partial %>
|
||||
<% if @paginate %>
|
||||
<%= paginate @data, :param_name => :page_main, :params => {:same_page_id => @page_id} %>
|
||||
<% end %>
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
<li class="dock_item"><a callback-method='initializeJournalPapers' href="<%= panel_personal_journal_desktop_journal_p_path %>" class="widget_fn wh3 hh3" id='d_journal_p' custom-load="journal" onclick="return false;"><span class="widget_icon"><img src="" alt="Journal Papers" id="journal_p_icon" width="30" height="30"/></span></a></li>
|
||||
|
||||
<li class="dock_item"><a callback-method='initializeConference' href="<%= panel_personal_conference_desktop_conference_p_path %>" class="widget_fn wh3 hh3" id='d_conference_p' custom-load="conference" onclick="return false;"><span class="widget_icon"><img src="" alt="Conference Papers" id="conference_p_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='initializeConference' href="<%= panel_personal_conference_desktop_conference_window_path %>" class="widget_fn wh3 hh3" id='d_conference_p' custom-load="conference" onclick="return false;"><span class="widget_icon"><img src="" alt="Conference Papers" id="conference_p_icon" width="30" height="30"/></span></a></li>
|
||||
|
||||
<li class="dock_item"><a callback-method='initializeBooks' href="<%= desktop_publications_books_path %>" class="widget_fn wh3 hh3" id='d_books' onclick="return false;"><span class="widget_icon"><img src="" alt="Books" id="books_icon" width="30" height="30"/></span></a></li>
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<% unless @ancestors.blank? %>
|
||||
<ul class="breadcrumb">
|
||||
<% @ancestors.each_with_index do |node, i| %>
|
||||
<% last = i == @ancestors.size-1 %>
|
||||
<li class='<%= 'active' if last %>'>
|
||||
<% if last %>
|
||||
<%= node.title %>
|
||||
<% else %>
|
||||
<%= link_to node.title, "/#{node.path}" %>
|
||||
<span class="divider">/</span>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
@@ -1,6 +1,6 @@
|
||||
<% if @menu_page && @menu_page.visible_children.size > 0 %>
|
||||
<div class='category_list'>
|
||||
<h3 class='h3'><%= @menu_page.title %></h3>
|
||||
<!-- <h3 class='h3'><%#= @menu_page.title %></h3> -->
|
||||
<ul class='list'>
|
||||
<% @menu_page.visible_children.each do |child| %>
|
||||
<li class="<%= @page_id.eql?(child.id) ? 'active' : nil %>">
|
||||
|
||||
@@ -10,6 +10,17 @@
|
||||
<%= hidden_field "info[attribute_fields][#{@af_counter}]","to_delete",:value=>false,:class=>"attribute_field_to_delete"%>
|
||||
<a class="btn btn-small pull-right btn-danger remove_attribute"><i class="icon-trash icon-large"></i> <%= t(:delete_)%></a>
|
||||
<div class="clear">
|
||||
<div class="control-group pull-left">
|
||||
<label class="control-label" for="key"><%= t(:key) %></label>
|
||||
<div class="multipleInput">
|
||||
<div class="controls">
|
||||
<%= text_field "info[attribute_fields][#{@af_counter}]","key",:value=>attribute_field.key%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>attribute_field.title_translations,:class_ext=>"pull-left",:label_ext=>t(:name),:field_name=>"info[attribute_fields][#{@af_counter}][title_translations]"}%>
|
||||
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="key"><%= t(:to_search) %></label>
|
||||
<div class="controls">
|
||||
@@ -21,15 +32,7 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group pull-left">
|
||||
<label class="control-label" for="key"><%= t(:key) %></label>
|
||||
<div class="multipleInput">
|
||||
<div class="controls">
|
||||
<%= text_field "info[attribute_fields][#{@af_counter}]","key",:value=>attribute_field.key%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>attribute_field.title_translations,:class_ext=>"pull-left",:label_ext=>t(:name),:field_name=>"info[attribute_fields][#{@af_counter}][title_translations]"}%>
|
||||
|
||||
<div class="control-group pull-left">
|
||||
<label class="control-label" for=""><%= t(:type)%></label>
|
||||
<div class="controls">
|
||||
@@ -46,7 +49,7 @@
|
||||
<div class="<%= attribute_field.disabled ? 'hide' : ''%>">
|
||||
<%= content_tag :div,:class=>show_type_panel(attribute_field,"typeA") do%>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t(:options)%></label>
|
||||
<label class="control-label"><%= t(:enabled_for)%></label>
|
||||
<div class="controls">
|
||||
<label class="checkbox inline">
|
||||
<%= check_box_tag("info[attribute_fields][#{@af_counter}][typeA][cross_lang]","true",attribute_field["typeA"]["cross_lang"]) %>
|
||||
@@ -103,7 +106,7 @@
|
||||
<% end %>
|
||||
<%= content_tag :div,:class=>show_type_panel(attribute_field,"typeD") do%>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t(:options)%></label>
|
||||
<label class="control-label"><%= t(:enabled_for)%></label>
|
||||
<div class="controls">
|
||||
<label class="checkbox inline">
|
||||
<%= check_box_tag("info[attribute_fields][#{@af_counter}][typeD][cross_lang]","true",attribute_field["typeD"]["cross_lang"]) %>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="control-group">
|
||||
<%= hidden_field_tag "#{temp_field_name}[count]",((values.keys.collect{|t| t.to_i}.max rescue nil) || 0 ),:class=>"list_count"%>
|
||||
<%= hidden_field_tag "#{temp_field_name}[name]",field_name,:class=>"field_name"%>
|
||||
<label class="control-label" ><%= t(:list_)%></label>
|
||||
<label class="control-label" ><%= t(:options)%></label>
|
||||
<div class="multipleInput">
|
||||
<%if values.blank? %>
|
||||
<div class="controls">
|
||||
|
||||
Reference in new issue
Block a user