bhf 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
  - unless flash.blank?
2
2
  %ul#flash_massages
3
- - flash.each_pair do |key, value|
4
- %li{:class => key}= value
3
+ - flash.each do |type, msg|
4
+ %li{:class => type}= msg
@@ -1,37 +1,37 @@
1
- - @platform.pagination.template = self
2
- %table{:id => "#{@platform.name}_platform", :class => (@platform.custom_columns? ? 'custom_columns' : 'default_columns')}
1
+ - platform.pagination.template = self
2
+ %table{:id => "#{platform.name}_platform", :class => (platform.custom_columns? ? 'custom_columns' : 'default_columns')}
3
3
  %caption
4
- %h4= @platform.title
5
- %p.info= @platform.pagination.info @platform
6
- %p.create= link_to new_t(@platform), new_bhf_entry_path(@platform.name), :class => 'alt_button'
7
- = render :partial => 'search', :locals => {:platform => @platform} if @platform.search?
4
+ %h4= platform.title
5
+ %p.info= platform.pagination.info platform
6
+ %p.create= link_to new_t(platform), new_bhf_entry_path(platform.name), :class => 'alt_button'
7
+ = render :partial => 'search', :locals => {:platform => platform} if platform.search?
8
8
 
9
9
  %thead
10
10
  %tr
11
- - if @platform.sortable
11
+ - if platform.sortable
12
12
  %th.drag
13
- - @platform.columns.each do |column|
14
- %th{:class => "#{column.field.macro} #{column.field.display_type} #{order_class(column.name, @platform.name)}"}
15
- - column_name = @platform.model.human_attribute_name(column.name)
16
- - link = link_to column_name, current_order_path(column.name, @platform.name)
13
+ - platform.columns.each do |column|
14
+ %th{:class => "#{column.field.macro} #{column.field.display_type} #{order_class(column.name, platform.name)}"}
15
+ - column_name = platform.model.human_attribute_name(column.name)
16
+ - link = link_to column_name, current_order_path(column.name, platform.name)
17
17
  = column.field.macro == :column ? link : column_name
18
18
 
19
19
  %th.action
20
20
 
21
21
  %tfoot
22
22
  %tr
23
- %td{:colspan => @platform.columns_count}
24
- = @platform.pagination.create(@platform) unless @platform.sortable
23
+ %td{:colspan => platform.columns_count}
24
+ = platform.pagination.create(platform) unless platform.sortable
25
25
 
26
- %tbody{:class => ('sortable' if @platform.sortable), :'data-sort-url' => sort_bhf_entries_path(@platform.name)}
27
- - if @platform.objects.any?
28
- - @platform.objects.each do |object|
29
- - edit_link = edit_bhf_entry_path(@platform.name, object)
30
- %tr{:id => "#{object.id}_#{@platform.name}"}
31
- - if @platform.sortable
26
+ %tbody{:class => ('sortable' if platform.sortable), :'data-sort-url' => sort_bhf_entries_path(platform.name)}
27
+ - if platform.objects.any?
28
+ - platform.objects.each do |object|
29
+ - edit_link = edit_bhf_entry_path(platform.name, object)
30
+ %tr{:id => "#{object.id}_#{platform.name}"}
31
+ - if platform.sortable
32
32
  %td
33
33
  %span.handle  
34
- - @platform.columns.each do |column|
34
+ - platform.columns.each do |column|
35
35
  %td{:class => "#{column.field.macro} #{column.field.display_type}", :'data-column-name' => column.name}
36
36
  - a = if column.field.display_type != :boolean && object.send(column.name).blank?
37
37
  - ' '
@@ -40,10 +40,10 @@
40
40
 
41
41
  = has_link?(column.field.overwrite_display_type) ? a.html_safe : link_to(a.html_safe, edit_link, :class => 'quick_edit')
42
42
  %td.action
43
- = link_to edit_t(@platform), edit_link, :class => 'edit'
44
- = link_to delete_t(@platform), bhf_entry_path(@platform.name, object), :method => :delete, :confirm => t('bhf.helpers.promts.confirm'), :class => 'delete'
43
+ = link_to edit_t(platform), edit_link, :class => 'edit'
44
+ = link_to delete_t(platform), bhf_entry_path(platform.name, object), :method => :delete, :confirm => t('bhf.helpers.promts.confirm'), :class => 'delete'
45
45
  -# TODO: :remote => true, authlogic problem?
46
46
  - else
47
- %td.no_entries{:colspan => @platform.columns_count}
47
+ %td.no_entries{:colspan => platform.columns_count}
48
48
  = t 'bhf.pagination.info.nothing_found', :name => t('bhf.pagination.entries')
49
- = link_to new_t(@platform), new_bhf_entry_path(@platform.name)
49
+ = link_to new_t(platform), new_bhf_entry_path(platform.name)
@@ -1,3 +1,3 @@
1
1
  -# %h2= t('bhf.pages.headline')
2
- - @platforms.each do |@platform|
3
- .platform= render 'platform'
2
+ - @platforms.each do |platform|
3
+ .platform= render partial: 'platform', locals: {platform: platform}
@@ -5,12 +5,13 @@
5
5
  %title= @title
6
6
  = csrf_meta_tag
7
7
  %link{:href => '/favicon.ico', :rel => 'icon', :type => 'image/x-icon'}
8
- = stylesheet_link_tag(['bhf'] + Bhf::Engine.config.css.to_a)
9
- = javascript_include_tag 'bhf'
8
+ - ([:bhf] + Bhf::Engine.config.css.to_a).each do |css|
9
+ = stylesheet_link_tag "/stylesheets/#{css}"
10
+ = javascript_include_tag "/javascripts/bhf"
10
11
  =# javascript_include_tag 'bhf/mootools-core-1.3.2-full-compat-yc.js', 'bhf/mootools-more-1.3.2.1.js', 'bhf/mootools_rails_driver-0.4.1.js', 'bhf/class/BrowserUpdate', 'bhf/class/Ajaxify', 'bhf/class/AjaxEdit', 'bhf/class/MooEditable', 'bhf/class/Datepicker', 'bhf/class/MultipleFields', 'bhf/bhf_application'
11
12
  %body
12
13
  %header
13
- %h1= link_to image_tag('logo_bhf.png'), root_url
14
+ %h1= link_to image_tag('/images/logo_bhf.png'), root_url
14
15
  - if @config && @config.pages.any?
15
16
  %nav
16
17
  %ul
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bhf
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 0
10
- version: 0.3.0
9
+ - 1
10
+ version: 0.3.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Anton Pawlik
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-09 00:00:00 +02:00
18
+ date: 2011-07-18 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency