forgeos_core 1.9.2 → 1.9.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +1 -23
- data/app/assets/javascripts/forgeos/admin/customselects.js +2 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_core/overlay.js +22 -3
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_core/tinyMCE.js +1 -1
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_core/uploads.js +55 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_core/visual.js +3 -3
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_core/overlays.js +4 -46
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_core/visual.js +17 -57
- data/app/assets/stylesheets/forgeos/960.css.sass +1 -125
- data/app/assets/stylesheets/forgeos/admin/forgeos_core/_attachments.css.sass +13 -4
- data/app/assets/stylesheets/forgeos/admin/forgeos_core/_content.css.sass +7 -2
- data/app/assets/stylesheets/forgeos/admin/forgeos_core/_customer.css.sass +18 -5
- data/app/assets/stylesheets/forgeos/admin/forgeos_core/_dashboard.css.sass +38 -16
- data/app/assets/stylesheets/forgeos/admin/forgeos_core/_datatable.css.sass +32 -13
- data/app/assets/stylesheets/forgeos/admin/forgeos_core/_generals.css.sass +75 -39
- data/app/assets/stylesheets/forgeos/admin/forgeos_core/_icons.css.sass +130 -16
- data/app/assets/stylesheets/forgeos/admin/forgeos_core/_lightbox.css.sass +21 -18
- data/app/assets/stylesheets/forgeos/admin/forgeos_core/_notifications.css.sass +0 -1
- data/app/assets/stylesheets/forgeos/admin/forgeos_core/_payment.css.sass +1 -1
- data/app/assets/stylesheets/forgeos/admin/forgeos_core/_rightSidebar.css.sass +14 -14
- data/app/assets/stylesheets/forgeos/admin/forgeos_core/_roles.css.sass +1 -1
- data/app/assets/stylesheets/forgeos/admin/forgeos_core/_search.css.sass +6 -5
- data/app/assets/stylesheets/forgeos/admin/forgeos_core/_settings.css.sass +1 -3
- data/app/assets/stylesheets/forgeos/admin/forgeos_core/_sidebar.css.sass +11 -3
- data/app/assets/stylesheets/forgeos/admin/forgeos_core/_uploadify.css.sass +10 -8
- data/app/assets/stylesheets/forgeos/admin/forgeos_core/_visuals.css.sass +12 -12
- data/app/assets/stylesheets/forgeos/admin/login.css.sass +30 -14
- data/app/assets/stylesheets/forgeos/jquery-ui/themes/forgeos.css.sass +96 -733
- data/app/assets/stylesheets/forgeos/jstree/themes/categories/style.css.sass +12 -18
- data/app/controllers/admin/administrators_controller.rb +2 -2
- data/app/controllers/admin/attachments_controller.rb +3 -3
- data/app/controllers/admin/categories_controller.rb +1 -1
- data/app/controllers/admin/person_sessions_controller.rb +1 -1
- data/app/controllers/admin/rights_controller.rb +2 -2
- data/app/controllers/admin/roles_controller.rb +3 -3
- data/app/controllers/admin/users_controller.rb +2 -2
- data/app/controllers/forgeos/application_controller.rb +1 -1
- data/app/models/category.rb +7 -3
- data/app/models/right.rb +1 -1
- data/app/models/role.rb +1 -1
- data/app/models/user.rb +6 -3
- data/app/views/admin/administrators/index.json.erb +3 -1
- data/app/views/admin/attachments/_attachments_popup.html.haml +4 -4
- data/app/views/admin/attachments/_form.html.haml +1 -1
- data/app/views/admin/attachments/_tabs.html.haml +1 -1
- data/app/views/admin/attachments/index.json.erb +4 -2
- data/app/views/admin/attachments/show.html.haml +1 -1
- data/app/views/admin/cachings/index.html.haml +2 -2
- data/app/views/admin/categories/index.json.erb +3 -1
- data/app/views/admin/import/_tabs.html.haml +1 -0
- data/app/views/admin/import/index.html.haml +1 -1
- data/app/views/admin/rights/_tabs.html.haml +1 -0
- data/app/views/admin/rights/index.json.erb +7 -5
- data/app/views/admin/roles/_tabs.html.haml +1 -0
- data/app/views/admin/roles/index.json.erb +5 -3
- data/app/views/admin/sidebars/_attachments_popups.html.haml +7 -76
- data/app/views/admin/users/index.json.erb +3 -1
- data/app/views/admin/visual/_visual_popup.html.haml +18 -107
- data/app/views/admin/visual/_visuals_popup.html.haml +7 -47
- data/app/views/layouts/admin.html.haml +2 -2
- data/app/views/layouts/admin_login.html.haml +2 -2
- data/config/locales/common/en.yml +1 -0
- data/config/locales/common/fr.yml +1 -0
- data/config/routes.rb +12 -1
- data/lib/forgeos/urlified.rb +16 -0
- data/lib/tasks/install.rake +3 -3
- data/lib/technoweenie/attachment_fu/backends/ftp_backend.rb +8 -12
- data/recipes/db.rb +1 -1
- metadata +52 -57
- data/app/controllers/admin/base_controller.rbc +0 -1305
- data/app/controllers/admin/dashboard_controller.rbc +0 -361
- data/app/controllers/admin/person_sessions_controller.rbc +0 -1248
- data/app/controllers/forgeos/application_controller.rbc +0 -2027
- data/app/helpers/admin/attachment_helper.rbc +0 -2340
- data/app/helpers/admin/base_helper.rbc +0 -2522
- data/app/helpers/forgeos/application_helper.rbc +0 -3152
- data/app/models/administrator.rbc +0 -415
- data/app/models/person.rbc +0 -1498
- data/app/models/person_session.rbc +0 -142
- data/app/models/right.rbc +0 -432
- data/app/models/role.rbc +0 -469
- data/app/models/setting.rbc +0 -699
- data/config/initializers/load_settings.rbc +0 -330
- data/config/routes.rbc +0 -2203
- data/lib/extensions.rbc +0 -126
- data/lib/extensions/form_helper_extensions.rbc +0 -295
- data/lib/extensions/i18n_fallbacks_config.rbc +0 -246
- data/lib/forgeos.rbc +0 -1942
- data/lib/forgeos/core.rbc +0 -325
- data/lib/forgeos/core/engine.rbc +0 -316
- data/lib/forgeos_core.rbc +0 -53
- data/lib/map_fields.rbc +0 -4437
- data/lib/sortable_attachments.rbc +0 -1399
- data/lib/sphinx_globalize.rbc +0 -785
@@ -2,7 +2,6 @@
|
|
2
2
|
ul
|
3
3
|
padding: 0
|
4
4
|
margin: 0
|
5
|
-
|
6
5
|
li
|
7
6
|
margin: 2px 0
|
8
7
|
width: auto !important
|
@@ -36,7 +35,7 @@
|
|
36
35
|
color: #F16028
|
37
36
|
ins.jstree-icon
|
38
37
|
margin: 0
|
39
|
-
background-image: url(/assets/forgeos/admin/big-icons-24-24-verti.png)
|
38
|
+
background-image: url(/assets/forgeos/admin/big-icons-24-24-verti.png)
|
40
39
|
background-repeat: no-repeat
|
41
40
|
width: 25px
|
42
41
|
background-position: 0 -271px
|
@@ -69,45 +68,40 @@
|
|
69
68
|
|
70
69
|
.jstree-categories-context
|
71
70
|
width: 160px
|
72
|
-
background:
|
73
|
-
border: 1px solid #
|
71
|
+
background: white
|
72
|
+
border: 1px solid #aeb0b2
|
74
73
|
position: absolute
|
75
74
|
border-bottom: 0
|
76
|
-
|
77
75
|
a
|
78
76
|
display: block
|
79
77
|
text-decoration: none
|
80
|
-
border-bottom: 1px solid #
|
78
|
+
border-bottom: 1px solid #aeb0b2
|
81
79
|
color: black
|
82
80
|
line-height: 20px
|
83
81
|
margin: 0
|
84
|
-
|
85
82
|
&.jstree-disabled:hover
|
86
83
|
display: block
|
87
84
|
text-decoration: none
|
88
|
-
border-bottom: 1px solid #
|
85
|
+
border-bottom: 1px solid #aeb0b2
|
89
86
|
color: black
|
90
87
|
line-height: 20px
|
91
88
|
padding: 1px 0 1px 25px
|
92
89
|
margin: 0
|
93
|
-
|
94
90
|
&:hover
|
95
|
-
background-color: #
|
96
|
-
color: #
|
97
|
-
border-bottom: 1px solid #
|
98
|
-
|
91
|
+
background-color: #d6edf4
|
92
|
+
color: #2973bd
|
93
|
+
border-bottom: 1px solid #aeb0b2
|
99
94
|
&.jstree-disabled
|
100
95
|
color: silver
|
101
96
|
opacity: 0.5
|
102
|
-
-ms-filter:
|
103
|
-
filter: alpha(opacity=50)
|
97
|
+
-ms-filter: "alpha(opacity=50)"
|
98
|
+
filter: alpha(opacity = 50)
|
104
99
|
zoom: 1
|
105
|
-
|
106
100
|
&:hover
|
107
101
|
color: silver
|
108
102
|
opacity: 0.5
|
109
|
-
-ms-filter:
|
110
|
-
filter: alpha(opacity=50)
|
103
|
+
-ms-filter: "alpha(opacity=50)"
|
104
|
+
filter: alpha(opacity = 50)
|
111
105
|
zoom: 1
|
112
106
|
ins
|
113
107
|
&.create
|
@@ -85,7 +85,7 @@ private
|
|
85
85
|
|
86
86
|
if params[:category_id]
|
87
87
|
conditions[:categories_elements] = { :category_id => params[:category_id] }
|
88
|
-
includes << :
|
88
|
+
includes << :categories
|
89
89
|
end
|
90
90
|
|
91
91
|
includes << :role if order_column == 2
|
@@ -98,7 +98,7 @@ private
|
|
98
98
|
options[:star] = true
|
99
99
|
@admins = Administrator.search(params[:sSearch],options)
|
100
100
|
else
|
101
|
-
@admins = Administrator.paginate(
|
101
|
+
@admins = Administrator.paginate(options)
|
102
102
|
end
|
103
103
|
end
|
104
104
|
end
|
@@ -126,7 +126,7 @@ class Admin::AttachmentsController < Admin::BaseController
|
|
126
126
|
end
|
127
127
|
respond_to do |wants|
|
128
128
|
wants.html do
|
129
|
-
redirect_to(forgeos_core
|
129
|
+
redirect_to([forgeos_core, :admin, @media.class.to_s.underscore.pluralize])
|
130
130
|
end
|
131
131
|
wants.js
|
132
132
|
end
|
@@ -178,7 +178,7 @@ class Admin::AttachmentsController < Admin::BaseController
|
|
178
178
|
# category
|
179
179
|
if params[:category_id]
|
180
180
|
conditions[:categories_elements] = { :category_id => params[:category_id] }
|
181
|
-
includes << :
|
181
|
+
includes << :categories
|
182
182
|
end
|
183
183
|
if params[:ids]
|
184
184
|
conditions[:attachments] = { :id => params[:ids].split(',') }
|
@@ -192,7 +192,7 @@ class Admin::AttachmentsController < Admin::BaseController
|
|
192
192
|
options[:star] = true
|
193
193
|
@medias = type.search(params[:sSearch],options)
|
194
194
|
else
|
195
|
-
@medias = type.paginate(
|
195
|
+
@medias = type.paginate(options)
|
196
196
|
end
|
197
197
|
end
|
198
198
|
|
@@ -89,7 +89,7 @@ private
|
|
89
89
|
|
90
90
|
if params[:category_id]
|
91
91
|
conditions[:categories_elements] = { :category_id => params[:category_id] }
|
92
|
-
includes << :
|
92
|
+
includes << :categories
|
93
93
|
end
|
94
94
|
|
95
95
|
options[:conditions] = conditions unless conditions.empty?
|
@@ -100,7 +100,7 @@ private
|
|
100
100
|
options[:star] = true
|
101
101
|
@rights = Right.search(params[:sSearch],options)
|
102
102
|
else
|
103
|
-
@rights = Right.paginate(
|
103
|
+
@rights = Right.paginate(options)
|
104
104
|
end
|
105
105
|
end
|
106
106
|
end
|
@@ -100,11 +100,11 @@ private
|
|
100
100
|
|
101
101
|
if params[:category_id]
|
102
102
|
conditions[:categories_elements] = { :category_id => params[:category_id] }
|
103
|
-
includes << :
|
103
|
+
includes << :categories
|
104
104
|
end
|
105
105
|
|
106
106
|
if order_column == 2
|
107
|
-
includes << :administrators
|
107
|
+
includes << :administrators
|
108
108
|
group_by << 'roles.id'
|
109
109
|
end
|
110
110
|
|
@@ -117,7 +117,7 @@ private
|
|
117
117
|
options[:star] = true
|
118
118
|
@roles = Role.search(params[:sSearch],options)
|
119
119
|
else
|
120
|
-
@roles = Role.paginate(
|
120
|
+
@roles = Role.paginate(options)
|
121
121
|
end
|
122
122
|
end
|
123
123
|
end
|
@@ -187,7 +187,7 @@ private
|
|
187
187
|
|
188
188
|
if params[:category_id]
|
189
189
|
conditions[:categories_elements] = { :category_id => params[:category_id] }
|
190
|
-
includes << :
|
190
|
+
includes << :categories
|
191
191
|
end
|
192
192
|
|
193
193
|
if params[:ids]
|
@@ -201,7 +201,7 @@ private
|
|
201
201
|
options[:star] = true
|
202
202
|
@users = User.search(params[:sSearch],options)
|
203
203
|
else
|
204
|
-
@users = User.paginate(
|
204
|
+
@users = User.paginate(options)
|
205
205
|
end
|
206
206
|
end
|
207
207
|
end
|
@@ -65,7 +65,7 @@ class Forgeos::ApplicationController < ActionController::Base
|
|
65
65
|
session[:return_to] = request.fullpath
|
66
66
|
end
|
67
67
|
|
68
|
-
def redirect_to_stored_location(default_path = :login, &block)
|
68
|
+
def redirect_to_stored_location(default_path = [forgeos_core, :login], &block)
|
69
69
|
if redirect = session[:return_to]
|
70
70
|
session[:return_to] = nil
|
71
71
|
redirect_to(redirect)
|
data/app/models/category.rb
CHANGED
@@ -4,6 +4,10 @@ class Category < ActiveRecord::Base
|
|
4
4
|
has_and_belongs_to_many_attachments
|
5
5
|
acts_as_list :scope => [:type]
|
6
6
|
|
7
|
+
validates_each :parent_id do |record, attr, value|
|
8
|
+
record.errors.add(attr, 'Can\'t be his self parent') if record.id == value
|
9
|
+
end
|
10
|
+
|
7
11
|
def level
|
8
12
|
return self.ancestors.length
|
9
13
|
end
|
@@ -22,16 +26,16 @@ class Category < ActiveRecord::Base
|
|
22
26
|
|
23
27
|
def category_picture
|
24
28
|
unless self.attachments.empty?
|
25
|
-
|
29
|
+
self.attachments.first.public_filename(:categories_icon)
|
26
30
|
else
|
27
|
-
|
31
|
+
'folder'
|
28
32
|
end
|
29
33
|
end
|
30
34
|
|
31
35
|
def to_jstree
|
32
36
|
hash = {}
|
33
37
|
hash[:attr] = { :id => "#{self.class.to_s.underscore}_#{id}", :type => 'folder' }
|
34
|
-
hash[:data] = { :title => name, :
|
38
|
+
hash[:data] = { :title => name, :icon => category_picture, :attr => { :title => total_elements_count } }
|
35
39
|
unless children.empty?
|
36
40
|
hash[:children] = children.all(:order => 'position ASC').collect(&:to_jstree)
|
37
41
|
end
|
data/app/models/right.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
class Right < ActiveRecord::Base
|
2
2
|
has_and_belongs_to_many :roles
|
3
3
|
|
4
|
-
has_and_belongs_to_many :
|
4
|
+
has_and_belongs_to_many :categories, :readonly => true, :join_table => 'categories_elements', :foreign_key => 'element_id', :association_foreign_key => 'category_id'
|
5
5
|
|
6
6
|
#check that fields have data in them
|
7
7
|
validates :name, :controller_name, :action_name, :presence => true
|
data/app/models/role.rb
CHANGED
@@ -4,7 +4,7 @@ class Role < ActiveRecord::Base
|
|
4
4
|
|
5
5
|
validates :name, :presence => true
|
6
6
|
|
7
|
-
has_and_belongs_to_many :
|
7
|
+
has_and_belongs_to_many :categories, :readonly => true, :join_table => 'categories_elements', :foreign_key => 'element_id', :association_foreign_key => 'category_id'
|
8
8
|
|
9
9
|
define_index do
|
10
10
|
indexes name, :sortable => true
|
data/app/models/user.rb
CHANGED
@@ -3,10 +3,13 @@ class User < Person
|
|
3
3
|
accepts_nested_attributes_for :addresses
|
4
4
|
attr_accessible :addresses_attributes
|
5
5
|
|
6
|
-
has_and_belongs_to_many :
|
7
|
-
|
6
|
+
has_and_belongs_to_many :categories,
|
7
|
+
:readonly => true,
|
8
|
+
:join_table => 'categories_elements',
|
9
|
+
:foreign_key => 'element_id',
|
10
|
+
:association_foreign_key => 'category_id'
|
11
|
+
|
8
12
|
def age
|
9
13
|
((Date.today - self.birthday) / 365).floor
|
10
14
|
end
|
11
|
-
|
12
15
|
end
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<%
|
2
2
|
output = {
|
3
|
-
:
|
3
|
+
:sEcho => params[:sEcho],
|
4
|
+
:iTotalRecords => @admins.total_entries || 0,
|
5
|
+
:iTotalDisplayRecords => @admins.size,
|
4
6
|
:aaData => @admins.collect do |admin|
|
5
7
|
link_id = "admin_#{admin.id}"
|
6
8
|
klass = admin.active? ? 'see-on' : 'see-off'
|
@@ -17,10 +17,10 @@
|
|
17
17
|
uploadify_datas[window._forgeos_js_vars.session_key] = window._forgeos_js_vars.session;
|
18
18
|
|
19
19
|
jQuery('#imageUpload').uploadify({
|
20
|
-
"uploader":
|
21
|
-
"cancelImg":
|
22
|
-
"script": "#{forgeos_core.
|
23
|
-
"buttonImg":
|
20
|
+
"uploader": '/assets/forgeos/uploadify/uploadify.swf',
|
21
|
+
"cancelImg": '/assets/forgeos/admin/big-icons/delete-icon.png',
|
22
|
+
"script": "#{forgeos_core.admin_pictures_path}",
|
23
|
+
"buttonImg": '/assets/forgeos/uploadify/upload-#{file_type}_#{I18n.locale}.png',
|
24
24
|
"width": "154",
|
25
25
|
"height": "24",
|
26
26
|
"scriptData": uploadify_datas,
|
@@ -3,7 +3,7 @@
|
|
3
3
|
.backgrounds.big-header
|
4
4
|
= f.text_field :name, :id => 'media-title', :class => 'field_name'
|
5
5
|
.interact-links
|
6
|
-
= Forgeos_save_buttons forgeos_core
|
6
|
+
= Forgeos_save_buttons [forgeos_core, :admin, find_media_type_from_content_type(media).pluralize]
|
7
7
|
|
8
8
|
#content.grid_16.alpha.omega
|
9
9
|
#media-modify.grid_12.alpha
|
@@ -4,4 +4,4 @@
|
|
4
4
|
- if (file_type == @file_type.to_s) || (@media && file_type == @media.class.to_s.downcase)
|
5
5
|
%li.ui-state-default.ui-corner-top.ui-tabs-selected.ui-state-active= link_to span, '#content'
|
6
6
|
- else
|
7
|
-
%li.ui-state-default.ui-corner-top= link_to span, forgeos_core
|
7
|
+
%li.ui-state-default.ui-corner-top= link_to span, [forgeos_core, :admin, file_type.pluralize.to_sym]
|
@@ -1,13 +1,15 @@
|
|
1
1
|
<%
|
2
2
|
output = {
|
3
|
-
:
|
3
|
+
:sEcho => params[:sEcho],
|
4
|
+
:iTotalRecords => @medias.total_entries || 0,
|
5
|
+
:iTotalDisplayRecords => @medias.size,
|
4
6
|
:aaData => @medias.collect do |media|
|
5
7
|
link_id = "attachment_#{media.id}"
|
6
8
|
media_array = []
|
7
9
|
if params[:skin] == 'thumbnail'
|
8
10
|
media_array << render(:partial => 'table_thumbnail.html.haml', :locals => { :media => media })
|
9
11
|
else
|
10
|
-
media_array << content_tag(params[:mode] == 'selection' ? :span: :div,
|
12
|
+
media_array << content_tag((params[:mode] == 'selection' ? :span : :div), content_tag(:div, '', :class=>"handler") + content_tag(:div, '', :class=>"small-icons #{@file_type}"), :id => link_id, :class => "handler_container") <<
|
11
13
|
content_tag(:div, params[:mode] == 'selection' ? media.filename : link_to(media.name, [forgeos_core, :edit, :admin, media], :class => "truncate", :title => media.filename), :class => 'media-name') <<
|
12
14
|
media.file_type.upcase <<
|
13
15
|
media.updated_at.to_s(:short) <<
|
@@ -6,7 +6,7 @@
|
|
6
6
|
.interact-links
|
7
7
|
= link_to I18n.t('media.update.action').capitalize, [forgeos_core, :edit, :admin, @media ], :class => 'backgrounds interact-button'
|
8
8
|
= I18n.t('or')
|
9
|
-
= link_to I18n.t('media.back').capitalize, forgeos_core
|
9
|
+
= link_to I18n.t('media.back').capitalize, [forgeos_core, :admin, find_media_type_from_content_type(@media).pluralize], :class => 'back-link'
|
10
10
|
|
11
11
|
#content.grid_16.alpha.omega
|
12
12
|
#media-modify.grid_12.alpha
|
@@ -1,7 +1,7 @@
|
|
1
1
|
= render :partial => 'tabs'
|
2
2
|
|
3
3
|
#content.grid_16.alpha.omega
|
4
|
-
= form_for :caching do |f|
|
4
|
+
= form_for :caching, :url => [forgeos_core, :admin, :cachings] do |f|
|
5
5
|
.backgrounds.header
|
6
6
|
.interact-links
|
7
7
|
= f.submit t('caching.delete.one').capitalize, :class => 'backgrounds interact-button'
|
@@ -11,4 +11,4 @@
|
|
11
11
|
= check_box_tag "file[#{index}]", file[1]
|
12
12
|
= file[0]
|
13
13
|
= hidden_field_tag "hidden_files[#{index}]", file[1]
|
14
|
-
.clear
|
14
|
+
.clear
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<%
|
2
2
|
output = {
|
3
|
-
:
|
3
|
+
:sEcho => params[:sEcho],
|
4
|
+
:iTotalRecords => @categories.total_entries || 0,
|
5
|
+
:iTotalDisplayRecords => @categories.size,
|
4
6
|
:aaData => @categories.collect do |category|
|
5
7
|
link_id = "menu_link_#{category.id}"
|
6
8
|
[
|
@@ -3,3 +3,4 @@
|
|
3
3
|
%li.ui-state-default.ui-corner-top= link_to t(:role, :count => 2).capitalize, [forgeos_core,:admin,:roles]
|
4
4
|
%li.ui-state-default.ui-corner-top= link_to t(:right, :count => 2).capitalize, forgeos_core.admin_rights_path
|
5
5
|
%li.ui-state-default.ui-corner-top.ui-tabs-selected.ui-state-active= link_to t(:import, :count => 1).capitalize, '#content'
|
6
|
+
%li.ui-state-default.ui-corner-top= link_to t(:caching, :count => 1).capitalize, forgeos_core.admin_cachings_path
|
@@ -1,6 +1,6 @@
|
|
1
1
|
= render :partial => 'admin/menus/lang_switcher'
|
2
2
|
= render :partial => 'tabs'
|
3
|
-
|
3
|
+
= form_tag([forgeos_core, :admin, :import] , :multipart => true, :id => 'import_form') do
|
4
4
|
.backgrounds.big-header
|
5
5
|
.interact-links
|
6
6
|
= fg_submit_tag 'import.send_file'
|
@@ -3,3 +3,4 @@
|
|
3
3
|
%li.ui-state-default.ui-corner-top= link_to t(:role, :count => 2).capitalize, [forgeos_core,:admin,:roles]
|
4
4
|
%li.ui-state-default.ui-corner-top.ui-tabs-selected.ui-state-active= link_to t(:right, :count => 2).capitalize, '#content'
|
5
5
|
%li.ui-state-default.ui-corner-top= link_to t(:import, :count => 1).capitalize, forgeos_core.admin_import_path
|
6
|
+
%li.ui-state-default.ui-corner-top= link_to t(:caching, :count => 1).capitalize, forgeos_core.admin_cachings_path
|
@@ -1,18 +1,20 @@
|
|
1
1
|
<%
|
2
2
|
output = {
|
3
|
-
:
|
3
|
+
:sEcho => params[:sEcho],
|
4
|
+
:iTotalRecords => @rights.total_entries || 0,
|
5
|
+
:iTotalDisplayRecords => @rights.size,
|
4
6
|
:aaData => @rights.collect do |right|
|
5
7
|
link_id = "right_#{right.id}"
|
6
8
|
[
|
7
9
|
content_tag(:div,
|
8
|
-
|
9
|
-
|
10
|
+
content_tag(:div, '', :class => 'handler') +
|
11
|
+
content_tag(:div, '', :id => link_id, :class => 'small-icons right-ico'),
|
10
12
|
:class => 'handler_container'),
|
11
13
|
content_tag(:div, right.name, :class => 'right-name'),
|
12
14
|
right.controller_name,
|
13
15
|
right.action_name,
|
14
|
-
content_tag(:span,
|
15
|
-
content_tag(:span,
|
16
|
+
content_tag(:span, " ".html_safe, :class => 'small-icons duplicate-link duplicate-right') +
|
17
|
+
content_tag(:span, " ".html_safe, :class => 'small-icons edit-link edit-right') +
|
16
18
|
link_to('', [forgeos_core, :admin, right],
|
17
19
|
:remote => true,
|
18
20
|
:method => :delete,
|
@@ -3,3 +3,4 @@
|
|
3
3
|
%li.ui-state-default.ui-corner-top.ui-tabs-selected.ui-state-active= link_to t(:role, :count => 2).capitalize, '#content'
|
4
4
|
%li.ui-state-default.ui-corner-top= link_to t(:right, :count => 2).capitalize, forgeos_core.admin_rights_path
|
5
5
|
%li.ui-state-default.ui-corner-top= link_to t(:import, :count => 1).capitalize, forgeos_core.admin_import_path
|
6
|
+
%li.ui-state-default.ui-corner-top= link_to t(:caching, :count => 1).capitalize, forgeos_core.admin_cachings_path
|
@@ -1,13 +1,15 @@
|
|
1
1
|
<%
|
2
2
|
output = {
|
3
|
-
:
|
3
|
+
:sEcho => params[:sEcho],
|
4
|
+
:iTotalRecords => @roles.total_entries || 0,
|
5
|
+
:iTotalDisplayRecords => @roles.size,
|
4
6
|
:aaData => @roles.collect do |role|
|
5
7
|
link_id = "role_#{role.id}"
|
6
8
|
klass = role.active? ? 'see-on' : 'see-off'
|
7
9
|
[
|
8
|
-
content_tag(:div, '<div class="image"> <span class="small-icons role-ico"> </span></div>', :id => link_id, :class => role.administrators.count > 0 ? 'some-variants plus' : ''),
|
10
|
+
content_tag(:div, '<div class="image"> <span class="small-icons role-ico"> </span></div>'.html_safe, :id => link_id, :class => role.administrators.count > 0 ? 'some-variants plus' : ''),
|
9
11
|
content_tag(:div, link_to(role.name, [forgeos_core, :edit, :admin, role]), :class => 'role-name') +
|
10
|
-
content_tag(:p,role.administrators.all.collect{ |admin| link_to("#{admin.firstname} #{admin.lastname}", [forgeos_core, :admin, admin]) }.join('<br />')
|
12
|
+
content_tag(:p,role.administrators.all.collect{ |admin| link_to("#{admin.firstname} #{admin.lastname}", [forgeos_core, :admin, admin]) }.join('<br />').html_safe, :style=>'display:none'),
|
11
13
|
role.administrators.count,
|
12
14
|
role.created_at.to_s(:short),
|
13
15
|
link_to('', [forgeos_core, :activate ,:admin, role],
|