udongo 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/backend/flexible_content.js +33 -0
  3. data/app/assets/javascripts/backend/sortable.js +1 -1
  4. data/app/assets/stylesheets/backend/pages/_flexible_content.scss +61 -0
  5. data/app/controllers/backend/admins_controller.rb +7 -7
  6. data/app/controllers/backend/content/rows/columns_controller.rb +7 -15
  7. data/app/controllers/backend/content/rows/images_controller.rb +1 -1
  8. data/app/controllers/backend/content/rows/texts_controller.rb +1 -1
  9. data/app/controllers/backend/content/rows_controller.rb +4 -13
  10. data/app/controllers/backend/email_templates_controller.rb +4 -4
  11. data/app/controllers/backend/emails_controller.rb +3 -3
  12. data/app/controllers/backend/forms/base_controller.rb +14 -0
  13. data/app/controllers/backend/forms/submissions_controller.rb +8 -0
  14. data/app/controllers/backend/forms_controller.rb +7 -0
  15. data/app/controllers/backend/navigation/items_controller.rb +8 -5
  16. data/app/controllers/backend/navigations_controller.rb +1 -1
  17. data/app/controllers/backend/pages_controller.rb +5 -5
  18. data/app/controllers/backend/redirects_controller.rb +4 -4
  19. data/app/controllers/backend/sessions_controller.rb +1 -1
  20. data/app/controllers/backend/snippets_controller.rb +6 -5
  21. data/app/controllers/backend/tagbox_controller.rb +4 -4
  22. data/app/controllers/backend_controller.rb +3 -3
  23. data/app/controllers/catch_all_controller.rb +1 -1
  24. data/app/controllers/redirects_controller.rb +1 -1
  25. data/app/decorators/application_decorator.rb +5 -0
  26. data/app/decorators/content_image_decorator.rb +1 -1
  27. data/app/decorators/content_row_decorator.rb +9 -0
  28. data/app/decorators/content_text_decorator.rb +1 -1
  29. data/app/decorators/form_decorator.rb +16 -0
  30. data/app/decorators/form_submission_decorator.rb +3 -0
  31. data/app/decorators/navigation_item_decorator.rb +2 -2
  32. data/app/decorators/page_decorator.rb +2 -2
  33. data/app/decorators/pagination_decorator.rb +4 -0
  34. data/app/decorators/redirect_decorator.rb +1 -1
  35. data/app/decorators/snippet_decorator.rb +1 -1
  36. data/app/forms/backend/snippet_form.rb +4 -18
  37. data/app/helpers/backend/pagination_helper.rb +1 -11
  38. data/app/helpers/icon_helper.rb +1 -1
  39. data/app/helpers/snippet_helper.rb +1 -1
  40. data/app/models/concerns/storable/collection.rb +48 -26
  41. data/app/models/concerns/translatable.rb +1 -1
  42. data/app/models/content_row.rb +4 -0
  43. data/app/models/form.rb +1 -0
  44. data/app/models/store_with_file.rb +2 -0
  45. data/app/views/backend/content/_image.html.erb +1 -8
  46. data/app/views/backend/content/_rows.html.erb +52 -49
  47. data/app/views/backend/emails/index.html.erb +2 -10
  48. data/app/views/backend/forms/index.html.erb +27 -0
  49. data/app/views/backend/forms/submissions/_filter.html.erb +16 -0
  50. data/app/views/backend/forms/submissions/index.html.erb +34 -0
  51. data/app/views/backend/redirects/index.html.erb +2 -10
  52. data/app/views/layouts/backend/_top_navigation.html.erb +1 -0
  53. data/changelog.md +14 -1
  54. data/config/locales/en_backend.yml +5 -5
  55. data/config/locales/nl_backend.yml +10 -10
  56. data/config/routes.rb +6 -6
  57. data/db/migrate/20160711114156_add_description_to_forms.rb +5 -0
  58. data/lib/generators/udongo/form/form_generator.rb +1 -1
  59. data/lib/tasks/udongo_tasks.rake +1 -1
  60. data/lib/udongo/config.rb +2 -1
  61. data/lib/udongo/configs/forms.rb +14 -0
  62. data/lib/udongo/flexible_content/column_width_calculator.rb +32 -0
  63. data/lib/udongo/form.rb +36 -0
  64. data/lib/udongo/forms/config.rb +11 -0
  65. data/lib/udongo/forms/submission_datagrid.rb +29 -0
  66. data/lib/udongo/forms/submission_filter.rb +33 -0
  67. data/lib/udongo/notification.rb +19 -0
  68. data/lib/udongo/object_path.rb +0 -2
  69. data/lib/udongo/version.rb +1 -1
  70. data/lib/udongo/will_paginate/options.rb +40 -0
  71. data/lib/udongo/will_paginate/renderer.rb +8 -4
  72. data/lib/udongo.rb +4 -11
  73. data/readme.md +145 -49
  74. metadata +24 -2
@@ -1,8 +1,8 @@
1
- class PageDecorator < Draper::Decorator
1
+ class PageDecorator < ApplicationDecorator
2
2
  delegate_all
3
3
 
4
4
  def options_for_parents
5
- ::Page.flat_tree.map do |p|
5
+ Page.flat_tree.map do |p|
6
6
  ["#{'-' * p.depth} #{p.description}".strip, p.id]
7
7
  end
8
8
  end
@@ -0,0 +1,4 @@
1
+ class PaginationDecorator < Draper::CollectionDecorator
2
+ # support for will_paginate
3
+ delegate :current_page, :total_entries, :total_pages, :per_page, :offset
4
+ end
@@ -1,4 +1,4 @@
1
- class RedirectDecorator < Draper::Decorator
1
+ class RedirectDecorator < ApplicationDecorator
2
2
  delegate_all
3
3
 
4
4
  def status_code_collection
@@ -1,4 +1,4 @@
1
- class SnippetDecorator < Draper::Decorator
1
+ class SnippetDecorator < ApplicationDecorator
2
2
  def title
3
3
  string = object.title.to_s
4
4
  object.allow_html_in_title? ? string.html_safe : string
@@ -1,7 +1,4 @@
1
- class Backend::SnippetForm
2
- include ActiveModel::Model
3
- include Virtus.model
4
-
1
+ class Backend::SnippetForm < Udongo::Form
5
2
  attr_reader :snippet
6
3
 
7
4
  attribute :identifier, String
@@ -18,28 +15,17 @@ class Backend::SnippetForm
18
15
  end
19
16
 
20
17
  def self.model_name
21
- ::Snippet.model_name
18
+ Snippet.model_name
22
19
  end
23
20
 
24
21
  def persisted?
25
22
  !@snippet.new_record?
26
23
  end
27
24
 
28
- def save(params)
29
- attributes.keys.each { |k| send("#{k}=", params[k]) }
30
-
31
- if valid?
32
- save_snippet
33
- true
34
- else
35
- false
36
- end
37
- end
38
-
39
25
  private
40
26
 
41
27
  def unique_identifier
42
- qry = ::Snippet.unscoped
28
+ qry = Snippet.unscoped
43
29
  qry = qry.where.not(identifier: @snippet.identifier) if persisted?
44
30
 
45
31
  if qry.exists?(identifier: identifier)
@@ -47,7 +33,7 @@ class Backend::SnippetForm
47
33
  end
48
34
  end
49
35
 
50
- def save_snippet
36
+ def save_object
51
37
  attributes.each { |k, v| @snippet.send("#{k}=", v) }
52
38
  @snippet.save!
53
39
  end
@@ -1,17 +1,7 @@
1
1
  module Backend
2
2
  module PaginationHelper
3
-
4
3
  def udongo_paginate(collection, options = {})
5
- options.merge!(
6
- class: 'pagination',
7
- inner_window: 1,
8
- outer_window: 0,
9
- renderer: Udongo::WillPaginate::Renderer,
10
- previous_label: '&lt;'.html_safe,
11
- next_label: '&gt;'.html_safe
12
- )
13
-
14
- will_paginate collection, options
4
+ will_paginate(collection, Udongo::WillPaginate::Options.new(options).values)
15
5
  end
16
6
  end
17
7
  end
@@ -1,6 +1,6 @@
1
1
  module IconHelper
2
2
  def icon(name, label = nil)
3
- markup = content_tag :i, nil, class: "fa fa-#{name.to_s.gsub('_', '-')}"
3
+ markup = content_tag :i, nil, class: "fa fa-#{name.to_s.tr('_', '-')}"
4
4
  label ? "#{markup}&nbsp;#{label}".html_safe : markup
5
5
  end
6
6
  end
@@ -1,5 +1,5 @@
1
1
  module SnippetHelper
2
2
  def snippet(identifier)
3
- ::Snippet.find_in_cache(identifier).decorate
3
+ Snippet.find_in_cache(identifier).decorate
4
4
  end
5
5
  end
@@ -4,52 +4,74 @@ module Concerns
4
4
  def initialize(parent, category, config)
5
5
  @parent = parent
6
6
  @category = category
7
+ @config = config
7
8
 
8
- init_attributes(config)
9
- init_values(config)
9
+ init_attributes
10
+ init_values
11
+ end
12
+
13
+ def delete
14
+ stores.each { |s| s.destroy }
15
+ reset_values
10
16
  end
11
17
 
12
18
  def save
13
19
  attributes.each do |name,value|
14
- tmp = ::Store.find_or_initialize_by(
15
- collection: @category,
16
- storable_type: @parent.class.name,
17
- storable_id: @parent.id,
18
- name: name
19
- )
20
-
20
+ tmp = store(name)
21
21
  tmp.value = value
22
22
  tmp.save!
23
23
  end
24
24
  end
25
25
 
26
- def delete
27
- ::Store.where(
28
- storable_type: @parent.class,
29
- storable_id: @parent.id,
30
- collection: @category,
31
- ).each { |s| s.destroy }
26
+ def store(name, file: false)
27
+ stores(file: file).find_or_initialize_by(name: name)
28
+ end
32
29
 
33
- reset_values
30
+ # You'll find that mounting an uploader on Store will prevent
31
+ # the saving of other attributes.
32
+ def stores(file: false)
33
+ klass = file ? StoreWithFile : Store
34
+ klass.where(storable: @parent, collection: @category)
35
+ end
36
+
37
+ def define_reader_method_for_uploader_field(field, options)
38
+ self.class.send(:define_method, field) do
39
+ StoreWithFile.mount_uploader :value, options[:type]
40
+ store(field, file: true).value
41
+ end
42
+ end
43
+
44
+ def define_writer_method_for_uploader_field(field, options)
45
+ self.class.send(:define_method, "#{field}=") do |value|
46
+ # Right now, when we save a form with a filefield, you will
47
+ # notice in the database that the store value keeps updating
48
+ # with a new filename hash. It always "reuploads" the file.
49
+ s = store(field, file: true)
50
+ s.value = value
51
+ s.save
52
+ end
34
53
  end
35
54
 
36
55
  private
37
56
 
38
- def init_attributes(config)
57
+ def init_attributes
39
58
  extend(Virtus.model)
40
59
 
41
- config.fields.each do |field,options|
42
- attribute field, options[:type], default: options[:default], lazy: true
60
+ @config.fields.each do |field,options|
61
+ if options[:type].to_s.include?('Uploader')
62
+ define_reader_method_for_uploader_field(field, options)
63
+ define_writer_method_for_uploader_field(field, options)
64
+ else
65
+ attribute field, options[:type], default: options[:default], lazy: true
66
+ end
43
67
  end
44
68
  end
45
69
 
46
- def init_values(config)
47
- ::Store.where(
48
- storable_type: @parent.class,
49
- storable_id: @parent.id,
50
- collection: @category,
51
- ).pluck(:name, :value).each do |field, value|
52
- send "#{field}=", value if config.allowed?(field)
70
+ def init_values
71
+ stores.pluck(:name, :value).each do |field, value|
72
+ next unless @config.allowed?(field)
73
+ next if @config.fields[field.to_sym][:type].to_s.include?('Uploader')
74
+ send "#{field}=", value
53
75
  end
54
76
  end
55
77
 
@@ -9,7 +9,7 @@ module Concerns
9
9
  serialize :locales, Array
10
10
 
11
11
  after_save do
12
- locales = ::Store.where(
12
+ locales = Store.where(
13
13
  storable_type: self.class,
14
14
  storable_id: self.id,
15
15
  name: self.class.translatable_fields_list
@@ -8,4 +8,8 @@ class ContentRow < ActiveRecord::Base
8
8
  has_many :columns, class_name: 'ContentColumn', foreign_key: :row_id, dependent: :destroy
9
9
 
10
10
  validates :locale, presence: true
11
+
12
+ def column_width_calculator
13
+ @column_width_calculator ||= Udongo::FlexibleContent::ColumnWidthCalculator.new(self)
14
+ end
11
15
  end
data/app/models/form.rb CHANGED
@@ -4,6 +4,7 @@ class Form < ActiveRecord::Base
4
4
 
5
5
  has_many :fields, class_name: 'FormField', dependent: :destroy
6
6
  has_many :submissions, class_name: 'FormSubmission', dependent: :destroy
7
+ has_many :data, through: :submissions
7
8
 
8
9
  validates :identifier, presence: true
9
10
  end
@@ -0,0 +1,2 @@
1
+ class StoreWithFile < Store
2
+ end
@@ -1,13 +1,6 @@
1
1
  <% if object.present? && object.file.present? %>
2
2
 
3
- <% if object.url.present? %>
4
- <%= link_to object.url do %>
5
- <%= image_tag object.file.size_1024x640.url, alt: '', class: 'img-fluid' %>
6
- <% end %>
7
-
8
- <% else %>
9
- <%= image_tag object.file.size_1024x640.url, alt: '', class: 'img-fluid' %>
10
- <% end %>
3
+ <%= image_tag object.file.size_1024x640.url, alt: '', class: 'img-fluid' %>
11
4
 
12
5
  <% if object.caption.present? %>
13
6
  <div class="text-center">
@@ -1,63 +1,66 @@
1
+ <% javascript 'backend/sortable' %>
2
+ <% javascript 'backend/flexible_content' %>
3
+
1
4
  <div id="content-rows">
2
- <% rows = model.content_rows.where(locale: locale) %>
5
+ <div class="cards">
6
+ <% rows = model.content_rows.where(locale: locale) %>
3
7
 
4
- <% if rows.empty? %>
5
- <div class="card">
6
- <div class="card-header">
7
- <%= t 'b.flexible_content' %>
8
- </div>
8
+ <% if rows.empty? %>
9
+ <div class="card">
10
+ <div class="card-header">
11
+ <%= t 'b.flexible_content' %>
12
+ </div>
9
13
 
10
- <div class="card-block">
11
- <%= t 'b.msg.flexible_content.explanation' %>
14
+ <div class="card-block">
15
+ <%= t 'b.msg.flexible_content.explanation' %>
16
+ </div>
12
17
  </div>
13
- </div>
14
- <% end %>
15
-
16
- <% rows.each do |row| %>
17
- <div class="card" id="content-row-<%= row.id %>">
18
- <div class="card-header">
19
- <div class="btn-group" role="group">
20
- <% unless row.first? %>
21
- <%= link_to icon(:arrow_up, t('b.up')), move_up_backend_content_row_path(row), class: 'btn btn-info-outline' %>
22
- <% end %>
18
+ <% end %>
23
19
 
24
- <% unless row.last? %>
25
- <%= link_to icon(:arrow_down, t('b.down')), move_down_backend_content_row_path(row), class: 'btn btn-info-outline' %>
26
- <% end %>
27
-
28
- <%= link_to icon(:plus, t('b.msg.flexible_content.add_column')), new_backend_content_row_column_path(row), class: 'btn btn-info-outline' %>
29
- <%= link_to icon(:trash, t('b.msg.flexible_content.delete_row')), backend_content_row_path(row), class: 'btn btn-info-outline', method: :delete, data: { confirm: t('b.msg.confirm') } %>
20
+ <% rows.decorate.each do |row| %>
21
+ <div id="content-row-<%= row.id %>" class="card content-row" data-update-position="<%= update_position_backend_content_row_path(row) %>">
22
+ <div class="card-header handle">
23
+ <div class="btn-group" role="group">
24
+ <%= link_to icon(:trash, t('b.msg.flexible_content.delete_row')), backend_content_row_path(row), class: 'btn btn-secondary', method: :delete, data: { confirm: t('b.msg.confirm') } %>
25
+ </div>
30
26
  </div>
31
- </div>
32
27
 
33
- <div class="row card-block">
34
- <% row.columns.each do |column| %>
35
- <div class="col-xs-<%= column.width_xs %> col-sm-<%= column.width_sm %> col-md-<%= column.width_md %> col-lg-<%= column.width_lg %> col-xl-<%= column.width_xl %>">
28
+ <div class="row content-columns card-block">
29
+ <% row.columns.each do |column| %>
36
30
  <% content = column.content.decorate %>
37
31
 
38
- <% Udongo.config.flexible_content_types.each do |content_type| %>
39
- <%= render("backend/content/#{content_type}", object: content) if content.content_type_is?(content_type) %>
40
- <% end %>
41
-
42
- <div class="btn-group" role="group">
43
- <% unless column.first? %>
44
- <%= link_to icon(:arrow_left), move_up_backend_content_row_column_path(row, column), class: 'btn btn-secondary btn-sm' %>
45
- <% end %>
46
-
47
- <% edit_link = send("edit_backend_content_#{content.content_type}_path", content) %>
48
- <%= link_to icon(:pencil_square_o), edit_link, class: 'btn btn-secondary btn-sm' %>
49
- <%= link_to icon(:trash), backend_content_row_column_path(row, column), class: 'btn btn-secondary btn-sm', method: :delete, data: { confirm: t('b.msg.confirm') } %>
50
- <%= link_to icon(:wrench), edit_backend_content_row_column_path(row, column), class: 'btn btn-secondary btn-sm' %>
32
+ <div class="content-column col-xs-<%= column.width_xs %> col-sm-<%= column.width_sm %> col-md-<%= column.width_md %> col-lg-<%= column.width_lg %> col-xl-<%= column.width_xl %>" data-update-position="<%= update_position_backend_content_row_column_path(row, column) %>">
33
+ <div class="card handle">
34
+ <div class="card-block">
35
+ <% Udongo.config.flexible_content_types.each do |content_type| %>
36
+ <%= render("backend/content/#{content_type}", object: content) if content.content_type_is?(content_type) %>
37
+ <% end %>
38
+ </div>
51
39
 
52
- <% unless column.last? %>
53
- <%= link_to icon(:arrow_right), move_down_backend_content_row_column_path(row, column), class: 'btn btn-secondary btn-sm' %>
54
- <% end %>
40
+ <div class="card-footer">
41
+ <div class="btn-group" role="group">
42
+ <% edit_link = send("edit_backend_content_#{content.content_type}_path", content) %>
43
+ <%= link_to icon(:pencil_square_o), edit_link, class: 'btn btn-secondary btn-sm' %>
44
+ <%= link_to icon(:trash), backend_content_row_column_path(row, column), class: 'btn btn-secondary btn-sm', method: :delete, data: { confirm: t('b.msg.confirm') } %>
45
+ <%= link_to icon(:wrench), edit_backend_content_row_column_path(row, column), class: 'btn btn-secondary btn-sm' %>
46
+ </div>
47
+ </div>
48
+ </div>
55
49
  </div>
56
- </div>
57
- <% end %>
50
+ <% end %>
51
+
52
+ <% unless row.column_limit_reached? %>
53
+ <% if row.columns.blank? %>
54
+ <%= link_to icon(:plus, t('b.msg.flexible_content.add_column')), new_backend_content_row_column_path(row), class: 'btn btn-secondary btn-block' %>
55
+ <% else %>
56
+ <%= link_to icon(:plus, t('b.msg.flexible_content.add_column')), new_backend_content_row_column_path(row), class: 'btn btn-secondary hidden-xl-up full-width' %>
57
+ <%= link_to icon(:plus), new_backend_content_row_column_path(row), class: 'btn btn-secondary hidden-lg-down block' %>
58
+ <% end %>
59
+ <% end %>
60
+ </div>
58
61
  </div>
59
- </div>
60
- <% end %>
62
+ <% end %>
63
+ </div>
61
64
 
62
- <%= link_to icon(:plus, t('b.msg.flexible_content.add_row')), new_backend_content_row_path(klass: @model.class, id: @model.id, locale: locale), class: 'btn btn-info btn-sm' %>
65
+ <%= link_to icon(:plus, t('b.msg.flexible_content.add_row')), new_backend_content_row_path(klass: @model.class, id: @model.id, locale: locale), class: 'btn btn-secondary btn-block' %>
63
66
  </div>
@@ -33,18 +33,10 @@
33
33
  </tr>
34
34
  <% end %>
35
35
  </tbody>
36
-
37
- <% if will_paginate %>
38
- <tfoot>
39
- <tr>
40
- <td colspan="6">
41
- <%= will_paginate %>
42
- </td>
43
- </tr>
44
- </tfoot>
45
- <% end %>
46
36
  </table>
47
37
 
38
+ <%= udongo_paginate @emails %>
39
+
48
40
  <% else %>
49
41
  <p><%= t 'b.msg.no_items' %></p>
50
42
  <% end %>
@@ -0,0 +1,27 @@
1
+ <%= render 'backend/breadcrumbs' %>
2
+
3
+ <% if @forms.any? %>
4
+ <table class="table table-striped table-hover">
5
+ <thead class="thead-inverse">
6
+ <tr>
7
+ <th><%= t 'b.description' %></th>
8
+ <th>&nbsp;</th>
9
+ </tr>
10
+ </thead>
11
+
12
+ <tbody>
13
+ <% @forms.each do |f| %>
14
+ <tr>
15
+ <td><%= f.description %></td>
16
+ <td class="text-xs-right">
17
+ <%= link_to_edit [:backend, f] %>
18
+ <%= link_to icon(:list), backend_form_submissions_path(f) %>
19
+ </td>
20
+ </tr>
21
+ <% end %>
22
+ </tbody>
23
+ </table>
24
+
25
+ <% else %>
26
+ <p><%= t 'b.msg.no_items' %></p>
27
+ <% end %>
@@ -0,0 +1,16 @@
1
+ <% if @filter.fields.any? %>
2
+ <div class="filter">
3
+ <%= form_for :filter, url: backend_form_submissions_path, method: 'get', html: { class: 'form-inline' } do |f| %>
4
+ <div class="card">
5
+ <div class="card-block">
6
+ <% @filter.fields.each do |field| %>
7
+ <div class="form-group">
8
+ <%= text_field_tag "q[#{field.to_sym}]", @filter.params[field.to_sym], placeholder: t("b.#{field}"), class: 'form-control' %>
9
+ </div>
10
+ <% end %>
11
+ <%= button_tag t('b.filter'), class: 'btn btn-primary' %>
12
+ </div>
13
+ </div>
14
+ <% end %>
15
+ </div>
16
+ <% end %>
@@ -0,0 +1,34 @@
1
+ <%= render 'backend/breadcrumbs' %>
2
+ <%= render 'filter' %>
3
+
4
+ <% if @submissions.any? %>
5
+ <table class="table table-striped table-hover">
6
+ <thead class="thead-inverse">
7
+ <tr>
8
+ <% if @form.email_present? %>
9
+ <th><%= t('b.email') %></th>
10
+ <% end %>
11
+ <%= @form.datagrid.column_headers(@filter) %>
12
+ <th>&nbsp;</th>
13
+ </tr>
14
+ </thead>
15
+
16
+ <tbody>
17
+ <% @submissions.each do |s| %>
18
+ <tr>
19
+ <% if @form.email_present? %>
20
+ <td><%= mail_to s.data_object.email %></td>
21
+ <% end %>
22
+ <%= @form.datagrid.column_values(s) %>
23
+ <td class="text-xs-right">
24
+ <%= link_to icon(:pencil_square_o), edit_backend_form_submission_path(@form, s) %>
25
+ </td>
26
+ </tr>
27
+ <% end %>
28
+ </tbody>
29
+ </table>
30
+
31
+ <%= udongo_paginate @submissions %>
32
+ <% else %>
33
+ <p><%= t 'b.msg.no_items' %></p>
34
+ <% end %>
@@ -34,17 +34,9 @@
34
34
  </tr>
35
35
  <% end %>
36
36
  </tbody>
37
-
38
- <% if will_paginate %>
39
- <tfoot>
40
- <tr>
41
- <td colspan="6">
42
- <%= will_paginate %>
43
- </td>
44
- </tr>
45
- </tfoot>
46
- <% end %>
47
37
  </table>
38
+
39
+ <%= udongo_paginate @redirects %>
48
40
  <% else %>
49
41
  <p><%= t 'b.msg.no_items' %></p>
50
42
  <% end %>
@@ -3,6 +3,7 @@
3
3
  <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false"><%= icon(:list, t('b.content')) %></a>
4
4
  <div class="dropdown-menu">
5
5
  <%= link_to t('b.pages'), backend_pages_path, class: 'dropdown-item' %>
6
+ <%= link_to t('b.forms'), backend_forms_path, class: 'dropdown-item' %>
6
7
  <%= link_to t('b.snippets'), backend_snippets_path, class: 'dropdown-item' %>
7
8
  </div>
8
9
  </li>
data/changelog.md CHANGED
@@ -1,3 +1,17 @@
1
+ 1.0.4 - 2016-07-23
2
+ --
3
+ * Add spec for the SnippetForm class.
4
+ * Add Udongo::Notification and use it in BackendController#translate_notice.
5
+ * Fix issue with storable config fields that are present in the DB, but are no
6
+ longer in the storable class.
7
+ * Flexible image preview no longer makes the URL previewable.
8
+ * Classes in lib/udongo/**/* are now loaded automatically.
9
+ * Restyled flexible content widget.
10
+ * You now get a suggested width when adding a new content column in the
11
+ flexible content widget. Values are based on previously set column widths.
12
+ * The codebase had a lot of useless double semicolons, which have been removed.
13
+
14
+
1
15
  1.0.3 - 2016-06-06
2
16
  --
3
17
  * Bugfix: fix link to non existing css file.
@@ -47,7 +61,6 @@
47
61
  * Fix nasty bug in the storable concern which made it impossible to work with
48
62
  the << operator for strings and arrays.
49
63
  * Bugfix: the link helpers can now also work with decorated objects.
50
- * Upgrade to rails 4.2.6
51
64
 
52
65
 
53
66
  0.0.13 - 2016-05-02
@@ -2,6 +2,7 @@ en:
2
2
  b:
3
3
  actions: Actions
4
4
  add: Add
5
+ admin: Admin
5
6
  admins: Admins
6
7
  advanced: Advanced
7
8
  cancel: Cancel
@@ -20,11 +21,13 @@ en:
20
21
  email_templates: E-mail templates
21
22
  enabled?: Enabled?
22
23
  extra: Extra
24
+ filter: Filter
23
25
  first_name: First name
24
26
  flexible_content: Flexible content
25
27
  forms: Forms
26
28
  from: From
27
29
  general: General
30
+ house_number: House number
28
31
  html_content: HTML content
29
32
  last_name: Last name
30
33
  locale: Locale
@@ -33,6 +36,7 @@ en:
33
36
  move: Move
34
37
  name: Name
35
38
  navigation: Navigation
39
+ navigation_item: Navigation item
36
40
  new: New
37
41
  none: None
38
42
  not_yet_sent: Not yet sent
@@ -56,6 +60,7 @@ en:
56
60
  status_code: Status code
57
61
  subject: Subject
58
62
  tags: Tags
63
+ telephone: Telephone
59
64
  title: Title
60
65
  to: To
61
66
  up: Up
@@ -67,8 +72,6 @@ en:
67
72
  added: '%s was added.'
68
73
  admins:
69
74
  account_details: Account details
70
- added: The admin was added.
71
- deleted: The admin was deleted.
72
75
  personal_details: Personal details
73
76
  changes_saved: The changes have been saved.
74
77
  confirm: Are you sure?
@@ -91,11 +94,8 @@ en:
91
94
  status_code: More info about the use of status codes.
92
95
  incorrect_login: Incorret login credentials.
93
96
  navigation:
94
- added: The navigation item was added.
95
97
  custom: Custom
96
- deleted: The navigation item was deleted.
97
98
  no_items: There are no items.
98
-
99
99
  saved: '%s was saved.'
100
100
  seo: SEO
101
101
  status_codes: