diff --git a/app/helpers/orbit_backend_helper.rb b/app/helpers/orbit_backend_helper.rb index ba170ce..3691b0d 100644 --- a/app/helpers/orbit_backend_helper.rb +++ b/app/helpers/orbit_backend_helper.rb @@ -8,7 +8,8 @@ module OrbitBackendHelper active = params[:sort].eql? field.to_s order = active ? (["asc", "desc"]-[params[:order]]).first : "asc" arrow = (order.eql? "desc") ? "" : "" - "#{t(field.to_sym)} #{active ? arrow : ""}".html_safe + klass = field.eql?(:title) ? "span5" : "span2" + "#{t(field.to_sym)} #{active ? arrow : ""}".html_safe end def datetime_picker(object_name, method, options = {}) diff --git a/app/templates/orbit_bootstrap/modules/link/index.html.erb b/app/templates/orbit_bootstrap/modules/link/index.html.erb deleted file mode 100644 index 2335978..0000000 --- a/app/templates/orbit_bootstrap/modules/link/index.html.erb +++ /dev/null @@ -1,18 +0,0 @@ -
-

{{widget-title}}

- - -
\ No newline at end of file diff --git a/app/templates/orbit_bootstrap/modules/link/_widget.html.erb b/app/templates/orbit_bootstrap/modules/web_resource/_widget.html.erb similarity index 100% rename from app/templates/orbit_bootstrap/modules/link/_widget.html.erb rename to app/templates/orbit_bootstrap/modules/web_resource/_widget.html.erb diff --git a/app/templates/orbit_bootstrap/modules/web_resource/index.html.erb b/app/templates/orbit_bootstrap/modules/web_resource/index.html.erb new file mode 100644 index 0000000..6114904 --- /dev/null +++ b/app/templates/orbit_bootstrap/modules/web_resource/index.html.erb @@ -0,0 +1,10 @@ +
+

{{widget-title}}

+ +
\ No newline at end of file diff --git a/built_in_extensions.rb b/built_in_extensions.rb index 780c111..64d7cf4 100644 --- a/built_in_extensions.rb +++ b/built_in_extensions.rb @@ -1,3 +1,4 @@ gem 'announcement', git: 'git@gitlab.tp.rulingcom.com:saurabh/announcement-test.git' gem 'ad_banner', git: 'git@gitlab.tp.rulingcom.com:saurabh/adbanner-test.git' -gem 'gallery', git: 'git@gitlab.tp.rulingcom.com:saurabh/gallery.git' \ No newline at end of file +gem 'gallery', git: 'git@gitlab.tp.rulingcom.com:saurabh/gallery.git' +gem 'links', git: 'git@gitlab.tp.rulingcom.com:saurabh/links.git' \ No newline at end of file diff --git a/lib/orbit_model/status.rb b/lib/orbit_model/status.rb index 5b5a0f4..713ba08 100644 --- a/lib/orbit_model/status.rb +++ b/lib/orbit_model/status.rb @@ -2,6 +2,7 @@ module OrbitModel module Status def self.included(base) + base.extend ClassMethods base.field :is_top, :type => Boolean, :default => false base.field :is_hot, :type => Boolean, :default => false base.field :is_hidden, :type => Boolean, :default => false @@ -27,6 +28,13 @@ module OrbitModel end end + module ClassMethods + def with_status(status) + status = [status].flatten + self.any_of(status.map{|s| {s.to_sym=>true}}) + end + end + end end