Skip to content

Commit

Permalink
Merge pull request #192 from ukparliament/development
Browse files Browse the repository at this point in the history
Development merge
  • Loading branch information
j-corry authored Nov 12, 2024
2 parents 1aeb41c + 9c84b2a commit bf311aa
Show file tree
Hide file tree
Showing 60 changed files with 93 additions and 87 deletions.
9 changes: 8 additions & 1 deletion app/assets/stylesheets/primary.css
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,13 @@ div.callout {
padding: 16px 0;
}

&.white-padded {
/*background: #EBEBEB;*/
/*border: 1px solid lightgrey*/
background: none;
padding: 16px;
}

&.white-slim {
background: none;
padding: 0;
Expand Down Expand Up @@ -423,7 +430,7 @@ table {
}

&.top-button-container {
margin: 48px 32px 32px 32px;
margin: 32px 16px 16px 16px;
}

.page-button {
Expand Down
3 changes: 1 addition & 2 deletions app/views/search/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@
of
<strong><%= number_to_delimited(@search_data.number_of_results, separator: ",") %></strong> in
<strong>
<%= "#{@search_data.query_time.round(3)} seconds" %>
(<%= "#{(Time.now - @start_time).round(3)} seconds" %>).
<%= "#{(Time.now - @start_time).round(3)} seconds" %>.
</strong>
</p>

Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/bill.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</section>

<% unless object.motion_text.blank? %>
<section id="main-content" class="content-section white">
<section id="main-content" class="content-section white-padded">
<div class="content-text">
<%= object.motion_text[:value] %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/deposited_paper.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<%= render 'search/preliminary_sentences/deposited_paper', object: object %>
</section>

<section id="main-content" class="content-section white">
<section id="main-content" class="content-section white-padded">
<% unless object.abstract_text.blank? %>
<div class="content-text">
<%= raw format_html(object.abstract_text[:value], false) %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/edm.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</section>

<% unless object.motion_text.blank? %>
<section id="main-content" class="content-section white">
<section id="main-content" class="content-section white-padded">
<div class="content-text">
<%= object.motion_text[:value] %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/formal_proceeding.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</section>

<% unless object.abstract_text.blank? %>
<section id="main-content" class="content-section white">
<section id="main-content" class="content-section white-padded">
<div class="content-text">
<%= object.abstract_text[:value] %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/ministerial_correction.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</section>

<% unless object.correction_text.blank? %>
<section id="main-content" class="content-section white">
<section id="main-content" class="content-section white-padded">
<div class="content-text">
<%= raw format_html(object.correction_text[:value], false) %>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</section>

<% unless object.content.blank? %>
<section id="main-content" class="content-section white">
<section id="main-content" class="content-section white-padded">
<div class="content-text">
<%= raw format_html(object.petition_text[:value], false) %>
</div>
Expand Down
4 changes: 2 additions & 2 deletions app/views/search/objects/oral_answer_to_question.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
</section>

<% unless object.answer_text.blank? %>
<section id="main-content" class="content-section white">
<section id="main-content" class="content-section white-padded">
<%= render 'search/fragments/answer', object: object %>
</section>
<% end %>
<% if object.has_question? %>
<%= render 'search/preliminary_sentences/oral_answer_question', object: object, question: @associated_object_data[object.question_id] %>
<section id="main-content" class="content-section white">
<section id="main-content" class="content-section white-padded">
<%= render 'search/fragments/question', object: @associated_object_data[object.question_id] %>
</section>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/oral_question.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<%= render object.prelim_partial, object: object %>
</section>

<section id="main-content" class="content-section white">
<section id="main-content" class="content-section white-padded">
<%= render 'search/fragments/question', object: object %>
<% unless object.answer_item_link.blank? %>
<%= render 'search/fragments/answer', object: @associated_object_data[object.answer_item_link] unless object.tabled? || object.withdrawn? %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</section>

<% unless object.content.blank? %>
<section id="main-content" class="content-section white">
<section id="main-content" class="content-section white-padded">
<div class="content-text">
<%= raw format_html(object.contribution_text[:value], false) %>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</section>

<% unless object.abstract_text.blank? %>
<section id="main-content" class="content-section white">
<section id="main-content" class="content-section white-padded">
<div class="content-text">
<%= object.abstract_text[:value] %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/paper_petition.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</section>

<% unless object.content.blank? %>
<section id="main-content" class="content-section white">
<section id="main-content" class="content-section white-padded">
<div class="content-text">
<%= raw format_html(object.content[:value], false) %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/paper_submitted.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</section>

<% unless object.abstract_text.blank? %>
<section id="main-content" class="content-section white">
<section id="main-content" class="content-section white-padded">
<div class="content-text">
<%= object.abstract_text[:value] %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/parliamentary_paper_laid.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</section>

<% unless object.abstract_text.blank? %>
<section id="main-content" class="content-section white">
<section id="main-content" class="content-section white-padded">
<div class="content-text">
<%= object.abstract_text[:value] %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/parliamentary_proceeding.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</section>

<% unless object.abstract_text.blank? %>
<section id="main-content" class="content-section white">
<section id="main-content" class="content-section white-padded">
<div class="content-text">
<%= raw format_html(object.abstract_text[:value], false) %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/proceeding_contribution.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</section>

<% unless object.content.blank? %>
<section id="main-content" class="content-section white">
<section id="main-content" class="content-section white-padded">
<div class="content-text">
<%= raw format_html(object.contribution_text[:value], false) %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/public_act.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</section>

<% unless object.long_title.blank? %>
<section id="main-content" class="content-section white">
<section id="main-content" class="content-section white-padded">
<div class="content-text">
<%= object.long_title[:value] %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/research_briefing.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</section>

<% unless object.main_content.blank? %>
<section id="main-content" class="content-section white">
<section id="main-content" class="content-section white-padded">
<div class="about-item">
<%= raw format_html(object.main_content[:value], false) %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/statutory_instrument.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</section>

<% unless object.abstract_text.blank? %>
<section id="main-content" class="content-section white">
<section id="main-content" class="content-section white-padded">
<div class="content-text">
<%= object.abstract_text[:value] %>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</section>

<% unless object.abstract_text.blank? %>
<section id="main-content" class="content-section white">
<section id="main-content" class="content-section white-padded">
<div class="content-text">
<%= object.abstract_text[:value] %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/written_question.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<%= render object.prelim_partial, object: object %>
</section>

<section id="main-content" class="content-section white">
<section id="main-content" class="content-section white-padded">
<%= render 'search/fragments/question', object: object %>
<%= render 'search/fragments/answer', object: object if object.answered? || object.answered_was_holding? %>
<%= render 'search/fragments/corrected_written_question_follow_up', correcting_object: @associated_object_data[object.correcting_item_link] if object.corrected? %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/objects/written_statement.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</section>

<% unless object.content.blank? %>
<section id="main-content" class="content-section white">
<section id="main-content" class="content-section white-padded">
<div class="about-item">
<%= raw format_html(object.statement_text[:value], false) %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/preliminary_sentences/_act.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.content-prelim-text#prelim-text
%span>= object_display_name_link(object.object_name)
%span= " became law on "
%strong>= format_date(object.date)
%span>= format_date(object.date)
- unless bill.blank?
%span= " when the "
%span>= object_show_link(bill.object_title, bill.object_uri)
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/preliminary_sentences/_bill.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.content-prelim-text#prelim-text
%span>= object_display_name_link(object.object_name)
%span= " on "
%strong>= format_date(object.date_of_order)
%span>= format_date(object.date_of_order)
%span= ", in the "
%span>= render 'search/fragments/list', items: object.legislature, terminator: "", singular: false
- unless object.member.blank?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
%span>= object_display_name_link(object.object_name)
- unless object.date_of_royal_assent.blank?
%span= " received Royal Assent on "
%strong>= format_date(object.date_of_royal_assent)
%span>= format_date(object.date_of_royal_assent)
%span= "."
4 changes: 2 additions & 2 deletions app/views/search/preliminary_sentences/_deposited_paper.haml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
%span>= render 'search/fragments/list', items: object.departments, terminator: "", singular: false
- unless object.deposited_date.blank?
%span= " on "
%strong>= format_date(object.deposited_date)
%span>= format_date(object.deposited_date)
%span= "."
- unless object.commitment_to_deposit_date.blank?
%span= " The commitment to deposit was made on "
%strong>= format_date(object.commitment_to_deposit_date)
%span>= format_date(object.commitment_to_deposit_date)
%span= "."
10 changes: 5 additions & 5 deletions app/views/search/preliminary_sentences/_edm.haml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
%span>= render 'search/fragments/edm_sponsor_list', items: object.other_sponsors, terminator: '', singular: false
%span= " and "
%span= " tabled on "
%strong>= format_date(object.date_tabled)
%span>= format_date(object.date_tabled)
%span= ", in the "
%span= render 'search/fragments/list', items: object.legislature, terminator: '.', singular: false
- if object.subtype.blank?
Expand All @@ -31,12 +31,12 @@
- unless object.number_of_signatures.blank?
- unless object.subtype.blank?
%span= ", "
%strong= "signed by "
%strong= object.number_of_signatures[:value]
%span= "signed by "
%span= object.number_of_signatures[:value]
- if object.number_of_signatures[:value] == 1
%strong>= " member in total"
%span>= " member in total"
- else
%strong>= " members in total"
%span>= " members in total"
- unless object.subtype.blank? && object.number_of_signatures.blank?
%span= "."
- if object.withdrawn?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
%span>= object_display_name_link(object.object_name)
- unless object.deposited_date.blank?
%span=" deposited on "
%strong>= format_date(object.deposited_date)
%span>= format_date(object.deposited_date)
%span= "."
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
%span= ")"
- unless object.published_date.blank?
%span= " published on "
%strong>= format_date(object.published_date)
%span>= format_date(object.published_date)
%span= "."
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
%span>= object_display_name_link(object.object_name)
- unless object.date_received.blank?
%span= " deposited on "
%strong>= format_date(object.date_received)
%span>= format_date(object.date_received)
%span= "."
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
%span>= object_display_name_link(object.object_name)
- unless object.date_originated.blank?
%span= " dated "
%strong>= format_date(object.date_originated)
%span>= format_date(object.date_originated)
- unless object.corresponding_minister.blank?
%span= " from "
%span>= search_link(object.corresponding_minister)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
%span>= object_display_name_link(object.object_name)
- unless object.date_reported.blank?
%span= " dated "
%strong>= format_date(object.date_reported)
%span>= format_date(object.date_reported)
%span= "."
- unless object.date_debated.blank? && object.debate_location.blank?
%span= " It was debated "
- unless object.date_debated.blank?
%span= " on "
%strong>= format_date(object.date_debated)
%span>= format_date(object.date_debated)
- unless object.debate_location.blank?
%span= " in "
%span>= object.debate_location[:value]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
%span>= object_display_name_link(object.object_name)
- unless object.date.blank?
%span= " on "
%strong>= format_date(object.date)
%span>= format_date(object.date)
- unless object.legislature.blank?
%span= ","
%span= " in the "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
%span= " published by the "
%span= search_link(object.department)
%span= " was received by Parliament on "
%strong= format_date(object.date)
%span= format_date(object.date)
%span>="."
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
%span= ") "
- unless object.correction_date.blank?
%span= " on "
%strong>= format_date(object.correction_date)
%span>= format_date(object.correction_date)
- unless object.legislature.blank?
%span= ", in the "
%span>= render 'search/fragments/list', items: object.legislature, terminator: "", singular: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
%span>= render 'search/fragments/list', items: object.legislature, terminator: "", singular: false
- unless object.date.blank?
%span= " on "
%strong>= format_date(object.date)
%span>= format_date(object.date)
- unless object.lead_member.blank?
%span= " by "
%span= search_link(object.lead_member)
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/preliminary_sentences/_oral_answer.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
%span>= object_display_name_link(object.object_name)
- unless object.date_of_answer.blank?
%span= " provided on "
%strong= format_date(object.date_of_answer)
%span= format_date(object.date_of_answer)
- unless object.legislature.blank?
%span= " in the "
%span>= render 'search/fragments/list', items: object.legislature, terminator: ',', singular: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
%span>= object_show_link(formatted_name(question.subtype_or_type, @ses_data, true), object.question_url)
- unless object.date_of_question.blank?
%span= " asked on "
%strong>= format_date(object.date_of_question)
%span>= format_date(object.date_of_question)
- unless question.asking_member.blank?
%span= " by "
%span>= search_link(question.asking_member)
Expand Down
Loading

0 comments on commit bf311aa

Please sign in to comment.