tkh_content 0.9.10 → 0.9.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a07b81f33459760971cfaaee1ccb390c2439c62d
4
- data.tar.gz: 311e44c99984a7d609e12d085a52508fe4a22303
3
+ metadata.gz: fd689ef278c0e08bc119bbaa3b4fd1062d2d0759
4
+ data.tar.gz: b343283506cf28d3a44ef361bf99e80df6cf3d8f
5
5
  SHA512:
6
- metadata.gz: 5ab9a39a8147ef5fd5b72734c6af2c464cf03273def8afb7c41df514d462ed4d876d51b04191bf3968dbb50a2f65a42ed1d3f1289673190be301048e4753dc37
7
- data.tar.gz: c327e267dae0e50665e30768c3775387877b16d766627679d827d465f6308323a3349fb9e5747616849f4d4afaf63f34c5b8e47ee43960bc214ed572a1f92c82
6
+ metadata.gz: db73b8caf2e79c91f905d5b560aab3ac5cc22a8e4bad07e0b60e2139c55960461231a89f813421f354a7594d6b8234972da5b041a4a81d0f01efdf4c9fb16daa
7
+ data.tar.gz: 069a50532188e5cf3c9b0efa20eed6d8cd4cc98ba74011f92d98af3b4a7978bacac8a10a6c94f853333d82863565b6df90713985441c74458746e907255af7d3
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
 
4
4
 
5
+ ## 0.9.11
6
+
7
+ * Admins can delete tags which have no taggings
8
+ * Fixed up the whole contact form routine.
9
+
10
+
5
11
  ## 0.9.10
6
12
 
7
13
  * Fixed up paginators
@@ -47,7 +47,7 @@ class ContactsController < ApplicationController
47
47
  ContactMailer.message_from_contact_form(contact).deliver
48
48
  return 'success'
49
49
  rescue Exception => e
50
- AdminMailer.rescued_exceptions(e, "Some exception occurred while trying to send a student his confirmation for registering in a course. The email was never sent!").deliver
50
+ AdminMailer.rescued_exceptions(e, "Some exception occurred while trying to send to site admin a message from contact form").deliver
51
51
  @exception = e
52
52
  return 'exception'
53
53
  end
@@ -1,5 +1,5 @@
1
1
  class ContactMailer < ActionMailer::Base
2
-
2
+
3
3
  # default :from => "info@yoga.lu"
4
4
 
5
5
  # Subject can be set in your I18n file at config/locales/en.yml
@@ -7,14 +7,14 @@ class ContactMailer < ActionMailer::Base
7
7
  #
8
8
  # en.user_mailer.password_reset.subject
9
9
  #
10
- def message_from_contact_form(contact)
10
+ def message_from_contact_form(contact)
11
11
  @contact = contact
12
12
  # FIXME - only the email addresses show up. not the names :-(
13
13
  # TODO - what do to if contact_email is not set?
14
14
  recipient = "#{Setting.first.try(:company_name)} <#{Setting.first.try(:contact_email)}>"
15
15
  reply_to = "#{@contact.sender_name} <#{@contact.sender_email}>"
16
- mail to: recipient,
17
- from: "#{Setting.first.site_name} <deploy@ohlalaweb.pragmaticyoga.org>",
16
+ mail to: recipient,
17
+ from: "#{Setting.first.site_name} <deploy@mailcenter.tenthousandhours.eu>",
18
18
  reply_to: reply_to,
19
19
  subject: "Message from #{@contact.sender_name} via #{Setting.first.try(:site_name)} web site"
20
20
  end
@@ -6,7 +6,8 @@
6
6
  class Contact < ActiveRecord::Base
7
7
 
8
8
  validates_presence_of :sender_name
9
- validates :sender_email, :presence => true, :format => { :with => /\A([\A@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i, :on => :create }
9
+ validates_presence_of :sender_email
10
+ # validates :sender_email, :presence => true, :format => { :with => /\A([\A@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i, :on => :create }
10
11
  validates_presence_of :body
11
12
 
12
13
  scope :by_recent, -> { order('updated_at desc') }
@@ -12,7 +12,7 @@
12
12
  <% @tags.each do |tag| %>
13
13
  <tr>
14
14
  <td><%= link_to ("#{tag.name} (#{tag.taggings.count})"), blog_by_tag_path(tag.name) %></td>
15
- <td><%= link_to t('edit'), edit_tag_path(tag), class: 'btn btn-xs btn-primary' %></td>
15
+ <td><%= link_to t('edit'), edit_tag_path(tag), class: 'btn btn-xs btn-default' %><%= link_to( t('delete'), tag, method: :delete, data: { confirm: t('are_you_sure') }, class: 'btn btn-xs btn-danger') if tag.taggings.count == 0 %></td>
16
16
  </tr>
17
17
  <% end %>
18
18
  </tbody>
@@ -24,8 +24,8 @@ fr:
24
24
  name: "nom"
25
25
 
26
26
  contacts:
27
- sender_name: "nom de l'auteur"
28
- sender_email: "email de l'auteur"
27
+ sender_name: "votre nom"
28
+ sender_email: "votre adresse email"
29
29
  body: 'contenu du message'
30
30
 
31
31
  comments:
@@ -1,3 +1,3 @@
1
1
  module TkhContent
2
- VERSION = "0.9.10"
2
+ VERSION = "0.9.11"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tkh_content
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.10
4
+ version: 0.9.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Swami Atma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-11 00:00:00.000000000 Z
11
+ date: 2014-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails