FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Revert "Set the liveblog date to publishedDate" · devhttps/frontend@503af1d · GitHub

Commit 503af1d

Browse files
authored
Revert "Set the liveblog date to publishedDate"
1 parent ecc1ba4 commit 503af1d

4 files changed

Lines changed: 7 additions & 5 deletions

File tree

‎article/app/model/KeyEventData.scala‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ object KeyEventData {
2222
val bodyBlocks = (latestSummary.toSeq ++ keyEvents).sortBy(_.lastModifiedDate.getOrElse(new DateTime(0)).toInstant.getMillis).reverse.take(TimelineMaxEntries)
2323

2424
bodyBlocks.map { bodyBlock =>
25-
KeyEventData(bodyBlock.id, bodyBlock.publishedDate.map(LiveBlogDate(_, timezone)), bodyBlock.title)
25+
KeyEventData(bodyBlock.id, bodyBlock.publishedCreatedDate(timezone), bodyBlock.title)
2626
}
2727
}
2828

‎article/app/views/liveblog/dateBlock.scala.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
@(date: Option[LiveBlogDate])
44

5-
@date.map { case LiveBlogDate(publishedDate, hhmm, ampm, gmt) =>
6-
<time datetime="@publishedDate" data-relativeformat="med" class=" js-timestamp" itemprop="datePublished">@ampm <span class="timezone">@gmt</span></time>
5+
@date.map { case LiveBlogDate(createdDate, hhmm, ampm, gmt) =>
6+
<time datetime="@createdDate" data-relativeformat="med" class=" js-timestamp" itemprop="datePublished">@ampm <span class="timezone">@gmt</span></time>
77
<span class="block-time__absolute">@hhmm</span>
88
}
99

‎article/app/views/liveblog/liveBlogBlocks.scala.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535
<p class="block-time published-time">
3636
@if(amp){
3737
<a href="@LinkTo{/@article.metadata.id?page=with:block-@block.id#block-@block.id}" itemprop="url" class="block-time__link">
38-
@views.html.liveblog.dateBlock(block.publishedDate.map(LiveBlogDate(_, timezone)))
38+
@views.html.liveblog.dateBlock(block.publishedCreatedDate(timezone))
3939
</a>
4040
} else {
4141
<a href="/@article.metadata.id?page=with:block-@block.id#block-@block.id" itemprop="url" class="block-time__link">
42-
@views.html.liveblog.dateBlock(block.publishedDate.map(LiveBlogDate(_, timezone)))
42+
@views.html.liveblog.dateBlock(block.publishedCreatedDate(timezone))
4343
</a>
4444
}
4545
</p>

‎common/app/model/liveblog/BodyBlock.scala‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ object BlockAttributes {
128128
new BlockAttributes(blockAttributes.keyEvent.getOrElse(false), blockAttributes.summary.getOrElse(false), blockAttributes.membershipPlaceholder.map(mp => MembershipPlaceholder(mp.campaignCode)))
129129

130130
implicit val blockAttributes: Writes[BlockAttributes] = Json.writes[BlockAttributes]
131+
132+
131133
}
132134

133135
case class BlockAttributes(keyEvent: Boolean, summary: Boolean, membershipPlaceholder: Option[MembershipPlaceholder])

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL