Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Commit

Permalink
Merge branch 'release/v17'
Browse files Browse the repository at this point in the history
Conflicts:
	app/assets/javascripts/admin/custom.js.coffee
	app/views/layouts/web/shared/_sponsors.html.haml
	app/views/web/admin/lectures/_form.html.haml
	config/locales/activerecord.yml
  • Loading branch information
PanfilovDenis committed Mar 27, 2013
2 parents 22af992 + 7f69164 commit f7fad36
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 4 deletions.
12 changes: 12 additions & 0 deletions app/assets/javascripts/admin/custom.js.coffee
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
window.onload = ->
delay = (ms, func) -> setTimeout func, ms
delay 4000, -> $('.alert').fadeOut('slow')

# take user edit link

changeUserEditLink = (id) ->
$("#lector-name").attr({href: "/admin/users/" + id + "/edit"})

$(document).ready ->
user_id = $("#lecture_user_id option:selected").attr("value")
changeUserEditLink(user_id)

$("#lecture_user_id").on "change", (e) ->
changeUserEditLink(e.val)
2 changes: 1 addition & 1 deletion app/assets/stylesheets/custom/_areas.scss
Original file line number Diff line number Diff line change
Expand Up @@ -249,4 +249,4 @@ $i : $min_speech_time;
background-color: #d4724b;
color: #fff;
}
}
}
6 changes: 6 additions & 0 deletions app/assets/stylesheets/custom/_sponsors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
.sponsors {
margin-bottom: 20px;
overflow: hidden;
a {
text-decoration: none;
&:hover {
text-decoration: none;
}
}
}
.sponsors h4 {
font-size: 24px;
Expand Down
3 changes: 3 additions & 0 deletions app/controllers/web/users_controller.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
class Web::UsersController < Web::ApplicationController
respond_to :html, :json

def index
@search = User.ransack(params)
@users = @search.result.activated.shown_as_participants.alphabetically

respond_with(@users)
end

def new
Expand Down
16 changes: 13 additions & 3 deletions app/views/layouts/web/shared/_sponsors.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
%img.rocid{:src => "/images/logo-rocid.png", :width => 150, :height => 53, :alt => "ROCID"}
%a{:href => "http://in-numbers.ru/", :target => "_blank"}
%img{:src => "/images/logo-innumbers.png", :width => 150, :height => 36, :alt => "inNumbers"}
%a{:href => "http://www.kp.ru/", :target => "_blank"}
%img{:src => "/images/logo-kp.png", :width => 58, :height => 60, :alt => "Комсомольская правда"}
%a{:href => "http://ultop.ru/", :target => "_blank"}
%img{:src => "/images/logo-ultop.jpg", :width => 160, :height => 40, :alt => "Ultop"}
%a{:href => "http://weblancer.net/", :target => "_blank"}
Expand All @@ -58,10 +60,10 @@
%img{:src => "/images/logo-hackday.jpg", :width => 178, :height => 54, :alt => "Hackday"}
%a{:href => "http://www.cnews.ru/", :target => "_blank"}
%img{:src => "/images/logo-cnews.jpg", :width => 144, :height => 54, :alt => "Cnews"}
%a{:href => "http://ul-people.ru/", :target => "_blank"}
%img.ulpeople{:src => "/images/logo-ulpeople.jpg", :width => 160, :height => 36, :alt => "ul-people"}
%a{:href => "http://rubyjobs.ru/", :target => "_blank"}
%img.rubyjobs{:src => "/images/logo-rubyjobs.png", :width => 77, :height => 67, :alt => "RubyJobs"}
%a{:href => "http://ul-people.ru/", :target => "_blank"}
%img.ulpeople{:src => "/images/logo-ulpeople.jpg", :width => 160, :height => 36, :alt => "ul-people"}
%a{:href => "http://softline.ru/", :target => "_blank"}
%img{:src => "/images/logo-softline.png", :width => 143, :height => 28, :alt => "SoftLine"}
%a{:href => "http://www.allintop.ru/", :target => "_blank"}
Expand All @@ -74,7 +76,7 @@
%img{:src => "/images/logo-dailycomm.jpeg", :width => 180, :height => 54, :alt => "DailyComm"}

.right-column
%h4 Генеральный партнер
%h4 Генеральный спонсор
.star-sponsors
.item
%a{:href => "http://undev.ru/", :target => "_blank"}
Expand All @@ -92,6 +94,11 @@
%img{:src => "/images/sponsor-aviasales.jpg", :width => 198, :height => 66, :alt => "Aviasales"}
%sup
%i.sponsor-star.argentum
.item
%a{:href => "http://sd-praktika.ru/", :target => "_blank"}
%img{:src => "/images/logo-sysdoc.png", :width => 190, :height => 59, :alt => "Системы документооборота"}
%sup
%i.sponsor-star.argentum
.legend
%i.sponsor-star.argentum
— серебряный спонсор
Expand Down Expand Up @@ -129,6 +136,9 @@
.item
%a{:href => "http://www.i-association.ru/", :target => "_blank"}
%img{:src => "/images/logo-aia.png", :width => 180, :height => 62, :alt => "Ассоциация интерактивных агенств"}
.item
%a{:href => "http://netcat.ru/", :target => "_blank"}
%img{:src => "/images/logo-netcat.png", :width => 180, :height => 40, :alt => "Netcat"}

.legend
%i.sponsor-star.red
Expand Down
6 changes: 6 additions & 0 deletions app/views/web/admin/lectures/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
= f.input :thesises, input_html: { class: 'span7' }
= f.association :workshop, as: :chosen_select, input_html: { class: 'span7 span-nomargin' }
= f.association :user, collection: User.asc_by_last_name, as: :chosen_select, input_html: { class: 'span7 span-nomargin' }

.control-group
.controls
%a#lector-name{target: '_blank'}
Редактировать профиль докладчика

= f.input :presentation, as: :file_download

.form-actions
Expand Down
1 change: 1 addition & 0 deletions app/views/web/users/index.json.jbuilder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
json.users(@users, :first_name, :last_name, :city, :company, :position, :created_at )
Binary file added public/images/logo-kp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/logo-netcat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/logo-sysdoc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions test/functional/web/users_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ class Web::UsersControllerTest < ActionController::TestCase
assert_response :success
end

test "should get index json" do
get :index, format: :json

assert_response :success
end

test "should get new" do
get :new

Expand Down

0 comments on commit f7fad36

Please sign in to comment.