summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-02-14 10:42:39 +0100
committerspag <spag@golwen.net>2013-02-14 10:42:39 +0100
commit41303b0a2a07b897f7373eebba25708da89085a1 (patch)
tree88e48da31bdd92d80af76c18d0df992f7d09f91b
parenta1aafe9eec98f91fd76d104964ad98fcafc94a80 (diff)
parenta9bf3a7e1fd802025824668e477a5ec14ce81d5a (diff)
Merge branch 'develop' of github.com:amooma/GS5 into develop
-rw-r--r--Gemfile12
-rw-r--r--Gemfile.lock73
-rw-r--r--app/assets/stylesheets/gemeinschaft-generic.css.scss21
-rw-r--r--app/models/fax_document.rb32
-rw-r--r--app/uploaders/thumbnail_uploader.rb18
-rw-r--r--app/views/access_authorizations/_form.html.haml4
-rw-r--r--app/views/acd_agents/_form.html.haml4
-rw-r--r--app/views/addresses/_form.html.haml4
-rw-r--r--app/views/automatic_call_distributors/_form.html.haml4
-rw-r--r--app/views/backup_jobs/_form.html.haml4
-rw-r--r--app/views/call_forwards/_form.html.haml4
-rw-r--r--app/views/call_routes/_form.html.haml4
-rw-r--r--app/views/callthroughs/_form.html.haml2
-rw-r--r--app/views/conference_invitees/_form.html.haml4
-rw-r--r--app/views/conferences/_form.html.haml4
-rw-r--r--app/views/fax_accounts/_form.html.haml4
-rw-r--r--app/views/fax_documents/_form.html.haml4
-rw-r--r--app/views/fax_documents/_index_core.html.haml51
-rw-r--r--app/views/fax_documents/show.html.haml91
-rw-r--r--app/views/gateway_parameters/_form.html.haml4
-rw-r--r--app/views/gateway_settings/_form.html.haml2
-rw-r--r--app/views/gateways/_form.html.haml4
-rw-r--r--app/views/gemeinschaft_setups/new.de.html.haml4
-rw-r--r--app/views/gemeinschaft_setups/new.html.haml4
-rw-r--r--app/views/gs_cluster_sync_log_entries/_form.html.haml4
-rw-r--r--app/views/gs_nodes/_form.html.haml4
-rw-r--r--app/views/gs_parameters/_form.html.haml4
-rw-r--r--app/views/gui_functions/_form.html.haml4
-rw-r--r--app/views/hunt_group_members/_form.html.haml4
-rw-r--r--app/views/hunt_groups/_form.html.haml4
-rw-r--r--app/views/intruders/_form.html.haml4
-rw-r--r--app/views/layouts/_navbar.html.haml12
-rw-r--r--app/views/manufacturers/_form.html.haml4
-rw-r--r--app/views/parking_stalls/_form.html.haml4
-rw-r--r--app/views/phone_book_entries/_form.html.haml4
-rw-r--r--app/views/phone_books/_form.html.haml4
-rw-r--r--app/views/phone_models/_form.html.haml4
-rw-r--r--app/views/phone_number_ranges/_form.html.haml4
-rw-r--r--app/views/phone_numbers/_form.html.haml2
-rw-r--r--app/views/phone_sip_accounts/_form.html.haml4
-rw-r--r--app/views/phones/_form.html.haml4
-rw-r--r--app/views/ringtones/_form.html.haml4
-rw-r--r--app/views/route_elements/_form.html.haml4
-rw-r--r--app/views/sessions/new.html.haml2
-rw-r--r--app/views/sip_accounts/_form.html.haml4
-rw-r--r--app/views/sip_domains/_form.html.haml4
-rw-r--r--app/views/softkeys/_form.html.haml4
-rw-r--r--app/views/tenants/_form.html.haml4
-rw-r--r--app/views/tenants/_index_core.html.haml4
-rw-r--r--app/views/user_group_memberships/_form.html.haml4
-rw-r--r--app/views/user_groups/_form.html.haml4
-rw-r--r--app/views/users/_form.html.haml4
-rw-r--r--app/views/voicemail_messages/_index_core.html.haml6
-rw-r--r--app/views/voicemail_settings/_form.html.haml4
-rw-r--r--app/views/whitelists/_form.html.haml4
-rw-r--r--config/initializers/simple_form.rb20
-rw-r--r--db/schema.rb13
-rw-r--r--lib/generators/nifty/authentication/templates/views/haml/_form.html.haml2
-rw-r--r--lib/generators/nifty/authentication/templates/views/haml/login.html.haml4
-rw-r--r--lib/generators/nifty/scaffold/templates/views/haml/_form.html.haml4
60 files changed, 326 insertions, 209 deletions
diff --git a/Gemfile b/Gemfile
index b390a28..e4e839f 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,6 +1,11 @@
+if RUBY_VERSION =~ /1.9/
+ Encoding.default_external = Encoding::UTF_8
+ Encoding.default_internal = Encoding::UTF_8
+end
+
source 'http://rubygems.org'
-gem 'rails', '3.2.11'
+gem 'rails', '3.2.12'
gem 'bcrypt-ruby'
gem 'sqlite3'
gem 'mysql2'
@@ -48,8 +53,9 @@ group :test do
gem 'factory_girl_rails'
end
-gem "haml"
-gem "simple_form", '2.0.1'
+gem 'haml'
+# gem 'simple_form', '~> 2.0.1'
+gem 'simple_form', github: 'plataformatec/simple_form', branch: 'v2.1'
# Image Upload
gem 'carrierwave'
diff --git a/Gemfile.lock b/Gemfile.lock
index 8491109..d8531cd 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,31 +1,40 @@
+GIT
+ remote: git://github.com/plataformatec/simple_form.git
+ revision: e3da7301dcf6feb9a1db275ff5cb3f85afce0e80
+ branch: v2.1
+ specs:
+ simple_form (2.1.0.dev)
+ actionpack (~> 3.0)
+ activemodel (~> 3.0)
+
GEM
remote: http://rubygems.org/
specs:
- actionmailer (3.2.11)
- actionpack (= 3.2.11)
+ actionmailer (3.2.12)
+ actionpack (= 3.2.12)
mail (~> 2.4.4)
- actionpack (3.2.11)
- activemodel (= 3.2.11)
- activesupport (= 3.2.11)
+ actionpack (3.2.12)
+ activemodel (= 3.2.12)
+ activesupport (= 3.2.12)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
- rack (~> 1.4.0)
+ rack (~> 1.4.5)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
- activemodel (3.2.11)
- activesupport (= 3.2.11)
+ activemodel (3.2.12)
+ activesupport (= 3.2.12)
builder (~> 3.0.0)
- activerecord (3.2.11)
- activemodel (= 3.2.11)
- activesupport (= 3.2.11)
+ activerecord (3.2.12)
+ activemodel (= 3.2.12)
+ activesupport (= 3.2.12)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
- activeresource (3.2.11)
- activemodel (= 3.2.11)
- activesupport (= 3.2.11)
- activesupport (3.2.11)
+ activeresource (3.2.12)
+ activemodel (= 3.2.12)
+ activesupport (= 3.2.12)
+ activesupport (3.2.12)
i18n (~> 0.6)
multi_json (~> 1.0)
acts_as_list (0.1.9)
@@ -66,7 +75,7 @@ GEM
dalli (2.6.2)
delayed_job (3.0.5)
activesupport (~> 3.0)
- delayed_job_active_record (0.4.0)
+ delayed_job_active_record (0.4.1)
activerecord (>= 2.1.0, < 4)
delayed_job (~> 3.0)
erubis (2.7.0)
@@ -79,7 +88,8 @@ GEM
factory_girl (~> 4.2.0)
railties (>= 3.0.0)
fssm (0.2.10)
- haml (3.1.7)
+ haml (4.0.0)
+ tilt
hike (1.2.1)
hirb (0.7.1)
http_accept_language (1.0.2)
@@ -100,7 +110,7 @@ GEM
mime-types (1.21)
mini_magick (3.4)
subexec (~> 0.2.1)
- multi_json (1.5.1)
+ multi_json (1.6.0)
mysql2 (0.3.11)
nokogiri (1.5.6)
open4 (1.3.0)
@@ -114,17 +124,17 @@ GEM
rack
rack-test (0.6.2)
rack (>= 1.0)
- rails (3.2.11)
- actionmailer (= 3.2.11)
- actionpack (= 3.2.11)
- activerecord (= 3.2.11)
- activeresource (= 3.2.11)
- activesupport (= 3.2.11)
+ rails (3.2.12)
+ actionmailer (= 3.2.12)
+ actionpack (= 3.2.12)
+ activerecord (= 3.2.12)
+ activeresource (= 3.2.12)
+ activesupport (= 3.2.12)
bundler (~> 1.0)
- railties (= 3.2.11)
- railties (3.2.11)
- actionpack (= 3.2.11)
- activesupport (= 3.2.11)
+ railties (= 3.2.12)
+ railties (3.2.12)
+ actionpack (= 3.2.12)
+ activesupport (= 3.2.12)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
@@ -141,9 +151,6 @@ GEM
sextant (0.2.3)
activesupport (>= 3.2)
rails (>= 3.2)
- simple_form (2.0.1)
- actionpack (~> 3.0)
- activemodel (~> 3.0)
sprockets (2.2.2)
hike (~> 1.2)
multi_json (~> 1.0)
@@ -211,10 +218,10 @@ DEPENDENCIES
mysql2
nokogiri
quiet_assets
- rails (= 3.2.11)
+ rails (= 3.2.12)
sass-rails
sextant
- simple_form (= 2.0.1)
+ simple_form!
sqlite3
state_machine
strong_parameters
diff --git a/app/assets/stylesheets/gemeinschaft-generic.css.scss b/app/assets/stylesheets/gemeinschaft-generic.css.scss
index e594d67..fbeaa1f 100644
--- a/app/assets/stylesheets/gemeinschaft-generic.css.scss
+++ b/app/assets/stylesheets/gemeinschaft-generic.css.scss
@@ -6,6 +6,27 @@ body {
padding-top: 60px;
padding-bottom: 40px;
}
+
+// Nav
+li.display {
+ line-height: 40px;
+ img {
+ vertical-align: middle;
+ width: 26px;
+ margin-top: -2px;
+ }
+}
+
+// SimpleForm Inline Checkbox Fix
+.simple-checkbox .checkbox {
+ text-align: left;
+ width: auto;
+ float: none;
+}
+input, textarea, .uneditable-input {
+ width: 500px;
+}
+
@media (max-width: 979px) {
body {
padding-top: 0px;
diff --git a/app/models/fax_document.rb b/app/models/fax_document.rb
index 16fdc70..564d3bb 100644
--- a/app/models/fax_document.rb
+++ b/app/models/fax_document.rb
@@ -18,8 +18,8 @@ class FaxDocument < ActiveRecord::Base
has_many :fax_thumbnails, :order => :position, :dependent => :destroy
- after_create :render_thumbnails
after_create :convert_pdf_to_tiff
+ after_create :render_thumbnails
# Scopes
scope :inbound, where(:state => 'inbound')
@@ -47,19 +47,25 @@ class FaxDocument < ActiveRecord::Base
transition [:new] => :inbound
end
end
-
+
+ def to_s
+ "#{self.remote_station_id}-#{self.created_at}-#{self.id}".gsub(/[^a-zA-Z0-9]/,'')
+ end
+
def render_thumbnails
- directory = "/tmp/GS-#{GsParameter.get('GEMEINSCHAFT_VERSION')}/fax_thumbnails/#{self.id}"
- system('mkdir -p ' + directory)
- system("cd #{directory} && convert #{Rails.root.to_s}/public#{self.document.to_s}[0-100] -colorspace Gray PNG:'fax_page.png'")
- number_of_thumbnails = Dir["#{directory}/fax_page-*.png"].count
- (0..(number_of_thumbnails-1)).each do |i|
+ self.delay.create_thumbnails_and_save_them
+ end
+
+ def create_thumbnails_and_save_them
+ tmp_dir = "/tmp/fax_convertions/#{self.id}"
+ FileUtils.mkdir_p tmp_dir
+ system("cd #{tmp_dir} && convert #{self.document.path} -colorspace Gray PNG:'fax_page.png'")
+ Dir.glob("#{tmp_dir}/fax_page*.png").each do |thumbnail|
fax_thumbnail = self.fax_thumbnails.build
- fax_thumbnail.thumbnail = File.open("#{directory}/fax_page-#{i}.png")
- fax_thumbnail.save!
+ fax_thumbnail.thumbnail = File.open(thumbnail)
+ fax_thumbnail.save
end
- system("rm -rf #{directory}")
- self.update_attributes(:document_total_pages => number_of_thumbnails) if self.document_total_pages.nil?
+ FileUtils.rm_rf tmp_dir
end
private
@@ -67,12 +73,12 @@ class FaxDocument < ActiveRecord::Base
page_size_a4 = '595 842'
page_size_command = "<< /Policies << /PageSize 3 >> /InputAttributes currentpagedevice /InputAttributes get dup { pop 1 index exch undef } forall dup 0 << /PageSize [ #{page_size_a4} ] >> put >> setpagedevice"
directory = "/tmp/GS-#{GsParameter.get('GEMEINSCHAFT_VERSION')}/faxes/#{self.id}"
- system('mkdir -p ' + directory)
+ FileUtils.mkdir_p directory
tiff_file_name = File.basename(self.document.to_s.downcase, ".pdf") + '.tiff'
system "cd #{directory} && gs -q -r#{self.fax_resolution.resolution_value} -dNOPAUSE -dBATCH -dSAFER -sDEVICE=tiffg3 -sOutputFile=\"#{tiff_file_name}\" -c \"#{page_size_command}\" -- \"#{Rails.root.to_s}/public#{self.document.to_s}\""
self.tiff = File.open("#{directory}/#{tiff_file_name}")
self.save
- system("rm -rf #{directory}")
+ FileUtils.rm_rf directory
end
end
diff --git a/app/uploaders/thumbnail_uploader.rb b/app/uploaders/thumbnail_uploader.rb
index a401a91..4b4cc09 100644
--- a/app/uploaders/thumbnail_uploader.rb
+++ b/app/uploaders/thumbnail_uploader.rb
@@ -34,17 +34,17 @@ class ThumbnailUploader < CarrierWave::Uploader::Base
process :resize_to_limit => [75, 75]
end
- version :thumb do
- process :resize_to_limit => [150, 150]
- end
+ # version :thumb do
+ # process :resize_to_limit => [150, 150]
+ # end
- version :medium do
- process :resize_to_limit => [400, 400]
- end
+ # version :medium do
+ # process :resize_to_limit => [400, 400]
+ # end
- version :big do
- process :resize_to_limit => [800, 800]
- end
+ # version :big do
+ # process :resize_to_limit => [800, 800]
+ # end
# Add a white list of extensions which are allowed to be uploaded.
diff --git a/app/views/access_authorizations/_form.html.haml b/app/views/access_authorizations/_form.html.haml
index fa417d9..fba4297 100644
--- a/app/views/access_authorizations/_form.html.haml
+++ b/app/views/access_authorizations/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('access_authorizations.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('access_authorizations.form.submit')
diff --git a/app/views/acd_agents/_form.html.haml b/app/views/acd_agents/_form.html.haml
index 3b78bac..df1c2ef 100644
--- a/app/views/acd_agents/_form.html.haml
+++ b/app/views/acd_agents/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('acd_agents.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('acd_agents.form.submit')
diff --git a/app/views/addresses/_form.html.haml b/app/views/addresses/_form.html.haml
index eff9930..4c58009 100644
--- a/app/views/addresses/_form.html.haml
+++ b/app/views/addresses/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('addresses.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('addresses.form.submit')
diff --git a/app/views/automatic_call_distributors/_form.html.haml b/app/views/automatic_call_distributors/_form.html.haml
index fcf133c..d4cf97c 100644
--- a/app/views/automatic_call_distributors/_form.html.haml
+++ b/app/views/automatic_call_distributors/_form.html.haml
@@ -4,5 +4,5 @@
= render "form_core", :f => f, :join_on => @join_on, :leave_on => @leave_on, :strategies => @strategies
- .actions
- = f.button :submit, conditional_t('automatic_call_distributors.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('automatic_call_distributors.form.submit')
diff --git a/app/views/backup_jobs/_form.html.haml b/app/views/backup_jobs/_form.html.haml
index e0adceb..41d0dc8 100644
--- a/app/views/backup_jobs/_form.html.haml
+++ b/app/views/backup_jobs/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('backup_jobs.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('backup_jobs.form.submit')
diff --git a/app/views/call_forwards/_form.html.haml b/app/views/call_forwards/_form.html.haml
index 7310af3..58ffd78 100644
--- a/app/views/call_forwards/_form.html.haml
+++ b/app/views/call_forwards/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('call_forwards.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('call_forwards.form.submit')
diff --git a/app/views/call_routes/_form.html.haml b/app/views/call_routes/_form.html.haml
index 1415852..0a96060 100644
--- a/app/views/call_routes/_form.html.haml
+++ b/app/views/call_routes/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('call_routes.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('call_routes.form.submit')
diff --git a/app/views/callthroughs/_form.html.haml b/app/views/callthroughs/_form.html.haml
index 99f92d0..870d3f0 100644
--- a/app/views/callthroughs/_form.html.haml
+++ b/app/views/callthroughs/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
+ .form-actions
= f.button :submit, conditional_t('callthroughs.form.submit')
diff --git a/app/views/conference_invitees/_form.html.haml b/app/views/conference_invitees/_form.html.haml
index 400580d..6ec987b 100644
--- a/app/views/conference_invitees/_form.html.haml
+++ b/app/views/conference_invitees/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('conference_invitees.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('conference_invitees.form.submit')
diff --git a/app/views/conferences/_form.html.haml b/app/views/conferences/_form.html.haml
index 4bee1a4..0a88a00 100644
--- a/app/views/conferences/_form.html.haml
+++ b/app/views/conferences/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('conferences.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('conferences.form.submit')
diff --git a/app/views/fax_accounts/_form.html.haml b/app/views/fax_accounts/_form.html.haml
index 0a5a4c0..de66709 100644
--- a/app/views/fax_accounts/_form.html.haml
+++ b/app/views/fax_accounts/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('fax_accounts.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('fax_accounts.form.submit')
diff --git a/app/views/fax_documents/_form.html.haml b/app/views/fax_documents/_form.html.haml
index e240371..1b1c3be 100644
--- a/app/views/fax_documents/_form.html.haml
+++ b/app/views/fax_documents/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('fax_documents.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('fax_documents.form.submit')
diff --git a/app/views/fax_documents/_index_core.html.haml b/app/views/fax_documents/_index_core.html.haml
index 8559f1c..5355521 100644
--- a/app/views/fax_documents/_index_core.html.haml
+++ b/app/views/fax_documents/_index_core.html.haml
@@ -2,25 +2,34 @@
%thead
%tr
%th= t('fax_documents.index.sent_at')
- %th= t('fax_documents.index.state')
- %th= t('fax_documents.index.result')
%th
= t('fax_documents.index.phone_number')
%br
= t('fax_documents.index.remote_station_id')
%th= t('fax_documents.index.thumbnails')
+ %th
+ %th
%tbody
- for fax_document in fax_documents
- %tr{:id => "fax_document_#{fax_document.id}"}
- - if fax_document.sent_at
- %td
- = "#{fax_document.inbound ? '&#8680;' : '&#8678;'}".html_safe
- = l fax_document.sent_at, :format => :short
- %td= t("fax_documents.states.#{fax_document.state}")
- %td= t("fax_documents.result_codes.code_#{fax_document.result_code}") + " (#{fax_document.result_code})"
+ - case fax_document.state
+ - when 'unsuccessful'
+ - current_status = 'error'
+ - when 'sending'
+ - current_status = 'success'
+ - when 'queued_for_sending'
+ - current_status = 'warning'
- else
- %td{ :colspan => 3 }= t("fax_documents.states.#{fax_document.state}")
+ - current_status = ''
+
+ %tr{:class => current_status}
+ %td
+ - case fax_document.state
+ - when 'successful'
+ = "#{fax_document.inbound ? '&#8680;' : '&#8678;'}".html_safe
+ = l fax_document.sent_at, :format => :short
+ - else
+ = t("fax_documents.states.#{fax_document.state}")
%td
- if fax_document.inbound
= "#{fax_document.caller_id_number} #{fax_document.caller_id_name}"
@@ -28,9 +37,21 @@
= fax_document.destination_phone_number
%br
= fax_document.remote_station_id
- %td
- - fax_document.fax_thumbnails.limit(5).each do |fax_thumbnail|
- =image_tag fax_thumbnail.thumbnail_url(:mini), :class => 'FaxThumbnail', :alt => "Thumbnail of page \##{fax_thumbnail.position}"
- - if can?(:show, fax_document) && !fax_document.document.blank? && File.readable?(fax_document.document.path)
- = link_to t('fax_documents.index.actions.download'), fax_account_fax_document_path(@fax_account, fax_document, :format => :pdf), :method => :get
+ %td
+ %ul.thumbnails
+ - fax_document.fax_thumbnails.limit(3).each do |fax_thumbnail|
+ %li.span1
+ %div.thumbnail
+ %a.thumbnail{:href => fax_thumbnail.thumbnail.url}
+ =image_tag(fax_thumbnail.thumbnail.url, :alt => "Page #{fax_thumbnail.position}")
+ %p
+ %small
+ = "#{fax_thumbnail.position}/#{fax_document.fax_thumbnails.count}"
+
+ - if fax_document.document?
+ %p
+ %a{:href => fax_document.document.url}
+ %i{:class => 'icon-download'}
+ = t("fax_documents.index.actions.download_pdf") + " (#{number_to_human_size(fax_document.document.size, :precision => 2)})"
+
=render :partial => 'shared/index_view_edit_destroy_part', :locals => {:parent => fax_document.fax_account, :child => fax_document}
diff --git a/app/views/fax_documents/show.html.haml b/app/views/fax_documents/show.html.haml
index 41d3bff..9925c2f 100644
--- a/app/views/fax_documents/show.html.haml
+++ b/app/views/fax_documents/show.html.haml
@@ -1,36 +1,67 @@
- content_for :title, t("fax_documents.show.page_title")
-- child = @fax_document
-- parent = @fax_document.fax_account
-%p
- %strong= t('fax_documents.index.state') + ":"
- = t("fax_documents.states.#{@fax_document.state}")
+.row
+ .span12
+ %table.table.table-striped
+ - case @fax_document.state
+ - when 'unsuccessful'
+ - current_status = 'error'
+ - when 'sending'
+ - current_status = 'success'
+ - when 'queued_for_sending'
+ - current_status = 'warning'
+ - else
+ - current_status = ''
-%p
- %strong= t('fax_documents.index.result_code') + ":"
- = @fax_document.result_code
+ %tr{:class => current_status}
+ %td
+ %strong= t('fax_documents.index.state') + ":"
+ %td
+ = t("fax_documents.states.#{@fax_document.state}")
+ %tr
+ %td
+ %strong= t('fax_documents.index.result_code') + ":"
+ %td
+ = @fax_document.result_code
+ %tr
+ %td
+ %strong= t('fax_documents.index.result_text') + ":"
+ %td
+ = t("fax_documents.result_codes.code_#{@fax_document.result_code}")
+ %tr
+ %td
+ %strong= t('fax_documents.show.document_transferred_pages') + ":"
+ %td
+ = @fax_document.document_transferred_pages
+ %tr
+ %td
+ %strong= t('fax_documents.show.remote_station_id') + ":"
+ %td
+ = @fax_document.remote_station_id
+ %tr
+ %td
+ %strong= t('fax_documents.show.fax_resolution') + ":"
+ %td
+ = @fax_document.fax_resolution
-%p
- %strong= t('fax_documents.index.result_text') + ":"
- = t("fax_documents.result_codes.code_#{@fax_document.result_code}")
+ - if @fax_document.document?
+ %p
+ %a{:href => @fax_document.document.url}
+ %i{:class => 'icon-download'}
+ = t("fax_documents.index.actions.download_pdf") + " (#{number_to_human_size(@fax_document.document.size, :precision => 2)})"
-%p
- %strong= t('fax_documents.show.document_transferred_pages') + ":"
- = @fax_document.document_transferred_pages
-%p
- %strong= t('fax_documents.show.remote_station_id') + ":"
- = @fax_document.remote_station_id
-%p
- %strong= t('fax_documents.show.fax_resolution') + ":"
- = @fax_document.fax_resolution
+.row
+ .span12
+ - if @fax_document.fax_thumbnails.any?
+ %ul.thumbnails
+ - @fax_document.fax_thumbnails.limit(50).each do |fax_thumbnail|
+ %li.span4
+ %div.thumbnail
+ %a.thumbnail{:href => fax_thumbnail.thumbnail.url}
+ =image_tag(fax_thumbnail.thumbnail.url, :alt => "Page #{fax_thumbnail.position}")
+ %p
+ = "#{fax_thumbnail.position}/#{@fax_document.fax_thumbnails.count}"
-- if @fax_document.fax_thumbnails.count > 0
- - i = @fax_document.fax_thumbnails.count
- - i = 10 if i > 10
- - @fax_document.fax_thumbnails.limit(i).each do |fax_thumbnail|
- =image_tag fax_thumbnail.thumbnail_url(:medium), :class => 'FaxThumbnail', :alt => "Thumbnail of page \##{fax_thumbnail.position}"
-
-- if @fax_document.document.path
- = link_to t("fax_documents.index.actions.download_pdf"), "#{request.protocol}#{request.host_with_port}#{request.fullpath.split("?")[0]}.pdf"
-
-= render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @fax_document.fax_account, :child => @fax_document }
+.row
+ .span12
+ = render :partial => 'shared/show_edit_destroy_part', :locals => { :parent => @fax_document.fax_account, :child => @fax_document }
diff --git a/app/views/gateway_parameters/_form.html.haml b/app/views/gateway_parameters/_form.html.haml
index 79342d2..bb98ce0 100644
--- a/app/views/gateway_parameters/_form.html.haml
+++ b/app/views/gateway_parameters/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('gateway_parameters.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('gateway_parameters.form.submit')
diff --git a/app/views/gateway_settings/_form.html.haml b/app/views/gateway_settings/_form.html.haml
index af26d2a..ad4b34b 100644
--- a/app/views/gateway_settings/_form.html.haml
+++ b/app/views/gateway_settings/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
+ .form-actions
= f.button :submit, conditional_t('gateway_settings.form.submit')
diff --git a/app/views/gateways/_form.html.haml b/app/views/gateways/_form.html.haml
index 5f6d5dd..705d417 100644
--- a/app/views/gateways/_form.html.haml
+++ b/app/views/gateways/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('gateways.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('gateways.form.submit')
diff --git a/app/views/gemeinschaft_setups/new.de.html.haml b/app/views/gemeinschaft_setups/new.de.html.haml
index f977291..3c215d1 100644
--- a/app/views/gemeinschaft_setups/new.de.html.haml
+++ b/app/views/gemeinschaft_setups/new.de.html.haml
@@ -26,5 +26,5 @@
= f.simple_fields_for :sip_domain, @sip_domain do |s|
= render "sip_domains/form_core", :f => s
- .actions
- = f.button :submit, conditional_t('gemeinschaft_setups.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('gemeinschaft_setups.form.submit')
diff --git a/app/views/gemeinschaft_setups/new.html.haml b/app/views/gemeinschaft_setups/new.html.haml
index 44d9c5b..deac19d 100644
--- a/app/views/gemeinschaft_setups/new.html.haml
+++ b/app/views/gemeinschaft_setups/new.html.haml
@@ -26,5 +26,5 @@
= f.simple_fields_for :sip_domain, @sip_domain do |s|
= render "sip_domains/form_core", :f => s
- .actions
- = f.button :submit, conditional_t('gemeinschaft_setups.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('gemeinschaft_setups.form.submit')
diff --git a/app/views/gs_cluster_sync_log_entries/_form.html.haml b/app/views/gs_cluster_sync_log_entries/_form.html.haml
index 2c47d88..28f1848 100644
--- a/app/views/gs_cluster_sync_log_entries/_form.html.haml
+++ b/app/views/gs_cluster_sync_log_entries/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('gs_cluster_sync_log_entries.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('gs_cluster_sync_log_entries.form.submit')
diff --git a/app/views/gs_nodes/_form.html.haml b/app/views/gs_nodes/_form.html.haml
index 28a4e5d..5ff6d40 100644
--- a/app/views/gs_nodes/_form.html.haml
+++ b/app/views/gs_nodes/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('gs_nodes.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('gs_nodes.form.submit')
diff --git a/app/views/gs_parameters/_form.html.haml b/app/views/gs_parameters/_form.html.haml
index ea69e95..eb578ff 100644
--- a/app/views/gs_parameters/_form.html.haml
+++ b/app/views/gs_parameters/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('gs_parameters.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('gs_parameters.form.submit')
diff --git a/app/views/gui_functions/_form.html.haml b/app/views/gui_functions/_form.html.haml
index 0b2a201..b1b68f9 100644
--- a/app/views/gui_functions/_form.html.haml
+++ b/app/views/gui_functions/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('gui_functions.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('gui_functions.form.submit')
diff --git a/app/views/hunt_group_members/_form.html.haml b/app/views/hunt_group_members/_form.html.haml
index 1ab7850..7cdef92 100644
--- a/app/views/hunt_group_members/_form.html.haml
+++ b/app/views/hunt_group_members/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('hunt_group_members.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('hunt_group_members.form.submit')
diff --git a/app/views/hunt_groups/_form.html.haml b/app/views/hunt_groups/_form.html.haml
index bc2663b..86cd433 100644
--- a/app/views/hunt_groups/_form.html.haml
+++ b/app/views/hunt_groups/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('hunt_groups.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('hunt_groups.form.submit')
diff --git a/app/views/intruders/_form.html.haml b/app/views/intruders/_form.html.haml
index 26aab1c..02647f0 100644
--- a/app/views/intruders/_form.html.haml
+++ b/app/views/intruders/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('intruders.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('intruders.form.submit')
diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml
index 7084090..8e09859 100644
--- a/app/views/layouts/_navbar.html.haml
+++ b/app/views/layouts/_navbar.html.haml
@@ -28,9 +28,9 @@
- if current_user
%ul.nav.pull-right
- %li
+ %li.display
- if current_user.image?
- =image_tag(current_user.image_url(:mini).to_s, :class => 'img-rounded')
+ = image_tag(current_user.image_url(:mini).to_s, :class => 'img-rounded')
- else
- if current_user.male?
= image_tag 'icons/user-male-16x.png', :class => 'img-rounded'
@@ -39,15 +39,15 @@
- if current_page?(tenant_user_path(current_user.current_tenant, current_user))
%li.active
- %a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)}
+ %a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)}
= current_user
- else
%li
- %a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)}
+ %a.navbar-link{:href => tenant_user_path(current_user.current_tenant, current_user)}
= current_user
- if single_sign_on_system? == false
%li
- %a.navbar-link{:href => log_out_path}
+ %a.navbar-link{:href => log_out_path}
%i.icon-off.icon-white
-
+
diff --git a/app/views/manufacturers/_form.html.haml b/app/views/manufacturers/_form.html.haml
index d89c603..ce4eea4 100644
--- a/app/views/manufacturers/_form.html.haml
+++ b/app/views/manufacturers/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('manufacturers.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('manufacturers.form.submit')
diff --git a/app/views/parking_stalls/_form.html.haml b/app/views/parking_stalls/_form.html.haml
index 60b60b7..f72c190 100644
--- a/app/views/parking_stalls/_form.html.haml
+++ b/app/views/parking_stalls/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('parking_stalls.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('parking_stalls.form.submit')
diff --git a/app/views/phone_book_entries/_form.html.haml b/app/views/phone_book_entries/_form.html.haml
index c73d10a..b579bf4 100644
--- a/app/views/phone_book_entries/_form.html.haml
+++ b/app/views/phone_book_entries/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('phone_book_entries.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('phone_book_entries.form.submit')
diff --git a/app/views/phone_books/_form.html.haml b/app/views/phone_books/_form.html.haml
index 245426b..df5d060 100644
--- a/app/views/phone_books/_form.html.haml
+++ b/app/views/phone_books/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('phone_books.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('phone_books.form.submit')
diff --git a/app/views/phone_models/_form.html.haml b/app/views/phone_models/_form.html.haml
index 45c176f..2b09f6d 100644
--- a/app/views/phone_models/_form.html.haml
+++ b/app/views/phone_models/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('phone_models.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('phone_models.form.submit')
diff --git a/app/views/phone_number_ranges/_form.html.haml b/app/views/phone_number_ranges/_form.html.haml
index a86d45b..d624619 100644
--- a/app/views/phone_number_ranges/_form.html.haml
+++ b/app/views/phone_number_ranges/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('phone_number_ranges.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('phone_number_ranges.form.submit')
diff --git a/app/views/phone_numbers/_form.html.haml b/app/views/phone_numbers/_form.html.haml
index 2812e21..8ef1e90 100644
--- a/app/views/phone_numbers/_form.html.haml
+++ b/app/views/phone_numbers/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
+ .form-actions
= f.button :submit, conditional_t('phone_numbers.form.submit')
diff --git a/app/views/phone_sip_accounts/_form.html.haml b/app/views/phone_sip_accounts/_form.html.haml
index c2558b8..8b214de 100644
--- a/app/views/phone_sip_accounts/_form.html.haml
+++ b/app/views/phone_sip_accounts/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('phone_sip_accounts.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('phone_sip_accounts.form.submit')
diff --git a/app/views/phones/_form.html.haml b/app/views/phones/_form.html.haml
index 9bfa226..3cb62e6 100644
--- a/app/views/phones/_form.html.haml
+++ b/app/views/phones/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('phones.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('phones.form.submit')
diff --git a/app/views/ringtones/_form.html.haml b/app/views/ringtones/_form.html.haml
index 7dbfcb0..789362f 100644
--- a/app/views/ringtones/_form.html.haml
+++ b/app/views/ringtones/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('ringtones.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('ringtones.form.submit')
diff --git a/app/views/route_elements/_form.html.haml b/app/views/route_elements/_form.html.haml
index 8feacaa..b59be36 100644
--- a/app/views/route_elements/_form.html.haml
+++ b/app/views/route_elements/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('route_elements.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('route_elements.form.submit')
diff --git a/app/views/sessions/new.html.haml b/app/views/sessions/new.html.haml
index f386a5d..75dd3de 100644
--- a/app/views/sessions/new.html.haml
+++ b/app/views/sessions/new.html.haml
@@ -4,5 +4,5 @@
= t.input :login_data, :label => t('sessions.form.email'), :autofocus => true
= t.input :password, :label => t('sessions.form.password'), :required => false
= t.input :reset_password, :label => t('sessions.form.reset_password'), :as => :boolean
- .actions
+ .form-actions
= t.button :submit, :value => 'Login'
diff --git a/app/views/sip_accounts/_form.html.haml b/app/views/sip_accounts/_form.html.haml
index f209bf4..d40ce10 100644
--- a/app/views/sip_accounts/_form.html.haml
+++ b/app/views/sip_accounts/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('sip_accounts.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('sip_accounts.form.submit')
diff --git a/app/views/sip_domains/_form.html.haml b/app/views/sip_domains/_form.html.haml
index 2d662af..83ba7ad 100644
--- a/app/views/sip_domains/_form.html.haml
+++ b/app/views/sip_domains/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('sip_domains.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('sip_domains.form.submit')
diff --git a/app/views/softkeys/_form.html.haml b/app/views/softkeys/_form.html.haml
index 5b799b6..c029ead 100644
--- a/app/views/softkeys/_form.html.haml
+++ b/app/views/softkeys/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('softkeys.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('softkeys.form.submit')
diff --git a/app/views/tenants/_form.html.haml b/app/views/tenants/_form.html.haml
index 1641e78..981293c 100644
--- a/app/views/tenants/_form.html.haml
+++ b/app/views/tenants/_form.html.haml
@@ -20,5 +20,5 @@
- if GsParameter.get('STRICT_DID_HANDLING') == true
= f.input :did_list, :label => t('tenants.form.did_list.label'), :hint => conditional_hint('tenants.form.did_list.hint')
- .actions
- = f.button :submit, conditional_t('tenants.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('tenants.form.submit')
diff --git a/app/views/tenants/_index_core.html.haml b/app/views/tenants/_index_core.html.haml
index a220b1b..2430b67 100644
--- a/app/views/tenants/_index_core.html.haml
+++ b/app/views/tenants/_index_core.html.haml
@@ -13,6 +13,6 @@
- if current_user && current_user.current_tenant != tenant && current_user.tenants.include?(tenant)
= simple_form_for([current_user.current_tenant, current_user]) do |f|
= f.hidden_field :current_tenant_id, :value => tenant.id
- .actions
+ .form-actions
= f.button :submit, conditional_t('tenants.switch_to_tenant')
- =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => tenant} \ No newline at end of file
+ =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => tenant}
diff --git a/app/views/user_group_memberships/_form.html.haml b/app/views/user_group_memberships/_form.html.haml
index 3c0fee1..e810597 100644
--- a/app/views/user_group_memberships/_form.html.haml
+++ b/app/views/user_group_memberships/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('user_group_memberships.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('user_group_memberships.form.submit')
diff --git a/app/views/user_groups/_form.html.haml b/app/views/user_groups/_form.html.haml
index 3263fdd..5076e74 100644
--- a/app/views/user_groups/_form.html.haml
+++ b/app/views/user_groups/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('user_groups.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('user_groups.form.submit')
diff --git a/app/views/users/_form.html.haml b/app/views/users/_form.html.haml
index 9a75677..90d0e02 100644
--- a/app/views/users/_form.html.haml
+++ b/app/views/users/_form.html.haml
@@ -4,7 +4,7 @@
= render "form_core", :f => f
- .actions
+ .form-actions
= f.button :submit, conditional_t('users.form.submit')
- else
= simple_form_for(@user) do |f|
@@ -12,5 +12,5 @@
= render "form_core", :f => f
- .actions
+ .form-actions
= f.button :submit, conditional_t('users.form.submit')
diff --git a/app/views/voicemail_messages/_index_core.html.haml b/app/views/voicemail_messages/_index_core.html.haml
index f03002d..5e82761 100644
--- a/app/views/voicemail_messages/_index_core.html.haml
+++ b/app/views/voicemail_messages/_index_core.html.haml
@@ -24,18 +24,18 @@
%td
- if ! voicemail_message.flags.blank?
= t("voicemail_messages.index.flags.#{voicemail_message.flags}")
- %td.actions
+ %td.form-actions
- if can?(:show, voicemail_message) && File.readable?(voicemail_message.file_path)
= link_to t('voicemail_messages.index.actions.download'), sip_account_voicemail_message_path(@sip_account, voicemail_message, :format => :wav), :method => :get
%td.actions
- if @sip_account.registration && can?(:call, voicemail_message)
= link_to t('voicemail_messages.index.actions.call'), call_sip_account_voicemail_message_path(@sip_account, voicemail_message), :method => :put
- %td.actions
+ %td.form-actions
- if can?(:edit, voicemail_message) && voicemail_message.read_epoch > 0
= link_to t('voicemail_messages.index.actions.mark_unread'), mark_unread_sip_account_voicemail_message_path(@sip_account, voicemail_message), :method => :put
- else
= link_to t('voicemail_messages.index.actions.mark_read'), mark_read_sip_account_voicemail_message_path(@sip_account, voicemail_message), :method => :put
- %td.actions
+ %td.form-actions
- if can? :destroy, voicemail_message
= link_to t('voicemail_messages.index.actions.destroy'), sip_account_voicemail_message_path(@sip_account, voicemail_message), :method => :delete
diff --git a/app/views/voicemail_settings/_form.html.haml b/app/views/voicemail_settings/_form.html.haml
index 6d5f845..cd43b2d 100644
--- a/app/views/voicemail_settings/_form.html.haml
+++ b/app/views/voicemail_settings/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('voicemail_settings.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('voicemail_settings.form.submit')
diff --git a/app/views/whitelists/_form.html.haml b/app/views/whitelists/_form.html.haml
index c7f787a..71dbe6b 100644
--- a/app/views/whitelists/_form.html.haml
+++ b/app/views/whitelists/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('whitelists.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('whitelists.form.submit')
diff --git a/config/initializers/simple_form.rb b/config/initializers/simple_form.rb
index 572d58f..062f823 100644
--- a/config/initializers/simple_form.rb
+++ b/config/initializers/simple_form.rb
@@ -82,6 +82,20 @@ SimpleForm.setup do |config|
end
end
+ config.wrappers :checkbox, :tag => 'div', :class => 'control-group', :error_class => 'error' do |b|
+ b.use :html5
+ b.use :placeholder
+ b.wrapper :tag => 'div', :class => 'controls' do |input|
+ input.wrapper :tag => 'div', :class => 'simple-checkbox' do |prepend|
+ prepend.use :label_input
+ end
+ input.use :hint, :wrap_with => { :tag => 'span', :class => 'help-block' }
+ input.use :error, :wrap_with => { :tag => 'span', :class => 'help-inline' }
+ end
+ end
+
+ config.wrapper_mappings = { :boolean => :checkbox }
+
# Wrappers for forms and inputs using the Twitter Bootstrap toolkit.
# Check the Bootstrap docs (http://twitter.github.com/bootstrap)
# to learn about the different styles for forms and inputs,
@@ -95,7 +109,7 @@ SimpleForm.setup do |config|
config.boolean_style = :nested
# Default class for buttons
- config.button_class = 'btn btn-primary'
+ config.button_class = 'btn'
# Method used to tidy up errors.
# config.error_method = :first
@@ -136,7 +150,7 @@ SimpleForm.setup do |config|
config.label_class = 'control-label'
# You can define the class to use on all forms. Default is simple_form.
- # config.form_class = :simple_form
+ config.form_class = 'simple_form form-horizontal'
# You can define which elements should obtain additional classes
# config.generate_additional_classes_for = [:wrapper, :label, :input]
@@ -163,7 +177,7 @@ SimpleForm.setup do |config|
# config.country_priority = nil
# Default size for text inputs.
- # config.default_input_size = 50
+ config.default_input_size = 150
# When false, do not use translations for labels.
# config.translate_labels = true
diff --git a/db/schema.rb b/db/schema.rb
index fc2b635..0637146 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20130212071000) do
+ActiveRecord::Schema.define(:version => 20130213110000) do
create_table "access_authorizations", :force => true do |t|
t.string "access_authorizationable_type"
@@ -701,6 +701,16 @@ ActiveRecord::Schema.define(:version => 20130212071000) do
t.datetime "updated_at", :null => false
end
+ create_table "parking_stalls", :force => true do |t|
+ t.string "name"
+ t.string "lot"
+ t.integer "parking_stallable_id"
+ t.string "parking_stallable_type"
+ t.string "comment"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
create_table "phone_book_entries", :force => true do |t|
t.integer "phone_book_id"
t.string "first_name"
@@ -899,6 +909,7 @@ ActiveRecord::Schema.define(:version => 20130212071000) do
t.integer "gs_node_original_id"
t.string "uuid"
t.boolean "is_native"
+ t.string "language_code"
end
add_index "sip_accounts", ["uuid"], :name => "index_sip_accounts_on_uuid"
diff --git a/lib/generators/nifty/authentication/templates/views/haml/_form.html.haml b/lib/generators/nifty/authentication/templates/views/haml/_form.html.haml
index 992ee9c..e740959 100644
--- a/lib/generators/nifty/authentication/templates/views/haml/_form.html.haml
+++ b/lib/generators/nifty/authentication/templates/views/haml/_form.html.haml
@@ -12,5 +12,5 @@
.field
= f.label :password_confirmation, "Confirm Password"
= f.password_field :password_confirmation
- .actions
+ .form-actions
= f.submit (@<%= user_singular_name %>.new_record? ? "Sign up" : "Update")
diff --git a/lib/generators/nifty/authentication/templates/views/haml/login.html.haml b/lib/generators/nifty/authentication/templates/views/haml/login.html.haml
index 3aebb44..877d8f9 100644
--- a/lib/generators/nifty/authentication/templates/views/haml/login.html.haml
+++ b/lib/generators/nifty/authentication/templates/views/haml/login.html.haml
@@ -11,7 +11,7 @@
.field
= f.label :password
= f.password_field :password
- .actions
+ .form-actions
= f.submit "Log in"
<%- else -%>
- form_tag <%= session_plural_name %>_path do
@@ -21,6 +21,6 @@
.field
= label_tag :password
= password_field_tag :password
- .actions
+ .form-actions
= submit_tag "Log in"
<%- end -%>
diff --git a/lib/generators/nifty/scaffold/templates/views/haml/_form.html.haml b/lib/generators/nifty/scaffold/templates/views/haml/_form.html.haml
index 57cb828..b12f1cb 100644
--- a/lib/generators/nifty/scaffold/templates/views/haml/_form.html.haml
+++ b/lib/generators/nifty/scaffold/templates/views/haml/_form.html.haml
@@ -3,5 +3,5 @@
= render "form_core", :f => f
- .actions
- = f.button :submit, conditional_t('<%= plural_name %>.form.submit') \ No newline at end of file
+ .form-actions
+ = f.button :submit, conditional_t('<%= plural_name %>.form.submit')