Merge pull request #557 from differentreality/wording_styling

Wording styling
This commit is contained in:
Stella Rouzi 2014-12-01 14:07:40 +02:00
commit 343bdec617
17 changed files with 37 additions and 39 deletions

View file

@ -18,7 +18,7 @@ module Admin
redirect_to admin_conference_call_for_paper_path,
notice: 'Call for papers successfully created.'
else
flash[:alert] = "Creating the call for papers failed. #{@call_for_paper.errors.full_messages.join('. ')}."
flash[:error] = "Creating the call for papers failed. #{@call_for_paper.errors.full_messages.join('. ')}."
render :new
end
end
@ -37,7 +37,7 @@ module Admin
redirect_to(admin_conference_call_for_paper_path(@conference.short_title),
notice: 'Call for papers successfully updated.')
else
flash[:alert] = "Updating call for papers failed. #{@cfp.errors.to_a.join('. ')}."
flash[:error] = "Updating call for papers failed. #{@cfp.errors.to_a.join('. ')}."
render :new
end
end
@ -46,7 +46,7 @@ module Admin
if @call_for_paper.destroy
redirect_to admin_conference_call_for_paper_path, notice: 'Call for Papers was successfully deleted.'
else
redirect_to admin_conference_call_for_paper_path, alert: 'A error prohibited this Call for Papers from being destroyed: '\
redirect_to admin_conference_call_for_paper_path, error: 'An error prohibited this Call for Papers from being destroyed: '\
"#{@call_for_paper.errors.full_messages.join('. ')}."
end
end

View file

@ -15,9 +15,8 @@ module Admin
redirect_to(admin_conference_campaigns_path(conference_id: @conference.short_title),
notice: 'Campaign successfully created.')
else
redirect_to(new_admin_conference_campaign_path(conference_id: @conference.short_title),
alert: "Creating of Campaign for #{@conference.short_title} failed." \
"#{@campaign.errors.full_messages.join('. ')}.")
flash[:error] = 'Campaign creation failed. ' + @campaign.errors.full_messages.to_sentence
render action: 'new'
end
end
@ -31,11 +30,8 @@ module Admin
conference_id: @conference.short_title),
notice: "Campaign '#{@campaign.name}' successfully updated.")
else
redirect_to(edit_admin_conference_campaign_path(
conference_id: @conference.short_title,
id: @campaign.id),
alert: "Update of Campaign for #{@conference.short_title} failed." \
"#{@campaign.errors.full_messages.join('. ')}.")
flash[:error] = 'Campaign update failed. ' + @campaign.errors.full_messages.to_sentence
render action: 'edit'
end
end

View file

@ -22,7 +22,7 @@ module Admin
redirect_to admin_conference_commercials_path,
notice: 'Commercial was successfully created.'
else
flash[:alert] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
flash[:error] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
render :new
end
end
@ -32,7 +32,7 @@ module Admin
redirect_to admin_conference_commercials_path,
notice: 'Commercial was successfully updated.'
else
flash[:alert] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
flash[:error] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
render :edit
end
end

View file

@ -16,7 +16,7 @@ module Admin
redirect_to admin_conference_registration_period_path(@conference.short_title),
notice: 'Registration Period successfully updated.'
else
flash[:alert] = "A error prohibited the Registration Period from being saved: #{@registration_period.errors.full_messages.join('. ')}."
flash[:error] = "An error prohibited the Registration Period from being saved: #{@registration_period.errors.full_messages.join('. ')}."
render :new
end
end
@ -36,7 +36,7 @@ module Admin
redirect_to admin_conference_registration_period_path(@conference.short_title),
notice: 'Registration Period successfully updated.'
else
flash[:alert] = 'A error prohibited the Registration Period from being saved: ' \
flash[:error] = 'An error prohibited the Registration Period from being saved: ' \
"#{@registration_period.errors.full_messages.join('. ')}."
render :edit
end

View file

@ -19,7 +19,7 @@ module Admin
redirect_to admin_conference_registrations_path(@conference.short_title),
notice: 'Successfully updated registration!'
else
flash[:alert] = "A error prohibited the Registration for #{@conference.title}: "\
flash[:error] = "An error prohibited the Registration for #{@conference.title}: "\
"#{@registration.errors.full_messages.join('. ')}."
render :edit
end
@ -32,7 +32,7 @@ module Admin
notice: "Deleted registration for #{@user.name}!"
else
redirect_to(admin_conference_registrations_path(@conference.short_title),
alert: 'You must be an admin to delete a registration.')
error: 'You must be an admin to delete a registration.')
end
end

View file

@ -35,7 +35,7 @@ module Admin
if @splashpage.destroy
redirect_to admin_conference_splashpage_path, notice: 'Splashpage was successfully destroyed.'
else
redirect_to admin_conference_splashpage_path, alert: 'A error prohibited this Splashpage from being destroyed: '\
redirect_to admin_conference_splashpage_path, alert: 'An error prohibited this Splashpage from being destroyed: '\
"#{@splashpage.errors.full_messages.join('. ')}."
end
end

View file

@ -17,7 +17,7 @@ module Admin
redirect_to(admin_conference_targets_path(conference_id: @conference.short_title),
notice: 'Target successfully created.')
else
flash[:alert] = "Creating target failed: #{@target.errors.full_messages.join('. ')}."
flash[:error] = "Creating target failed: #{@target.errors.full_messages.join('. ')}."
render :new
end
end
@ -29,7 +29,7 @@ module Admin
redirect_to(admin_conference_targets_path(conference_id: @conference.short_title),
notice: 'Target successfully updated.')
else
flash[:alert] = "Target update failed: #{@target.errors.full_messages.join('. ')}."
flash[:error] = "Target update failed: #{@target.errors.full_messages.join('. ')}."
render :edit
end
end
@ -40,7 +40,7 @@ module Admin
notice: 'Target successfully destroyed.')
else
redirect_to(admin_conference_targets_path(conference_id: @conference.short_title),
alert: 'Target was successfully destroyed.' \
error: 'Target was successfully destroyed.' \
"#{@target.errors.full_messages.join('. ')}.")
end
end

View file

@ -17,7 +17,7 @@ module Admin
redirect_to(admin_conference_tickets_path(conference_id: @conference.short_title),
notice: 'Ticket successfully created.')
else
flash[:alert] = "Creating Ticket failed: #{@ticket.errors.full_messages.join('. ')}."
flash[:error] = "Creating Ticket failed: #{@ticket.errors.full_messages.join('. ')}."
render :new
end
end
@ -29,7 +29,7 @@ module Admin
redirect_to(admin_conference_tickets_path(conference_id: @conference.short_title),
notice: 'Ticket successfully updated.')
else
flash[:alert] = "Ticket update failed: #{@ticket.errors.full_messages.join('. ')}."
flash[:error] = "Ticket update failed: #{@ticket.errors.full_messages.join('. ')}."
render :edit
end
end
@ -40,7 +40,7 @@ module Admin
notice: 'Ticket successfully destroyed.')
else
redirect_to(admin_conference_tickets_path(conference_id: @conference.short_title),
alert: 'Ticket was successfully destroyed.' \
error: 'Ticket was successfully destroyed.' \
"#{@ticket.errors.full_messages.join('. ')}.")
end
end

View file

@ -22,7 +22,7 @@ module Admin
redirect_to(admin_conference_tracks_path(conference_id: @conference.short_title),
notice: 'Track successfully created.')
else
flash[:alert] = "Creating Track failed: #{@track.errors.full_messages.join('. ')}."
flash[:error] = "Creating Track failed: #{@track.errors.full_messages.join('. ')}."
render :new
end
end
@ -34,7 +34,7 @@ module Admin
redirect_to(admin_conference_tracks_path(conference_id: @conference.short_title),
notice: 'Track successfully updated.')
else
flash[:alert] = "Track update failed: #{@track.errors.full_messages.join('. ')}."
flash[:error] = "Track update failed: #{@track.errors.full_messages.join('. ')}."
render :edit
end
end
@ -45,7 +45,7 @@ module Admin
notice: 'Track successfully deleted.')
else
redirect_to(admin_conference_tracks_path(conference_id: @conference.short_title),
alert: 'Track couldn\'t be deleted.' \
error: 'Track couldn\'t be deleted.' \
"#{@track.errors.full_messages.join('. ')}.")
end
end

View file

@ -36,7 +36,7 @@ module Admin
if @venue.destroy
redirect_to admin_conference_venue_path, notice: 'Venue was successfully deleted.'
else
redirect_to admin_conference_venue_path, alert: 'A error prohibited this Venue from being destroyed: '\
redirect_to admin_conference_venue_path, alert: 'An error prohibited this Venue from being destroyed: '\
"#{@venue.errors.full_messages.join('. ')}."
end
end

View file

@ -18,7 +18,7 @@ class CommercialsController < ApplicationController
redirect_to edit_conference_proposal_path(conference_id: @conference.short_title, id: @event.id),
notice: 'Commercial was successfully created.'
else
flash[:alert] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
flash[:error] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
render :new
end
end
@ -28,7 +28,7 @@ class CommercialsController < ApplicationController
redirect_to edit_conference_proposal_path(conference_id: @conference.short_title, id: @event.id),
notice: 'Commercial was successfully updated.'
else
flash[:alert] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
flash[:error] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
render :edit
end
end

View file

@ -34,7 +34,7 @@ class ConferenceRegistrationsController < ApplicationController
notice: 'You are now registered and will be receiving E-Mail notifications.'
end
else
flash[:alert] = "A error prohibited the registration for #{@conference.title}: "\
flash[:error] = "An error prohibited the registration for #{@conference.title}: "\
"#{@registration.errors.full_messages.join('. ')}."
render :new
end
@ -45,7 +45,7 @@ class ConferenceRegistrationsController < ApplicationController
redirect_to conference_conference_registrations_path(@conference.short_title),
notice: 'Registration was successfully updated.'
else
flash[:alert] = "A error prohibited the registration for #{@conference.title}: "\
flash[:error] = "An error prohibited the registration for #{@conference.title}: "\
"#{@registration.errors.full_messages.join('. ')}."
render :edit
end
@ -57,7 +57,7 @@ class ConferenceRegistrationsController < ApplicationController
notice: "You are not registered for #{@conference.title} anymore!"
else
redirect_to root_path,
alert: "A error prohibited deleting the registration for #{@conference.title}: "\
error: "An error prohibited deleting the registration for #{@conference.title}: "\
"#{@registration.errors.full_messages.join('. ')}."
end
end

View file

@ -16,7 +16,7 @@ class UsersController < ApplicationController
if @user.update(user_params)
redirect_to @user, notice: 'User was successfully updated.'
else
flash[:error] = "A error prohibited your Profile from being saved: #{@user.errors.full_messages.join('. ')}."
flash[:error] = "An error prohibited your Profile from being saved: #{@user.errors.full_messages.join('. ')}."
render :edit
end
end

View file

@ -5,6 +5,8 @@ class Track < ActiveRecord::Base
before_create :generate_guid
validates :name, presence: true
private
def generate_guid

View file

@ -1,9 +1,9 @@
.row
.col-md-12
.page-header
-if @sponsor.new_record?
New
%h1
-if @sponsor.new_record?
New
Sponsor
= @sponsor.name
.row
@ -16,4 +16,4 @@
= f.input :website_url
= f.input :sponsorship_level, collection: @conference.sponsorship_levels
%p.text-right
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -18,7 +18,7 @@ feature Campaign do
click_button 'Create Campaign'
expect(flash).
to eq("Creating of Campaign for osc14 failed.Name can't be blank. Utm campaign can't be blank.")
to eq("Campaign creation failed. Name can't be blank and Utm campaign can't be blank")
fill_in 'campaign_name', with: 'Test Campaign'
fill_in 'campaign_utm_campaign', with: 'campaign'

View file

@ -17,7 +17,7 @@ feature RegistrationPeriod do
click_button 'Save Registration Period'
expect(flash).
to eq('A error prohibited the Registration Period from being saved: ' \
to eq('An error prohibited the Registration Period from being saved: ' \
"Start date can't be blank. End date can't be blank.")
page.