Merge branch 'master' of github.com:ignisf/clarion
This commit is contained in:
commit
00daee68cf
2
Gemfile
2
Gemfile
|
@ -20,12 +20,14 @@ gem 'devise'
|
||||||
gem 'devise-i18n'
|
gem 'devise-i18n'
|
||||||
|
|
||||||
gem 'simple_form'
|
gem 'simple_form'
|
||||||
|
gem 'simple_form_fancy_uploads', github: 'apeacox/simple_form_fancy_uploads'
|
||||||
|
|
||||||
# Phone validation
|
# Phone validation
|
||||||
gem 'phony_rails'
|
gem 'phony_rails'
|
||||||
|
|
||||||
# Picture uploads
|
# Picture uploads
|
||||||
gem 'carrierwave'
|
gem 'carrierwave'
|
||||||
|
gem 'rmagick'
|
||||||
|
|
||||||
gem 'capistrano'
|
gem 'capistrano'
|
||||||
gem 'capistrano-rails'
|
gem 'capistrano-rails'
|
||||||
|
|
12
Gemfile.lock
12
Gemfile.lock
|
@ -1,3 +1,12 @@
|
||||||
|
GIT
|
||||||
|
remote: git://github.com/apeacox/simple_form_fancy_uploads.git
|
||||||
|
revision: a135aad8f17cbf219a30ce5a30709406e277f7e0
|
||||||
|
specs:
|
||||||
|
simple_form_fancy_uploads (0.1.0)
|
||||||
|
carrierwave
|
||||||
|
rails (>= 4.0.0)
|
||||||
|
simple_form (~> 3.0)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
|
@ -167,6 +176,7 @@ GEM
|
||||||
rb-inotify (0.9.5)
|
rb-inotify (0.9.5)
|
||||||
ffi (>= 0.5.0)
|
ffi (>= 0.5.0)
|
||||||
ref (1.0.5)
|
ref (1.0.5)
|
||||||
|
rmagick (2.13.3)
|
||||||
rspec (3.0.0)
|
rspec (3.0.0)
|
||||||
rspec-core (~> 3.0.0)
|
rspec-core (~> 3.0.0)
|
||||||
rspec-expectations (~> 3.0.0)
|
rspec-expectations (~> 3.0.0)
|
||||||
|
@ -266,9 +276,11 @@ DEPENDENCIES
|
||||||
rails (= 4.1.5)
|
rails (= 4.1.5)
|
||||||
rails-erd
|
rails-erd
|
||||||
rails-i18n
|
rails-i18n
|
||||||
|
rmagick
|
||||||
rspec-rails
|
rspec-rails
|
||||||
sass-rails (~> 4.0.3)
|
sass-rails (~> 4.0.3)
|
||||||
simple_form
|
simple_form
|
||||||
|
simple_form_fancy_uploads!
|
||||||
slim-rails
|
slim-rails
|
||||||
spring
|
spring
|
||||||
spring-commands-rspec
|
spring-commands-rspec
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
.lecture-title {
|
||||||
|
font-family: Arial,sans-serif;
|
||||||
|
font-size: 26px;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 26px;
|
||||||
|
padding: 0px 0px 7px;
|
||||||
|
font-style: italic;
|
||||||
|
|
||||||
|
span.subtitle {
|
||||||
|
font-size: 18px;
|
||||||
|
font-style: italic;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.abstract, .description {
|
||||||
|
h3 {
|
||||||
|
font-family: Arial,sans-serif;
|
||||||
|
margin-top: 14px;
|
||||||
|
font-size: 21px;
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
text-indent: 10px;
|
||||||
|
margin-top: 0px;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
padding: 0;
|
||||||
|
width: 600px;
|
||||||
|
}
|
||||||
|
|
||||||
|
p:last-of-type {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
}
|
|
@ -16,14 +16,34 @@
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input input, .input textarea, .input select {
|
.input {
|
||||||
|
input.string, input.email, input.password, select.select, input.numeric {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
width: 20em;
|
width: 20em;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input textarea {
|
textarea {
|
||||||
height: 8em;
|
height: 15em;
|
||||||
|
width: 50em;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
padding: 5px;
|
||||||
|
display: block;
|
||||||
|
border: 1px solid #CCC;
|
||||||
|
background-color: #F1F1F1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
img+input.image_preview {
|
||||||
|
margin-left: 12.7em;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.input label.boolean {
|
||||||
|
margin-left: 12em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input .hint, .input .error {
|
.input .hint, .input .error {
|
||||||
|
@ -78,3 +98,43 @@
|
||||||
transform: translate(0, 0.1em);
|
transform: translate(0, 0.1em);
|
||||||
-webkit-transform: translate(0, 0.1em);
|
-webkit-transform: translate(0, 0.1em);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.centered {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.large {
|
||||||
|
padding: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-link {
|
||||||
|
background: #233e83;
|
||||||
|
padding: 0.4em 0.8em;
|
||||||
|
border-radius: 0.2em;
|
||||||
|
color: #FFF;
|
||||||
|
border: none;
|
||||||
|
border-bottom: 0.2em solid #7A95DC;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background 200ms, border 200ms, transform 200ms;
|
||||||
|
-webkit-transition: background 200ms, border 200ms, transform 200ms;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-link:link, .btn-link:active, .btn-link:visited {
|
||||||
|
color: #FFF;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-link:hover {
|
||||||
|
background: #152551;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-link:active {
|
||||||
|
background: #597AD2;
|
||||||
|
border-bottom: 0.2em solid #000;
|
||||||
|
transform: translate(0, 0.1em);
|
||||||
|
-webkit-transform: translate(0, 0.1em);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-link-large {
|
||||||
|
font-size: 2em;
|
||||||
|
}
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
# encoding: utf-8
|
|
||||||
|
|
||||||
class PictureUploader < CarrierWave::Uploader::Base
|
class PictureUploader < CarrierWave::Uploader::Base
|
||||||
|
|
||||||
# Include RMagick or MiniMagick support:
|
# Include RMagick or MiniMagick support:
|
||||||
# include CarrierWave::RMagick
|
include CarrierWave::RMagick
|
||||||
# include CarrierWave::MiniMagick
|
# include CarrierWave::MiniMagick
|
||||||
|
|
||||||
# Choose what kind of storage to use for this uploader:
|
# Choose what kind of storage to use for this uploader:
|
||||||
|
@ -32,15 +30,15 @@ class PictureUploader < CarrierWave::Uploader::Base
|
||||||
# end
|
# end
|
||||||
|
|
||||||
# Create different versions of your uploaded files:
|
# Create different versions of your uploaded files:
|
||||||
# version :thumb do
|
version :thumb do
|
||||||
# process :resize_to_fit => [50, 50]
|
process :resize_to_fit => [50, 50]
|
||||||
# end
|
end
|
||||||
|
|
||||||
# Add a white list of extensions which are allowed to be uploaded.
|
# Add a white list of extensions which are allowed to be uploaded.
|
||||||
# For images you might use something like this:
|
# For images you might use something like this:
|
||||||
# def extension_white_list
|
def extension_white_list
|
||||||
# %w(jpg jpeg gif png)
|
%w(jpg jpeg png)
|
||||||
# end
|
end
|
||||||
|
|
||||||
# Override the filename of the uploaded files:
|
# Override the filename of the uploaded files:
|
||||||
# Avoid using model.id or version_name here, see uploader/store.rb for details.
|
# Avoid using model.id or version_name here, see uploader/store.rb for details.
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
<p>Добре дошли, <%= @email %>!</p>
|
|
||||||
|
|
||||||
<p>Можете да потвърдите акаунта си като кликнете на линка отдолу:</p>
|
|
||||||
|
|
||||||
<p><%= link_to 'Потвърди акаунта ми', confirmation_url(@resource, confirmation_token: @token) %></p>
|
|
|
@ -1,8 +0,0 @@
|
||||||
<p>Здравейте, <%= @resource.email %>!</p>
|
|
||||||
|
|
||||||
<p>Някой поиска линк за промяна на парола на аканута Ви. Паролата може да бъде променена от линкът отдолу.</p>
|
|
||||||
|
|
||||||
<p><%= link_to 'Промяна на парола', edit_password_url(@resource, reset_password_token: @token) %></p>
|
|
||||||
|
|
||||||
<p>Ако не желаете да смените паролата си, моля изтрийте това писмо.</p>
|
|
||||||
<p>Паролата Ви няма да бъде променена докато не кликнете горния линк и не въведете нова парола.</p>
|
|
|
@ -1,4 +1,4 @@
|
||||||
>Здравейте, <%= @resource.email %>!
|
Здравейте, <%= @resource.email %>!
|
||||||
|
|
||||||
Някой поиска линк за промяна на парола на аканута Ви. Паролата може да бъде променена от линкът отдолу.
|
Някой поиска линк за промяна на парола на аканута Ви. Паролата може да бъде променена от линкът отдолу.
|
||||||
|
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
<p>Здравейте, <%= @resource.email %>!</p>
|
|
||||||
|
|
||||||
<p>Акаунтът Ви беше заключен поради голям брой неуспешни опити за влизане в него.</p>
|
|
||||||
|
|
||||||
<p>Кликнете линкът отдолу, за да го отключите:</p>
|
|
||||||
|
|
||||||
<p><%= link_to 'Отключване на акаунт', unlock_url(@resource, unlock_token: @token) %></p>
|
|
|
@ -1,10 +1,10 @@
|
||||||
= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
|
= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put, multipart: true }) do |f|
|
||||||
.form_inputs
|
.form_inputs
|
||||||
h2.entry-title Лекторски профил
|
h2.entry-title Лекторски профил
|
||||||
= f.error_notification
|
= f.error_notification
|
||||||
= f.simple_fields_for :speaker_profile do |ff|
|
= f.simple_fields_for :speaker_profile do |ff|
|
||||||
= ff.input :picture, as: :file
|
= ff.input :picture, as: :image_preview, input_html: {preview_version: :thumb}
|
||||||
= ff.input :first_name
|
= ff.input :first_name, autofocus: true
|
||||||
= ff.input :last_name
|
= ff.input :last_name
|
||||||
= ff.input :public_email
|
= ff.input :public_email
|
||||||
= ff.input :organisation
|
= ff.input :organisation
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
.form-inputs
|
.form-inputs
|
||||||
h3.entry-title Данни за вход в системата
|
h3.entry-title Данни за вход в системата
|
||||||
= f.input :email, required: true, autofocus: true
|
= f.input :email, required: true
|
||||||
|
|
||||||
- if devise_mapping.confirmable? && resource.pending_reconfirmation?
|
- if devise_mapping.confirmable? && resource.pending_reconfirmation?
|
||||||
p
|
p
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
h2.entry-title Вход
|
h2.entry-title Вход
|
||||||
|
|
||||||
= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
|
= simple_form_for(resource, as: resource_name, url: session_path(resource_name), ) do |f|
|
||||||
.form-inputs
|
.form-inputs
|
||||||
= f.input :email, required: false, autofocus: true, hint: false
|
= f.input :email, required: false, autofocus: true, hint: false
|
||||||
= f.input :password, required: false, hint: false
|
= f.input :password, required: false, hint: false
|
||||||
|
|
|
@ -9,7 +9,6 @@ ul
|
||||||
- for track in @current_conference.tracks
|
- for track in @current_conference.tracks
|
||||||
li = track.name
|
li = track.name
|
||||||
|
|
||||||
.centered
|
.centered.large
|
||||||
= link_to 'Предложи лекция', new_lecture_path
|
=> link_to 'Предложи лекция', new_lecture_path, class: 'btn-link btn-link-large'
|
||||||
|
= link_to 'Предложи уъркшоп', new_workshop_path, class: 'btn-link btn-link-large'
|
||||||
= link_to 'Предложи уъркшоп', new_workshop_path
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
li = link_to lecture.title, lecture
|
|
@ -1,7 +1,9 @@
|
||||||
h1.entry-title Моите предложения за лекции
|
h1.entry-title Моите предложения за лекции
|
||||||
|
|
||||||
|
- unless @lectures.empty?
|
||||||
ul
|
ul
|
||||||
- for lecture in @lectures
|
= render @lectures
|
||||||
li = link_to lecture.title, lecture
|
- else
|
||||||
|
p Все още не Сте предложили лекция
|
||||||
|
|
||||||
= link_to 'Предложи лекция', new_lecture_path
|
= link_to 'Предложи лекция', new_lecture_path, class: 'btn-link'
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
h1.entry-title Преглед на лекция
|
|
||||||
|
|
||||||
h2.lecture-title
|
h2.lecture-title
|
||||||
= @lecture.title
|
=> @lecture.title
|
||||||
span.subtitle = @lecture.subtitle
|
span.subtitle = @lecture.subtitle
|
||||||
.entry-meta
|
.entry-meta
|
||||||
|
|
|
|
||||||
|
@ -17,4 +15,4 @@ section.description
|
||||||
= simple_format @lecture.description
|
= simple_format @lecture.description
|
||||||
|
|
||||||
- if current_user == @lecture.user
|
- if current_user == @lecture.user
|
||||||
= link_to 'Редактирай', edit_lecture_path(@lecture)
|
= link_to 'Редактирай', edit_lecture_path(@lecture), class: 'btn-link'
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
li = link_to workshop.title, workshop
|
|
@ -1,7 +1,9 @@
|
||||||
h1.entry-title Моите предложения за уъркшопи
|
h1.entry-title Моите предложения за уъркшопи
|
||||||
|
|
||||||
|
- unless @workshops.empty?
|
||||||
ul
|
ul
|
||||||
- for workshop in @workshops
|
= render @workshops
|
||||||
li = link_to workshop.title, workshop
|
- else
|
||||||
|
p Все още не Сте предложили уъркшоп
|
||||||
|
|
||||||
= link_to 'Предложи уъркшоп', new_workshop_path
|
= link_to 'Предложи уъркшоп', new_workshop_path, class: 'btn-link'
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
h1.entry-title Преглед на уъркшоп
|
|
||||||
|
|
||||||
h2.workshop-title
|
h2.workshop-title
|
||||||
= @workshop.title
|
= @workshop.title
|
||||||
span.subtitle = @workshop.subtitle
|
span.subtitle = @workshop.subtitle
|
||||||
|
@ -17,4 +15,4 @@ section.description
|
||||||
= simple_format @workshop.description
|
= simple_format @workshop.description
|
||||||
|
|
||||||
- if current_user == @workshop.user
|
- if current_user == @workshop.user
|
||||||
= link_to 'Редактирай', edit_workshop_path(@workshop)
|
= link_to 'Редактирай', edit_workshop_path(@workshop), class: 'btn-link'
|
||||||
|
|
|
@ -26,7 +26,7 @@ set :deploy_to, '/home/barf/clarion'
|
||||||
set :linked_files, %w{config/puma.rb config/database.yml config/secrets.yml}
|
set :linked_files, %w{config/puma.rb config/database.yml config/secrets.yml}
|
||||||
|
|
||||||
# Default value for linked_dirs is []
|
# Default value for linked_dirs is []
|
||||||
set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}
|
set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system public/uploads}
|
||||||
|
|
||||||
# Default value for default_env is {}
|
# Default value for default_env is {}
|
||||||
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
|
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 974 B |
Loading…
Reference in New Issue