hicube 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/hicube/application.js +1 -1
- data/app/assets/stylesheets/hicube/application.css +2 -3
- data/app/controllers/hicube/application_controller.rb +1 -1
- data/app/models/hicube/page.rb +2 -2
- data/app/views/hicube/pages/_form.html.slim +2 -2
- data/config/initializers/assets.rb +1 -0
- data/lib/generators/hicube/install/templates/generate_hicube_pages.rb +1 -1
- data/lib/hicube/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd247afe6193033467b8bbf061c14dc0eebf7d76
|
4
|
+
data.tar.gz: e81dace05c98c3ef5ae00ecb1396bf04db465d21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bb6dd3bb8f59033b774ac29b1536185a76841674078f3b0922d788e0e53e82e79cef8b1e490434affcd89f6cd4a9d58037d1e51e461b67b64ccb07f61f94e8b
|
7
|
+
data.tar.gz: 6e1148c74a1902d47d506251a05f50fd22fd1146eb7c148144559193c5e949d4d3b6190df6a40a7b26cfcfa3f2a172a57e14e66f3b001808fa857f00d6d148ce
|
@@ -5,9 +5,9 @@
|
|
5
5
|
*= require twitter/bootstrap
|
6
6
|
*= require dataTables/bootstrap/3/jquery.dataTables.bootstrap
|
7
7
|
*= require dataTables/extras/dataTables.responsive
|
8
|
-
|
8
|
+
* require icheck/square/blue
|
9
9
|
*= require icheck/minimal/blue
|
10
|
-
|
10
|
+
* require icheck/flat/blue
|
11
11
|
*= require ionicons
|
12
12
|
*= require jquery.fileupload
|
13
13
|
*= require jquery.fileupload-ui
|
@@ -15,7 +15,6 @@
|
|
15
15
|
|
16
16
|
* Adminlte and corresponding css
|
17
17
|
*= require admin-lte
|
18
|
-
*= require skin-purple
|
19
18
|
*= require skin-blue
|
20
19
|
*= require_tree .
|
21
20
|
*= require_self
|
@@ -39,7 +39,7 @@ module Hicube
|
|
39
39
|
public
|
40
40
|
|
41
41
|
def after_sign_in_path_for(resource)
|
42
|
-
return request.env['omniauth.origin'] || stored_location_for(resource) || '/hicube/pages'
|
42
|
+
return request.env['omniauth.origin'] || stored_location_for(resource) || '/hicube/pages/index/edit'
|
43
43
|
end
|
44
44
|
|
45
45
|
# Generate a notification message.
|
data/app/models/hicube/page.rb
CHANGED
@@ -46,7 +46,7 @@ module Hicube
|
|
46
46
|
# Order for links
|
47
47
|
field :od, type: Integer,
|
48
48
|
as: :order,
|
49
|
-
default:
|
49
|
+
default: 10
|
50
50
|
|
51
51
|
# field :jt, type: Boolean, # Saving as String, so don't have to do transalation from String to Boolean in controller
|
52
52
|
# as: :junction,
|
@@ -70,7 +70,7 @@ module Hicube
|
|
70
70
|
# Scopes
|
71
71
|
#
|
72
72
|
default_scope -> { ne(_slugs: ["index"]) }
|
73
|
-
scope :parents, -> { where(parent: nil) }
|
73
|
+
scope :parents, -> { where(parent: nil).asc(:order) }
|
74
74
|
scope :headers, -> { where(header: true).asc(:order) }
|
75
75
|
scope :footers, -> { where(footer: true).asc(:order) }
|
76
76
|
# scope :children, -> (parent) {where(parent: parent)}
|
@@ -94,13 +94,13 @@
|
|
94
94
|
.row
|
95
95
|
.col-xs-3
|
96
96
|
= f.label :name
|
97
|
-
= f.text_field :title, placeholder: 'Enter ...', disabled: (@page.
|
97
|
+
= f.text_field :title, placeholder: 'Enter ...', disabled: (@page.index? rescue false), class: 'form-control'
|
98
98
|
.col-xs-3
|
99
99
|
= f.label :parent
|
100
100
|
= f.collection_select :parent, Hicube::Page.parents,:id,:title,{include_blank: '', selected: parent_id},{class: 'form-control', disabled: (@page.title.eql?('Index') rescue false)}
|
101
101
|
.col-xs-2
|
102
102
|
= f.label :link_order
|
103
|
-
= f.select :order, 1..Hicube::Page.count, {}, {class: 'form-control'}
|
103
|
+
= f.select :order, 1..Hicube::Page.count, {disabled: (@page.index? rescue false)}, {class: 'form-control'}
|
104
104
|
.col-xs-2
|
105
105
|
.checkbox.iCheck style="padding-top: 10px;"
|
106
106
|
label= f.check_box :header, class: 'minimal'
|
@@ -0,0 +1 @@
|
|
1
|
+
Rails.application.config.assets.precompile += %w( icheck/minimal/blue.png icheck/minimal/blue@2x.png )
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class GenerateHicubePages < Mongoid::Migration
|
2
2
|
def self.up
|
3
3
|
puts "Creating Hicube Index Page"
|
4
|
-
Hicube::Page.create!(account: Hicube::Account.first, title: 'Index', body: "body\n\tb This is index page")
|
4
|
+
Hicube::Page.create!(account: Hicube::Account.first, title: 'Index', order: 0, body: "body\n\tb This is index page")
|
5
5
|
end
|
6
6
|
|
7
7
|
def self.down
|
data/lib/hicube/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hicube
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gaurav Cheema
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -530,6 +530,7 @@ files:
|
|
530
530
|
- app/views/layouts/hicube/application.html.slim
|
531
531
|
- app/views/layouts/mailer.html.slim
|
532
532
|
- app/views/layouts/mailer.text.slim
|
533
|
+
- config/initializers/assets.rb
|
533
534
|
- config/initializers/carrierwave.rb
|
534
535
|
- config/initializers/devise.rb
|
535
536
|
- config/initializers/liquid.rb
|