hicube 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +24 -0
  4. data/app/assets/images/hicube/avatar.png +0 -0
  5. data/app/assets/images/hicube/dnd.png +0 -0
  6. data/app/assets/images/hicube/noimagefound.png +0 -0
  7. data/app/assets/javascripts/hicube/accounts.js +0 -0
  8. data/app/assets/javascripts/hicube/application.js +52 -0
  9. data/app/assets/javascripts/hicube/contents.js +2 -0
  10. data/app/assets/javascripts/hicube/documents.js +10 -0
  11. data/app/assets/javascripts/hicube/pages.coffee +7 -0
  12. data/app/assets/javascripts/hicube/public/pages.coffee +0 -0
  13. data/app/assets/javascripts/hicube/snippets.coffee +0 -0
  14. data/app/assets/javascripts/hicube.js +128 -0
  15. data/app/assets/stylesheets/hicube/accounts.css +0 -0
  16. data/app/assets/stylesheets/hicube/application.css +22 -0
  17. data/app/assets/stylesheets/hicube/contents.css +4 -0
  18. data/app/assets/stylesheets/hicube/documents.css +24 -0
  19. data/app/assets/stylesheets/hicube/pages.css +10 -0
  20. data/app/assets/stylesheets/hicube/public/pages.css +4 -0
  21. data/app/assets/stylesheets/hicube/snippets.css +4 -0
  22. data/app/assets/stylesheets/hicube.css +18 -0
  23. data/app/controllers/hicube/accounts_controller.rb +66 -0
  24. data/app/controllers/hicube/application_controller.rb +181 -0
  25. data/app/controllers/hicube/base_controller.rb +148 -0
  26. data/app/controllers/hicube/contents_controller.rb +53 -0
  27. data/app/controllers/hicube/documents_controller.rb +85 -0
  28. data/app/controllers/hicube/pages_controller.rb +106 -0
  29. data/app/controllers/hicube/public/base_controller.rb +92 -0
  30. data/app/controllers/hicube/public/pages_controller.rb +62 -0
  31. data/app/controllers/hicube/snippets_controller.rb +100 -0
  32. data/app/helpers/hicube/application_helper.rb +74 -0
  33. data/app/helpers/hicube/contents_helper.rb +4 -0
  34. data/app/helpers/hicube/documents_helper.rb +4 -0
  35. data/app/helpers/hicube/pages_helper.rb +4 -0
  36. data/app/helpers/hicube/public/pages_helper.rb +19 -0
  37. data/app/helpers/hicube/snippets_helper.rb +4 -0
  38. data/app/mailers/hicube/application_mailer.rb +8 -0
  39. data/app/mailers/hicube/page_mailer.rb +13 -0
  40. data/app/models/hicube/account.rb +26 -0
  41. data/app/models/hicube/content.rb +30 -0
  42. data/app/models/hicube/document.rb +46 -0
  43. data/app/models/hicube/page.rb +98 -0
  44. data/app/models/hicube/snippet.rb +20 -0
  45. data/app/models/hicube/tag.rb +19 -0
  46. data/app/models/hicube/user.rb +67 -0
  47. data/app/uploaders/hicube/file_uploader.rb +53 -0
  48. data/app/uploaders/hicube/image_uploader.rb +53 -0
  49. data/app/views/devise/mailer/confirmation_instructions.html.slim +8 -0
  50. data/app/views/devise/mailer/reset_password_instructions.html.slim +12 -0
  51. data/app/views/devise/mailer/unlock_instructions.html.slim +10 -0
  52. data/app/views/devise/passwords/edit.html.slim +22 -0
  53. data/app/views/devise/passwords/new.html.slim +15 -0
  54. data/app/views/devise/sessions/new.html.slim +24 -0
  55. data/app/views/hicube/accounts/_form.html.slim +31 -0
  56. data/app/views/hicube/accounts/_navigation.html.slim +25 -0
  57. data/app/views/hicube/accounts/edit.html.slim +4 -0
  58. data/app/views/hicube/accounts/index.html.slim +12 -0
  59. data/app/views/hicube/accounts/new.html.slim +4 -0
  60. data/app/views/hicube/accounts/show.html.slim +21 -0
  61. data/app/views/hicube/base/_flash.html.slim +36 -0
  62. data/app/views/hicube/base/_footer.html.slim +10 -0
  63. data/app/views/hicube/base/_header.html.slim +31 -0
  64. data/app/views/hicube/base/_navigation.html.slim +16 -0
  65. data/app/views/hicube/base/_sidebar.html.slim +122 -0
  66. data/app/views/hicube/contents/_form.html.slim +11 -0
  67. data/app/views/hicube/contents/edit.html.slim +9 -0
  68. data/app/views/hicube/contents/new.html.slim +9 -0
  69. data/app/views/hicube/documents/_form.html.slim +18 -0
  70. data/app/views/hicube/documents/_navigation.html.slim +25 -0
  71. data/app/views/hicube/documents/edit.html.slim +9 -0
  72. data/app/views/hicube/documents/index.html.slim +57 -0
  73. data/app/views/hicube/documents/new.html.slim +9 -0
  74. data/app/views/hicube/page_mailer/notify.html.slim +1 -0
  75. data/app/views/hicube/page_mailer/notify.text.slim +8 -0
  76. data/app/views/hicube/pages/_form.html.slim +153 -0
  77. data/app/views/hicube/pages/_navigation.html.slim +27 -0
  78. data/app/views/hicube/pages/edit.html.slim +9 -0
  79. data/app/views/hicube/pages/index.html.slim +32 -0
  80. data/app/views/hicube/pages/index.json.jbuilder +4 -0
  81. data/app/views/hicube/pages/new.html.slim +9 -0
  82. data/app/views/hicube/pages/show.html.slim +2 -0
  83. data/app/views/hicube/pages/show.json.jbuilder +1 -0
  84. data/app/views/hicube/public/pages/edit.html.slim +11 -0
  85. data/app/views/hicube/public/pages/show.html.slim +17 -0
  86. data/app/views/hicube/snippets/_form.html.slim +21 -0
  87. data/app/views/hicube/snippets/_navigation.html.slim +25 -0
  88. data/app/views/hicube/snippets/edit.html.slim +9 -0
  89. data/app/views/hicube/snippets/index.html.slim +25 -0
  90. data/app/views/hicube/snippets/new.html.slim +9 -0
  91. data/app/views/layouts/hicube/application.html.slim +26 -0
  92. data/app/views/layouts/hicube.html.slim +10 -0
  93. data/app/views/layouts/mailer.html.slim +3 -0
  94. data/app/views/layouts/mailer.text.slim +1 -0
  95. data/config/initializers/carrierwave.rb +12 -0
  96. data/config/initializers/devise.rb +282 -0
  97. data/config/initializers/liquid.rb +4 -0
  98. data/config/initializers/markdown.rb +7 -0
  99. data/config/locales/en.yml +18 -0
  100. data/config/routes.rb +40 -0
  101. data/lib/generators/hicube/install/install_generator.rb +49 -0
  102. data/lib/generators/hicube/install/templates/generate_hicube_accounts.rb +12 -0
  103. data/lib/generators/hicube/install/templates/generate_hicube_pages.rb +14 -0
  104. data/lib/generators/hicube/install/templates/generate_hicube_users.rb +14 -0
  105. data/lib/generators/hicube/install/templates/sitemap.rb +17 -0
  106. data/lib/hicube/engine.rb +6 -0
  107. data/lib/hicube/liquid/tags/content.rb +31 -0
  108. data/lib/hicube/liquid/tags/img.rb +21 -0
  109. data/lib/hicube/liquid/tags/snippet.rb +40 -0
  110. data/lib/hicube/liquid/tags/url.rb +21 -0
  111. data/lib/hicube/version.rb +3 -0
  112. data/lib/hicube.rb +30 -0
  113. data/lib/tasks/hicube_tasks.rake +4 -0
  114. metadata +576 -0
@@ -0,0 +1,31 @@
1
+ .col-xs-12
2
+ .box.box-primary
3
+ .box-header
4
+ .box-title
5
+ | Google Analytics
6
+ .box-body
7
+ .form-group
8
+ .row
9
+ .col-xs-6
10
+ label Domain
11
+ = f.text_field :domain, class: 'form-control'
12
+ .col-xs-6
13
+ label Analytics
14
+ = f.text_field :ga, class: 'form-control'
15
+
16
+ .page-header
17
+ | Notification Email Template
18
+
19
+ .row
20
+ .col-xs-6
21
+ label HTML Body
22
+ = f.text_area :notify_email_html, rows: 10, class: 'form-control'
23
+
24
+ .col-xs-6
25
+ label Text Body
26
+ = f.text_area :notify_email_text, rows: 10, class: 'form-control'
27
+
28
+
29
+ .box-footer
30
+ button.btn.btn-flat.btn-primary.pull-right type="submit" Save
31
+ = link_to 'Cancel', account_path(@account), class: 'btn btn-flat btn-default'
@@ -0,0 +1,25 @@
1
+ - if current_page?(action: 'new')
2
+ - heading = 'New'
3
+ - subheading = 'Add'
4
+ - elsif current_page?(action: 'new')
5
+ - heading = 'Edit'
6
+ - subheading = 'Update'
7
+ - else
8
+ - subheading = 'Settings'
9
+
10
+ section.content-header
11
+ h1
12
+ | #{heading} #{controller_name.singularize.camelize}
13
+ small
14
+ | #{subheading}
15
+ ol.breadcrumb
16
+ li
17
+ a href=pages_path
18
+ i.fa.fa-dashboard
19
+ | Home
20
+ li class=(current_page?(eval("#{controller_name.singularize}_path")) ? :active : nil)
21
+ a href="#{controller_name}_path"
22
+ = controller_name.camelize
23
+ - unless current_page?(eval("#{controller_name.singularize}_path"))
24
+ li.active
25
+ | #{heading} #{controller_name.singularize.camelize}
@@ -0,0 +1,4 @@
1
+ section.content
2
+ .row
3
+ = form_for @account, url: account_path(@account), role: 'form' do |f|
4
+ = render partial: 'form', locals: {f: f}
@@ -0,0 +1,12 @@
1
+ section.content
2
+ .row
3
+ .col-xs-12
4
+ .box.box-primary
5
+ .box-header
6
+ .box-title
7
+ | Account Settings
8
+ .box-body
9
+ | Google Analytics -
10
+ = @accounts.first.ga
11
+ .box-footer
12
+ = link_to 'Edit', edit_account_path(@accounts.first), class: 'btn btn-success'
@@ -0,0 +1,4 @@
1
+ section.content
2
+ .row
3
+ = form_for :account, url: account_path, role: 'form' do |f|
4
+ = render partial: 'form', locals: {f: f}
@@ -0,0 +1,21 @@
1
+ section.content
2
+ .row
3
+ .col-xs-12
4
+ .box.box-primary
5
+ .box-body
6
+ dl.dl-horizontal
7
+ dt
8
+ | Domain
9
+ dd
10
+ = @account.domain
11
+ dt
12
+ | Google Anaytics
13
+ dd
14
+ = @account.ga
15
+ dt
16
+ | Email Template
17
+ dd
18
+ = @account.notify_email_html
19
+ .box-footer
20
+ = link_to 'Edit', edit_account_path(@account), class: 'btn btn-primary btn-flat pull-right'
21
+
@@ -0,0 +1,36 @@
1
+ section.content-header
2
+ - unless flash.nil?
3
+ - flash.each do |type, message|
4
+
5
+ / Skip unknown flash types.
6
+ - next unless Hicube::ApplicationController::FLASH_TYPES.include?(type.to_sym)
7
+
8
+ - if type.to_s.downcase == 'success'
9
+ .alert.alert-success.alert-dismissable.fade.in
10
+ button.close data-dismiss="alert" aria-hidden="true"
11
+ ' ×
12
+ | #{message.join(', ') rescue message}
13
+ - elsif type.to_s.downcase == 'notice'
14
+ .alert.alert-info.alert-dismissable.fade.in
15
+ button.close data-dismiss="alert" aria-hidden="true"
16
+ ' ×
17
+ | #{message.join(', ') rescue message}
18
+ - elsif type.to_s.downcase == 'alert'
19
+ .alert.alert-danger.alert-dismissable.fade.in
20
+ button.close data-dismiss="alert" aria-hidden="true"
21
+ ' ×
22
+ | #{message.join(', ') rescue message}
23
+ - elsif type.to_s.downcase == 'error'
24
+ .alert.alert-danger.alert-dismissable.fade.in
25
+ button.close data-dismiss="alert" aria-hidden="true"
26
+ ' ×
27
+ | #{message.join(', ') rescue message}
28
+ - elsif type.to_s.downcase == 'warning'
29
+ .alert.alert-warning.alert-dismissable.fade.in
30
+ button.close data-dismiss="alert" aria-hidden="true"
31
+ ' ×
32
+ | #{message.join(', ') rescue message}
33
+ - else
34
+ .alert.alert-info.alert-dismissable.fade.in
35
+ button.close data-dismiss="alert" aria-hidden="true" ×
36
+ | #{message.join(', ') rescue message}
@@ -0,0 +1,10 @@
1
+ .pull-right.hidden-xs
2
+ b
3
+ | Version
4
+ | 1.0
5
+ strong
6
+ | Copyright © 2014-2015
7
+ a[href="http://www.tecfoundary.com"]
8
+ | Powered By Tecfoundary
9
+ | .
10
+ | All rights reserved.
@@ -0,0 +1,31 @@
1
+ header.main-header
2
+ a.logo href=root_path
3
+ b
4
+ = app_name
5
+ / = app_name.gsub(/[a-z]+/, "")
6
+
7
+ nav.navbar.navbar-static-top[role="navigation"]
8
+ a.sidebar-toggle[href="#" data-toggle="offcanvas" role="button"]
9
+ span.sr-only
10
+ | Toggle navigation
11
+ .navbar-custom-menu
12
+ ul.nav.navbar-nav
13
+ li.dropdown.user.user-menu
14
+ a.dropdown-toggle href="#" data-toggle="dropdown" aria-expanded="false"
15
+ = image_tag 'avatar.png', alt: 'User Image', class: 'user-image'
16
+ span.hidden-xs
17
+ = current_user.name
18
+ ul.dropdown-menu
19
+ li.user-header
20
+ = image_tag "avatar.png", alt: "User image", class: 'img-circle'
21
+ p
22
+ = current_user.name
23
+ small
24
+ | Member since #{current_user.created_at}
25
+ li.user-footer
26
+ / .pull-left
27
+ / a.btn.btn-default.btn-flat href=new_users_program_path
28
+ / | Profile
29
+ .pull-right
30
+ = link_to destroy_user_session_path, method: :delete, class: 'btn btn-default btn-flat'
31
+ | Sign out
@@ -0,0 +1,16 @@
1
+ section.content-header
2
+ h1
3
+ | #{t(heading)}
4
+ small
5
+ | #{t(subheading) unless subheading.nil? }
6
+ ol.breadcrumb
7
+ li
8
+ a href=root_path
9
+ i.fa.fa-dashboard
10
+ | Home
11
+ - breadcrumbs.each do |k,v|
12
+ li class=v[:active]
13
+ - if v[:path].nil?
14
+ = t(k)
15
+ - else
16
+ = link_to t(k), v[:path]
@@ -0,0 +1,122 @@
1
+ section.sidebar
2
+ / .user-panel
3
+ / .pull-left.image
4
+ / = image_tag 'avatar.png', alt: "User Image", class: 'img-circle'
5
+ / .pull-left.info
6
+ / p
7
+ / | Hello, #{current_user.name}
8
+ / a[href="#"]
9
+ / i.fa.fa-circle.text-success
10
+ / | Online
11
+ form.sidebar-form[action="#" method="get"]
12
+ .input-group
13
+ input.form-control[type="text" name="q" placeholder="Search..."]
14
+ span.input-group-btn
15
+ button#search-btn.btn.btn-flat[type="submit" name="search"]
16
+ i.fa.fa-search
17
+ ul.sidebar-menu
18
+ li.header NAVIGATION
19
+ / li.treeview class=(sidebar_class(:new, :page) || sidebar_class(:edit, :page) || sidebar_class(:index, :page) || sidebar_class(:show, :page) || sidebar_class(:edit, :page_content) || sidebar_class(:new, :page_content))
20
+ li.treeview class=(sidebar_class(:new, :page) || sidebar_class(:edit, :page) || sidebar_class(:index, :page) || sidebar_class(:show, :page))
21
+ a href="#"
22
+ i.fa.fa-file-code-o
23
+ span
24
+ = t 'pages'
25
+ i.fa.fa-angle-left.pull-right
26
+ ul.treeview-menu
27
+ / li class=sidebar_class(:index, :page)
28
+ / a href=pages_path
29
+ / i.fa.fa-angle-double-right
30
+ / = t 'All'
31
+ - Hicube::Page.unscoped.parents.each do |p|
32
+ - unless p.junction?
33
+ li class=(sidebar_class(:edit, :page, p) || sidebar_class(:show, :page, p))
34
+ a href=edit_page_path(p)
35
+ i.fa.fa-angle-double-right
36
+ = p
37
+ - else
38
+ li class=(sidebar_class(:edit, :page, p) || sidebar_class(:show, :page, p) || ((@page.nil? || @page.parent != p) ? false : sidebar_class(:edit, :page)))
39
+ a href="#"
40
+ i.fa.fa-angle-double-right
41
+ = p
42
+ i.fa.fa-angle-left.pull-right
43
+ ul.treeview-menu
44
+ li class=(sidebar_class(:edit, :page, p) || sidebar_class(:show, :page, p))
45
+ a href=edit_page_path(p)
46
+ i.fa.fa-circle-o
47
+ = p
48
+ - p.children.each do |c|
49
+ li class=(sidebar_class(:edit, :page, c) || sidebar_class(:show, :page, c))
50
+ a href=edit_page_path(c)
51
+ i.fa.fa-circle-o
52
+ = c
53
+
54
+ li class=sidebar_class(:new, :page)
55
+ a href=new_page_path
56
+ i.fa.fa-angle-double-right
57
+ = t 'new_page'
58
+ / - unless sidebar_class(:edit, :page).nil? and sidebar_class(:show, :page).nil?
59
+ / li class=(sidebar_class(:edit, :page) or sidebar_class(:show, :page))
60
+ / a href=""
61
+ / i.fa.fa-circle-o
62
+ / = @page
63
+
64
+ li.treeview class=(sidebar_class(:new, :snippet) || sidebar_class(:edit, :snippet) || sidebar_class(:index, :snippet) || sidebar_class(:show, :snippet))
65
+ a href="#"
66
+ i.fa.fa-code
67
+ span
68
+ | Snippets
69
+ i.fa.fa-angle-left.pull-right
70
+ ul.treeview-menu
71
+ / li class=sidebar_class(:index, :snippet)
72
+ / a href=snippets_path
73
+ / i.fa.fa-angle-double-right
74
+ / = t 'list'
75
+ - Hicube::Snippet.each do |s|
76
+ li class=(sidebar_class(:edit, :snippet, s) || sidebar_class(:show, :snippet, s))
77
+ a href=edit_snippet_path(s)
78
+ i.fa.fa-angle-double-right
79
+ = s
80
+ li class=sidebar_class(:new, :snippet)
81
+ a href=new_snippet_path
82
+ i.fa.fa-angle-double-right
83
+ = t 'new'
84
+ / - unless sidebar_class(:edit, :snippet).nil? and sidebar_class(:show, :page).nil?
85
+ / li class=(sidebar_class(:show, :snippet) or sidebar_class(:edit, :snippet))
86
+ / a href=""
87
+ / i.fa.fa-angle-double-right
88
+ / = @snippet
89
+
90
+ li.treeview class=(sidebar_class(:new, :document) || sidebar_class(:edit, :document) || sidebar_class(:index, :document) || sidebar_class(:show, :document))
91
+ a href="#"
92
+ i.fa.fa-picture-o
93
+ span
94
+ | Documents
95
+ i.fa.fa-angle-left.pull-right
96
+ ul.treeview-menu
97
+ li class=sidebar_class(:index, :document)
98
+ a href=documents_path
99
+ i.fa.fa-angle-double-right
100
+ = t 'list'
101
+ li class=sidebar_class(:new, :document)
102
+ a href=new_document_path
103
+ i.fa.fa-angle-double-right
104
+ = t 'new'
105
+ - unless sidebar_class(:edit, :document).nil? and sidebar_class(:show, :document).nil?
106
+ li class=(sidebar_class(:show, :document) or sidebar_class(:edit, :document))
107
+ a href=""
108
+ i.fa.fa-angle-double-right
109
+ = @document
110
+ li.treeview class=(sidebar_class(:edit, :account, Hicube::Account.first) || sidebar_class(:show, :account, Hicube::Account.first) || sidebar_class(:new, :account))
111
+ a href=account_path(Hicube::Account.first)
112
+ i.fa.fa-cogs
113
+ span
114
+ | Settings
115
+ / i.fa.fa-angle-left.pull-right
116
+ / ul.treeview-menu
117
+ / li class=(sidebar_class(:edit, :account) || sidebar_class(:show, :account) || sidebar_class(:new, :account))
118
+ / a href=(Hicube::Account.first.nil? ? new_account_path : account_path(Hicube::Account.first))
119
+ / i.fa.fa-angle-double-right
120
+ / = t 'account'
121
+
122
+ = yield :sidebar_menu
@@ -0,0 +1,11 @@
1
+ .box-body
2
+ .form-group
3
+ = f.label :name
4
+ = f.text_field :name, placeholder: 'Enter ...', class: 'form-control'
5
+ .form-group
6
+ = f.label :body
7
+ = f.text_area :body, class: 'form-control'
8
+
9
+ .box-footer
10
+ button.btn.btn-primary[type="submit"]
11
+ | Submit
@@ -0,0 +1,9 @@
1
+ section.content
2
+ .row
3
+ .col-md-12
4
+ .box.box-warning
5
+ .box-header
6
+ h3.box-title
7
+ | Page Details
8
+ = form_for @page, as: :page, url: page_path(@page), role: 'form' do |f|
9
+ = render partial: 'form', locals: { f: f, parent_id: (@page.child? ? @page.parent.id : '') }
@@ -0,0 +1,9 @@
1
+ section.content
2
+ .row
3
+ .col-md-12
4
+ .box.box-warning
5
+ .box-header
6
+ h3.box-title
7
+ | Content Details
8
+ = form_for :content, url: page_contents_path, role: 'form' do |f|
9
+ = render partial: 'form', locals: { f: f }
@@ -0,0 +1,18 @@
1
+ .box-body
2
+ .form-group
3
+ .form-control
4
+ .col-xs-1 style="padding-left: 0px; padding-right: 0px;"
5
+ .btn.btn-default.btn-xs
6
+ = f.file_field :file, id: "file-upload", class: 'fileInput'
7
+ | Browse
8
+ .col-xs-10.col-md-10
9
+ = f.text_field :name, id: "file-name", placeholder: 'Name of File...', style: "border: 0px;"
10
+ .form-group
11
+ = f.label :tags
12
+ - if current_page?(new_document_path)
13
+ = f.text_field :tags, placeholder: 'Enter tags ...', class: 'form-control'
14
+ - else
15
+ = f.text_field :tags, value: @document.tags.map(&:name), placeholder: 'Enter tags ...', class: 'form-control'
16
+ .box-footer
17
+ button.btn.btn-primary[type="submit"]
18
+ | Submit
@@ -0,0 +1,25 @@
1
+ - if current_page?(action: 'new')
2
+ - heading = 'New'
3
+ - subheading = 'Add'
4
+ - elsif current_page?(action: 'new')
5
+ - heading = 'Edit'
6
+ - subheading = 'Update'
7
+ - else
8
+ - subheading = 'List'
9
+
10
+ section.content-header
11
+ h1
12
+ | #{heading} #{(current_page?(action: 'index') ? controller_name.camelize : controller_name.singularize.camelize)}
13
+ small
14
+ | #{subheading}
15
+ ol.breadcrumb
16
+ li
17
+ a href=pages_path
18
+ i.fa.fa-dashboard
19
+ | Home
20
+ li class=(current_page?(eval("#{controller_name}_path")) ? :active : nil)
21
+ a href="#{controller_name}_path"
22
+ = controller_name.camelize
23
+ - unless current_page?(eval("#{controller_name}_path"))
24
+ li.active
25
+ | #{heading} #{controller_name.singularize.camelize}
@@ -0,0 +1,9 @@
1
+ section.content
2
+ .row
3
+ .col-md-12
4
+ .box.box-warning
5
+ .box-header
6
+ / h3.box-title
7
+ / | Upload Document
8
+ = form_for @document, url: document_path(@document), role: 'form' do |f|
9
+ = render partial: 'form', locals: { f: f }
@@ -0,0 +1,57 @@
1
+ section.content
2
+ .row
3
+ .col-md-12
4
+ .box.box-primary
5
+ .box-header
6
+ i.fa.fa-file
7
+ h3.box-title
8
+ | #{params.has_key?(:image)?t('Image'):t('Document')} List
9
+ / .box-tools.pull-right
10
+ / ul.pagination.pagination-sm.inline
11
+ / li
12
+ / a[href="#"]
13
+ / | «
14
+ / li
15
+ / a[href="#"]
16
+ / | 1
17
+ / li
18
+ / a[href="#"]
19
+ / | 2
20
+ / li
21
+ / a[href="#"]
22
+ / | 3
23
+ / li
24
+ / a[href="#"]
25
+ / | »
26
+ .box-body
27
+ ul.todo-list
28
+ - @documents.each do |d|
29
+ li
30
+ span.handle
31
+ i.fa.fa-ellipsis-v
32
+ '
33
+ i.fa.fa-ellipsis-v
34
+
35
+ span.text
36
+ = d.name
37
+ - d.tags.each do |tag|
38
+ small.label.label-danger
39
+ / i.fa.fa-clock-o
40
+ '
41
+ = tag.name
42
+ .tools
43
+ = link_to edit_document_path(d) do
44
+ i.fa.fa-edit
45
+ = link_to document_path(d), method: :delete, data: { confirm: "Are you sure?" } do
46
+ i.fa.fa-trash-o
47
+
48
+ .box-footer.clearfix.no-border
49
+ - if params.has_key?(:image)
50
+ = link_to new_document_path(image: true), class: 'btn btn-default pull-right' do
51
+ i.fa.fa-plus
52
+ | Add item
53
+ - else
54
+ = link_to new_document_path, class: 'btn btn-default pull-right' do
55
+ i.fa.fa-plus
56
+ | Add item
57
+
@@ -0,0 +1,9 @@
1
+ section.content
2
+ .row
3
+ .col-md-12
4
+ .box.box-warning
5
+ .box-header
6
+ / h3.box-title
7
+ / | Upload Document
8
+ = form_for :document, url: documents_path, role: 'form' do |f|
9
+ = render partial: 'form', locals: { f: f }
@@ -0,0 +1 @@
1
+ = render inline: Hicube::Account.first.notify_email_html
@@ -0,0 +1,8 @@
1
+ = render inline: Hicube::Account.first.notify_email_html
2
+ / p Name
3
+ / = @name
4
+ / p Phone
5
+ / = @phone
6
+ / p
7
+ / p Message
8
+ / = @message
@@ -0,0 +1,153 @@
1
+ / .row
2
+ / .col-xs-12
3
+ / .box.box-warning class=(current_page?(new_page_path) ? 'expanded-box' : 'collapsed-box')
4
+ / .box-header.with-border
5
+ / h3.box-title Page Details
6
+ / .box-tools.pull-right
7
+ / button.btn.btn-box-tool[data-widget="collapse"]
8
+ / i.fa.fa-plus
9
+ / .box-body
10
+ / .row
11
+ / .col-xs-8
12
+ / = f.label :name
13
+ / = f.text_field :title, placeholder: 'Enter ...', disabled: (@page.title.eql?('Index') rescue false), class: 'form-control'
14
+ / .col-xs-4
15
+ / = f.label :parent
16
+ / = f.collection_select :parent, Hicube::Page.parents,:id,:title,{include_blank: '', selected: parent_id},{class: 'form-control', disabled: (@page.title.eql?('Index') rescue false)}
17
+ / br
18
+ / .form-group
19
+ / = f.label :seo_title
20
+ / = f.text_field :seo_title, class: 'form-control'
21
+ / .form-group
22
+ / = f.label :seo_keywords
23
+ / = f.text_field :seo_keywords, class: 'form-control'
24
+ / .form-group
25
+ / = f.label :seo_description
26
+ / = f.text_field :seo_description, class: 'form-control'
27
+
28
+ / - unless current_page?(new_page_path) or @page.content.empty?
29
+ / strong
30
+ / | Additional Tags
31
+ / br
32
+ / = f.fields_for :content, @page.content do |c|
33
+ / - if c.object.head
34
+ / .row
35
+ / = c.hidden_field :head, value: '1'
36
+ / .col-xs-3
37
+ / = c.text_field :name, class: 'form-control'
38
+ / .col-xs-8
39
+ / = c.text_field :body, class: 'form-control'
40
+ / .col-xs-1
41
+ / = c.check_box :_destroy, class: 'minimal'
42
+ / | Delete
43
+ / br
44
+ / button#add-tag.btn.btn-default[type="button"] Add Additional Tag
45
+ / #tag-form style="display: none;"
46
+ / = f.fields_for :content, Hicube::Content.new do |c|
47
+ / .row
48
+ / = c.hidden_field :head, value: '1'
49
+ / .col-xs-3
50
+ / = c.text_field :name, placeholder: 'Name', class: 'form-control'
51
+ / .col-xs-8
52
+ / = c.text_field :body, placeholder: 'Content', class: 'form-control'
53
+ / .col-xs-1
54
+ / = c.check_box :_destroy, class: 'minimal'
55
+ / | Delete
56
+
57
+ / - if current_page?(new_page_path)
58
+ / .form-group
59
+ / = f.label :body
60
+ / - if current_page?(new_page_path)
61
+ / = f.text_area :body, id: "textarea", value: "\n\n\n\n\n\n\n", class: 'form-control'
62
+ / - else
63
+ / = f.text_area :body, id: "textarea", class: 'form-control'
64
+ / - else
65
+ .row
66
+ .col-xs-12
67
+ .nav-tabs-custom
68
+ ul.nav.nav-tabs
69
+ li class=(@page.nil? || @page.new_record? ? 'active' : nil)
70
+ a[href="#details" data-toggle="tab"]
71
+ | Details
72
+ - unless @page.nil? || @page.new_record
73
+ li
74
+ a[href="#wysiwig" data-toggle="tab"]
75
+ | WYSIWIG
76
+ li class=(@page.nil? || @page.new_record ? '' : 'active')
77
+ a[href="#raw" data-toggle="tab"]
78
+ | Raw Content
79
+
80
+ .tab-content
81
+ - if @page.nil? || @page.new_record? || current_page?(new_page_path)
82
+ #raw.tab-pane
83
+ = f.text_area :body, id: "textarea", value: "Add content here", class: 'form-control .codeMirror'
84
+ - else
85
+ #raw.tab-pane.active
86
+ = f.text_area :body, id: "textarea", class: 'form-control .codeMirror'
87
+
88
+ / #raw.tab-pane class=( ? '' : 'active')
89
+ / = f.text_area :body, id: "textarea", value: "\n\n\n\n\n\n\n", class: 'form-control .codeMirror'
90
+ - unless current_page?(new_page_path)
91
+ #wysiwig.tab-pane
92
+ iframe src="/#{@page.slug}/edit" width="100%" height="100%" frameBorder=0 style="height: 100vh"
93
+ #details.tab-pane class=(@page.nil? || @page.new_record? || current_page?(new_page_path) ? 'active' : nil)
94
+ .row
95
+ .col-xs-3
96
+ = f.label :name
97
+ = f.text_field :title, placeholder: 'Enter ...', disabled: (@page.title.eql?('Index') rescue false), class: 'form-control'
98
+ .col-xs-3
99
+ = f.label :parent
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
+ .col-xs-2
102
+ = f.label :link_order
103
+ = f.select :order, 1..Hicube::Page.count, {}, {class: 'form-control'}
104
+ .col-xs-2
105
+ .checkbox.iCheck style="padding-top: 10px;"
106
+ label= f.check_box :header, class: 'minimal'
107
+ strong
108
+ | Appear in Header
109
+ .col-xs-2
110
+ .checkbox.iCheck style="padding-top: 10px;"
111
+ label= f.check_box :footer, class: 'minimal'
112
+ strong
113
+ | Appear in Footer
114
+
115
+ br
116
+ .form-group
117
+ = f.label :seo_title
118
+ = f.text_field :seo_title, class: 'form-control'
119
+ .form-group
120
+ = f.label :seo_keywords
121
+ = f.text_field :seo_keywords, class: 'form-control'
122
+ .form-group
123
+ = f.label :seo_description
124
+ = f.text_field :seo_description, class: 'form-control'
125
+
126
+ - unless current_page?(new_page_path) or @page.content.empty?
127
+ strong
128
+ | Additional Tags
129
+ br
130
+ = f.fields_for :content, @page.content do |c|
131
+ - if c.object.head
132
+ .row
133
+ = c.hidden_field :head, value: '1'
134
+ .col-xs-3
135
+ = c.text_field :name, class: 'form-control'
136
+ .col-xs-8
137
+ = c.text_field :body, class: 'form-control'
138
+ .col-xs-1
139
+ = c.check_box :_destroy, class: 'minimal'
140
+ | Delete
141
+ br
142
+ button#add-tag.btn.btn-default[type="button"] Add Additional Tag
143
+ #tag-form style="display: none;"
144
+ = f.fields_for :content, Hicube::Content.new do |c|
145
+ .row
146
+ = c.hidden_field :head, value: '1'
147
+ .col-xs-3
148
+ = c.text_field :name, placeholder: 'Name', class: 'form-control'
149
+ .col-xs-8
150
+ = c.text_field :body, placeholder: 'Content', class: 'form-control'
151
+ .col-xs-1
152
+ = c.check_box :_destroy, class: 'minimal'
153
+ | Delete