fixing mobile styles

pull/1/head
Jared Cosulich 9 years ago
parent 554722162e
commit 14e3d75848

@ -11,6 +11,14 @@
} }
.indicator-container { .indicator-container {
&.centered {
margin-top: -3px;
.indicator-circle {
margin: auto;
}
}
.indicator { .indicator {
padding-top: 6px; padding-top: 6px;
height: 90px; height: 90px;

@ -23,9 +23,9 @@ class AttemptsController < ApplicationController
response_count = Attempt.for_question(attempt.question).for_school(recipient.school).with_response.count response_count = Attempt.for_question(attempt.question).for_school(recipient.school).with_response.count
if response_count > 1 if response_count > 1
response_message << "#{response_count} people have responded to this question so far. To see all responses visit" response_message << "#{response_count} people have responded to this question so far. To see all responses visit:"
else else
response_message << 'You are the first person to respond to this question. Once more people have responded you will be able to see all responses at' response_message << 'You are the first person to respond to this question. Once more people have responded you will be able to see all responses at:'
end end
response_message << school_category_url(attempt.recipient.school, attempt.question.category) response_message << school_category_url(attempt.recipient.school, attempt.question.category)

@ -13,12 +13,12 @@
%p= @category.description %p= @category.description
%p %p
%b Total Responses: %b Total&nbsp;Responses:
= number_with_delimiter(@school_category.response_count) = number_with_delimiter(@school_category.response_count)
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
%b Average Response: %b Average&nbsp;Response:
= @school_category.answer_index_average.round(1) = @school_category.answer_index_average.round(1)
(out of 5) (out of 5)

@ -1,16 +1,16 @@
- aggregated_responses = question.aggregated_responses_for_school(@school) - aggregated_responses = question.aggregated_responses_for_school(@school)
- return if aggregated_responses.nil? - return if aggregated_responses.nil?
.col-12.col-sm-6.py-3 .col-12.col-md-6.py-3
.question.p-2{id: "question-#{question.id}"} .question.p-2{id: "question-#{question.id}"}
%p.question-text.pt-3.px-2 %p.question-text.pt-3.px-2
= question.text = question.text
.pb-3.px-2 .row.pt-2
.indicator-container.float-left .col-4.indicator-container.centered
= render 'school_categories/indicator', info: aggregated_responses, small: true = render 'school_categories/indicator', info: aggregated_responses, small: true
.pl-3.pt-1.float-left .col-8
%p %p
%b Total Responses: %b Total Responses:
= aggregated_responses.count = aggregated_responses.count

@ -66,7 +66,7 @@ RSpec.describe AttemptsController, type: :controller do
end end
it "sends back a message" do it "sends back a message" do
expect(response.body).to eq "We've registered your response of \"Option 0:1 C\". You are the first person to respond to this question. Once more people have responded you will be able to see all responses at http://test.host/schools/school/categories/category" expect(response.body).to eq "We've registered your response of \"Option 0:1 C\". You are the first person to respond to this question. Once more people have responded you will be able to see all responses at: http://test.host/schools/school/categories/category"
end end
context "with second response" do context "with second response" do
@ -90,7 +90,7 @@ RSpec.describe AttemptsController, type: :controller do
end end
it "sends back a message" do it "sends back a message" do
expect(response.body).to eq "We've registered your response of \"Option 0:1 D\". 2 people have responded to this question so far. To see all responses visit http://test.host/schools/school/categories/category" expect(response.body).to eq "We've registered your response of \"Option 0:1 D\". 2 people have responded to this question so far. To see all responses visit: http://test.host/schools/school/categories/category"
end end
end end
end end

Loading…
Cancel
Save