mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
fixing mobile styles
This commit is contained in:
parent
554722162e
commit
14e3d75848
5 changed files with 18 additions and 10 deletions
|
|
@ -11,6 +11,14 @@
|
|||
}
|
||||
|
||||
.indicator-container {
|
||||
&.centered {
|
||||
margin-top: -3px;
|
||||
|
||||
.indicator-circle {
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.indicator {
|
||||
padding-top: 6px;
|
||||
height: 90px;
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ class AttemptsController < ApplicationController
|
|||
|
||||
response_count = Attempt.for_question(attempt.question).for_school(recipient.school).with_response.count
|
||||
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
|
||||
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
|
||||
response_message << school_category_url(attempt.recipient.school, attempt.question.category)
|
||||
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@
|
|||
|
||||
%p= @category.description
|
||||
%p
|
||||
%b Total Responses:
|
||||
%b Total Responses:
|
||||
= number_with_delimiter(@school_category.response_count)
|
||||
|
||||
|
||||
|
||||
%b Average Response:
|
||||
%b Average Response:
|
||||
= @school_category.answer_index_average.round(1)
|
||||
(out of 5)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
- aggregated_responses = question.aggregated_responses_for_school(@school)
|
||||
- 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}"}
|
||||
%p.question-text.pt-3.px-2
|
||||
= question.text
|
||||
|
||||
.pb-3.px-2
|
||||
.indicator-container.float-left
|
||||
.row.pt-2
|
||||
.col-4.indicator-container.centered
|
||||
= render 'school_categories/indicator', info: aggregated_responses, small: true
|
||||
|
||||
.pl-3.pt-1.float-left
|
||||
.col-8
|
||||
%p
|
||||
%b Total Responses:
|
||||
= aggregated_responses.count
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ RSpec.describe AttemptsController, type: :controller do
|
|||
end
|
||||
|
||||
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
|
||||
|
||||
context "with second response" do
|
||||
|
|
@ -90,7 +90,7 @@ RSpec.describe AttemptsController, type: :controller do
|
|||
end
|
||||
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue