Merge branch 'master' into csv-bug
This commit is contained in:
commit
c7550e9851
30 changed files with 108 additions and 16 deletions
BIN
app/assets/fonts/mastodon.eot
Executable file
BIN
app/assets/fonts/mastodon.eot
Executable file
Binary file not shown.
BIN
app/assets/fonts/mastodon.otf
Executable file
BIN
app/assets/fonts/mastodon.otf
Executable file
Binary file not shown.
14
app/assets/fonts/mastodon.svg
Executable file
14
app/assets/fonts/mastodon.svg
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Copyright (C) 2017 by original authors @ fontello.com</metadata>
|
||||
<defs>
|
||||
<font id="mastodon" horiz-adv-x="1000" >
|
||||
<font-face font-family="mastodon" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
|
||||
<missing-glyph horiz-adv-x="1000" />
|
||||
<glyph glyph-name="logo" unicode="" d="M947 251c-14-71-123-148-248-163-66-8-130-15-199-12-112 5-200 27-200 27 0-11 0-21 2-31 14-111 109-118 200-121 91-3 172 23 172 23l3-83c0 0-63-34-177-40-62-3-140 2-230 25-197 52-230 262-235 474-2 63-1 122-1 172 0 217 142 280 142 280 72 33 195 47 323 48l3 0c128-1 251-15 322-48 0 0 142-63 142-280 0 0 2-160-19-271m-148 254l0-263-104 0 0 255c0 54-23 81-68 81-50 0-75-32-75-96l0-140-104 0 0 140c0 64-25 96-75 96-45 0-68-27-68-81l0-255-104 0 0 263c0 54 14 96 41 128 29 31 66 48 112 48 53 0 93-21 120-62l26-43 26 43c27 41 67 62 120 62 46 0 83-17 112-48 27-32 41-74 41-128" horiz-adv-x="1000" />
|
||||
|
||||
<glyph glyph-name="logo_alt" unicode="" d="M945 251c-14-71-122-148-247-163-65-8-129-15-198-12-112 5-200 27-200 27 0-11 1-22 2-31 15-111 110-118 199-121 91-3 172 23 172 23l4-83c0 0-64-34-177-40-62-4-139 1-230 25-195 52-229 262-234 474-1 63 0 122 0 172 0 217 141 280 141 280 72 33 194 47 322 48l3 0c127-1 250-15 321-48 0 0 142-63 142-280 0 0 2-160-20-271m-628 183c0-39-31-70-70-70-38 0-70 31-70 70 0 39 32 71 70 71 39 0 70-32 70-71m253 0c0-39-31-70-70-70-39 0-70 31-70 70 0 39 31 71 70 71 39 0 70-32 70-71m253 0c0-39-32-70-70-70-39 0-70 31-70 70 0 39 31 71 70 71 38 0 70-32 70-71" horiz-adv-x="1000" />
|
||||
</font>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
BIN
app/assets/fonts/mastodon.ttf
Executable file
BIN
app/assets/fonts/mastodon.ttf
Executable file
Binary file not shown.
BIN
app/assets/fonts/mastodon.woff
Executable file
BIN
app/assets/fonts/mastodon.woff
Executable file
Binary file not shown.
|
|
@ -18,4 +18,5 @@
|
|||
*= require osem-navbar
|
||||
*= require selectize
|
||||
*= require selectize.bootstrap3
|
||||
*= require mastodon
|
||||
*/
|
||||
|
|
|
|||
45
app/assets/stylesheets/mastodon.scss
Executable file
45
app/assets/stylesheets/mastodon.scss
Executable file
|
|
@ -0,0 +1,45 @@
|
|||
@font-face {
|
||||
font-family: 'mastodon';
|
||||
src: font-url('mastodon.eot');
|
||||
src: local('☺'),
|
||||
font-url('mastodon.otf') format('opentype'),
|
||||
font-url('mastodon.woff') format('woff'),
|
||||
font-url('mastodon.ttf') format('truetype'),
|
||||
font-url('mastodon.svg') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
[class^="icon-"]:before, [class*=" icon-"]:before {
|
||||
font-family: "mastodon";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
speak: none;
|
||||
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
width: 1em;
|
||||
margin-right: .2em;
|
||||
text-align: center;
|
||||
/* opacity: .8; */
|
||||
|
||||
/* For safety - reset parent styles, that can break glyph codes*/
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
|
||||
/* fix buttons height, for twitter bootstrap */
|
||||
line-height: 1em;
|
||||
|
||||
/* you can be more comfortable with increased icons size */
|
||||
/* font-size: 120%; */
|
||||
|
||||
/* Font smoothing. That was taken from TWBS */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Uncomment for 3D effect */
|
||||
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
|
||||
}
|
||||
|
||||
.icon-mastodon:before { content: '\e800'; } /* '' */
|
||||
.icon-mastodon_alt:before { content: '\e801'; } /* '' */
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
@import "breakpoints.css.scss";
|
||||
@import "breakpoints.scss";
|
||||
|
||||
.dashbox span.fa {
|
||||
line-height: 1.1em;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
@import "breakpoints.css.scss";
|
||||
@import "breakpoints.scss";
|
||||
.nav-osem {
|
||||
border: none;
|
||||
@include breakpoint(xs) {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
@import "breakpoints.css.scss";
|
||||
@import "breakpoints.scss";
|
||||
|
||||
#splash {
|
||||
// Counter the general padding for #content
|
||||
|
|
@ -22,7 +22,7 @@ module Admin
|
|||
|
||||
# Only allow a trusted parameter "white list" through.
|
||||
def contact_params
|
||||
params.require(:contact).permit(:social_tag, :email, :facebook, :googleplus, :twitter, :instagram, :public, :sponsor_email)
|
||||
params.require(:contact).permit(:social_tag, :email, :facebook, :googleplus, :twitter, :instagram, :mastodon, :public, :sponsor_email)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -595,11 +595,11 @@ class Conference < ApplicationRecord
|
|||
# * +ActiveRecord+
|
||||
def self.get_active_conferences_for_dashboard
|
||||
result = Conference.where('start_date > ?', Time.now)
|
||||
.select('id, short_title, color, start_date')
|
||||
.select('id, short_title, color, start_date, organization_id')
|
||||
|
||||
if result.empty?
|
||||
result = Conference
|
||||
.select('id, short_title, color, start_date').limit(2)
|
||||
.select('id, short_title, color, start_date, organization_id').limit(2)
|
||||
.order(start_date: :desc)
|
||||
end
|
||||
result
|
||||
|
|
@ -611,7 +611,7 @@ class Conference < ApplicationRecord
|
|||
# ====Returns
|
||||
# * +ActiveRecord+
|
||||
def self.get_conferences_without_active_for_dashboard(active_conferences)
|
||||
result = Conference.select('id, short_title, color, start_date').order(start_date: :desc)
|
||||
result = Conference.select('id, short_title, color, start_date, organization_id').order(start_date: :desc)
|
||||
result - active_conferences
|
||||
end
|
||||
|
||||
|
|
@ -719,7 +719,7 @@ class Conference < ApplicationRecord
|
|||
# * +True+ -> If the registration limit has been reached or exceeded
|
||||
# * +False+ -> If the registration limit hasn't been exceeded
|
||||
def registration_limit_exceeded?
|
||||
registration_limit > 0 && registrations.count + program.speakers.confirmed.count - program.speakers.confirmed.registered(program.conference).count >= registration_limit
|
||||
registration_limit > 0 && registrations.count + program.speakers.confirmed.unregistered(program.conference).count >= registration_limit
|
||||
end
|
||||
|
||||
# Returns an hexadecimal color given a collection. The returned color changed
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ class Contact < ApplicationRecord
|
|||
|
||||
validates :conference, presence: true
|
||||
# Conferences only have one contact
|
||||
validates :facebook, :twitter, :googleplus, :instagram,
|
||||
validates :facebook, :twitter, :googleplus, :instagram, :mastodon,
|
||||
format: URI::regexp(%w(http https)), allow_blank: true
|
||||
|
||||
def has_social_media?
|
||||
return true if facebook.present? || twitter.present? || googleplus.present? || instagram.present? || email.present?
|
||||
return true if facebook.present? || twitter.present? || googleplus.present? || instagram.present? || mastodon.present? || email.present?
|
||||
false
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -51,6 +51,10 @@ class Program < ApplicationRecord
|
|||
def registered(conference)
|
||||
joins(:registrations).where('registrations.conference_id = ?', conference.id)
|
||||
end
|
||||
|
||||
def unregistered(conference)
|
||||
self - registered(conference)
|
||||
end
|
||||
end
|
||||
|
||||
accepts_nested_attributes_for :event_types, allow_destroy: true
|
||||
|
|
|
|||
|
|
@ -16,4 +16,5 @@
|
|||
= f.input :googleplus, label: 'Google+ Url', hint: 'This will appear in the social media section as the link to the Google+ Page of your Conference'
|
||||
= f.input :twitter, hint: 'This will appear in the social media section as the link to the Twitter Page of your Conference'
|
||||
= f.input :instagram, hint: 'This will appear in the social media section as the link to the Instagram Page of your Conference'
|
||||
= f.input :mastodon, hint: 'This will appear in the social media section as the link to the Mastodon Page of your Conference'
|
||||
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
.row
|
||||
.col-md-6
|
||||
- if @conference.venue.location?
|
||||
= render '/conferences/venue_map'
|
||||
= render '/conferences/venue_map', venue: @conference.venue
|
||||
-else
|
||||
- if @venue.commercial.nil?
|
||||
.row
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
= image_tag(@booth.picture.thumb.url, size: '20%', alt: '')
|
||||
= @booth.title
|
||||
.btn-group.pull-right
|
||||
= link_to 'Edit', edit_admin_conference_booth_path(@conference.short_title, @booth), class: 'btn btn-mini btn-primary'
|
||||
= link_to 'Edit', edit_conference_booth_path(@conference.short_title, @booth), class: 'btn btn-mini btn-primary'
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
|
|
|
|||
|
|
@ -23,5 +23,5 @@
|
|||
left!
|
||||
%p.cta-button
|
||||
= link_to "Submit your proposal now",
|
||||
conference_program_proposals_path(conference_id),
|
||||
new_conference_program_proposal_path(conference_id),
|
||||
class: 'btn btn-success btn-lg text-center'
|
||||
|
|
|
|||
|
|
@ -15,5 +15,5 @@
|
|||
left!
|
||||
%p.cta-button
|
||||
= link_to("Submit your request for track",
|
||||
conference_program_tracks_path(conference_id),
|
||||
new_conference_program_track_path(conference_id),
|
||||
class: 'btn btn-success btn-lg text-center')
|
||||
|
|
|
|||
21
app/views/conferences/_social_media.html.haml
Normal file
21
app/views/conferences/_social_media.html.haml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
.container
|
||||
.row
|
||||
.col-md-12.text-center
|
||||
- unless @conference.contact.facebook.blank?
|
||||
= link_to "#{ @conference.contact.facebook }" do
|
||||
%i.fa.fa-facebook-square.fa-4x
|
||||
- unless @conference.contact.twitter.blank?
|
||||
= link_to "#{ @conference.contact.twitter }" do
|
||||
%i.fa.fa-twitter.fa-4x
|
||||
- unless @conference.contact.instagram.blank?
|
||||
= link_to "#{ @conference.contact.instagram }" do
|
||||
%i.fa.fa-instagram.fa-4x
|
||||
- unless @conference.contact.googleplus.blank?
|
||||
= link_to "#{ @conference.contact.googleplus }" do
|
||||
%i.fa.fa-google-plus-square.fa-4x
|
||||
- unless @conference.contact.mastodon.blank?
|
||||
= link_to "#{ @conference.contact.mastodon }" do
|
||||
%i.fa.icon-mastodon.fa-4x
|
||||
- unless @conference.contact.email.blank?
|
||||
= mail_to "#{ @conference.contact.email }" do
|
||||
%i.fa.fa-envelope-o.fa-4x
|
||||
5
db/migrate/20171201163628_add_mastodon_to_contact.rb
Normal file
5
db/migrate/20171201163628_add_mastodon_to_contact.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class AddMastodonToContact < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :contacts, :mastodon, :string
|
||||
end
|
||||
end
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20171130172334) do
|
||||
ActiveRecord::Schema.define(version: 20171201163628) do
|
||||
|
||||
create_table "ahoy_events", force: :cascade do |t|
|
||||
t.integer "visit_id"
|
||||
|
|
@ -145,6 +145,7 @@ ActiveRecord::Schema.define(version: 20171130172334) do
|
|||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "sponsor_email"
|
||||
t.string "mastodon"
|
||||
end
|
||||
|
||||
create_table "delayed_jobs", force: :cascade do |t|
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ SECRET_KEY_BASE=changemechangemechangeme"
|
|||
OSEM_EMAIL_ADDRESS="osem@mailhog"
|
||||
OSEM_SMTP_AUTHENTICATION="login"
|
||||
OSEM_SMTP_ADDRESS="mailhog"
|
||||
OSEM_SMTP_PORT="1025"
|
||||
OSEM_SMTP_PORT=1025
|
||||
OSEM_SMTP_USERNAME="mailhog"
|
||||
OSEM_SMTP_PASSWORD="mailhog"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue