-
-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a partial to render batch sent message
I don’t really like that we’re using two flash keys to make this happen. The @info_request should be available as an InfoRequestBatchTemplate or something in InfoRequestBatch#show so that we can get the law_used_full.
- Loading branch information
1 parent
28a00e5
commit d8e5a1b
Showing
4 changed files
with
36 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<div id="notice"> | ||
<p> | ||
<%= _("Your {{law_used_full}} requests will be <strong>sent</strong> shortly!", | ||
:law_used_full => law_used_full) %> | ||
</p> | ||
|
||
<p> | ||
<%= _("<strong>We will email you</strong> when they have been sent. " \ | ||
"We will also email you when there is a response to any of them, or " \ | ||
"after {{late_number_of_days}} working days if the authorities still" \ | ||
"haven't replied by then.", | ||
:late_number_of_days => AlaveteliConfiguration::reply_late_after_days) %> | ||
</p> | ||
|
||
<p> | ||
<%= _("If you write about these requests (for example in a forum or a blog) " \ | ||
"please link to this page.") %> | ||
</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d8e5a1b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I think there are two significant bits of context here. One is that the
law_used_full
attribute is derived fromlaw_used
, which in turn is set on InfoRequest initialisation based on the tags applied to the public body. So different requests in a batch could have different values for law_used_full - some of them might be to bodies that only accept environmental information requests. So using the value from the batch template is not really a good proxy for the whole collection.The second is that, in any case, the distinction between the two types of request is a UK-specific feature which should be moved to the UK theme (#2085).
Given these two factors, I think the cleanest thing might be to drop
law_used_full
from this descriptive text, and just have it say "Your requests will be sent shortly", without specifying what law will be used.d8e5a1b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I had thought that the existing behaviour was "correct", but looks like it also suffers from this problem.
+1. I think a better way to illustrate the distinction would be to use some sort of tag or icon next to each request in the request list.
d8e5a1b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 2372441