Skip to content

Commit

Permalink
MAS-129 Add styling and branding to daily email
Browse files Browse the repository at this point in the history
  • Loading branch information
d-lan1 committed Jan 16, 2020
1 parent 8b643c5 commit 130f2b7
Showing 1 changed file with 96 additions and 22 deletions.
118 changes: 96 additions & 22 deletions lambda/MAS/Views/DailyEmail.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,106 @@
//Layout = "~/Views/Shared/_EmailLayout.cshtml";
var groupedItems = Model.GroupBy(x => x.EvidenceType.Title).ToList();
var specialitiesList = Model.SelectMany(x => x.Specialities).Select(x => x.Title).ToList();
var specialitiesAsString = String.Join(',', specs);
}

<h2>DailyEmail</h2>

<table class="row article-border article-mec">
<tbody>
<tr>
<th class="small-12 large-12 columns first last">
<table>
<tbody>
<tr>
<th>
<p>
*|INTERESTED:Daily specialities of interest:@specialitiesAsString|*
Articles that match your chosen specialities today
*|ELSE|*
No articles match your chosen specialities today
*|END:INTERESTED|*
- <a href="#abc">Edit your subscription</a>
</p>
</th>
<th class="expander"></th>
</tr>
</tbody>
</table>
</th>
</tr>
</tbody>
</table>

@foreach (var group in groupedItems)

@foreach (var group in groupedItems)
{
var evidenceType = group.Key;

@:*| INTERESTED:Daily specialities of interest:specialitiesAsString | *
<table class="spacer-heading">
<tbody>
<tr>
<td height="16px" style="font-size:16px;line-height:16px;">
<h3 class="article-heading">evidenceType</h3>
</td>
</tr>
</tbody>
</table>

@foreach (var item in group)
{
var evidenceType = group.Key;

<div class='evidenceType'>
<strong>@evidenceType</strong>

@foreach (var item in group)
{
<div class='item'>
@item.Title
<br>
@item.Source.Title
<br>
@String.Join(" | ", item.Specialities.Select(x => x.Title))
<br>
@item.ShortSummary
<br>
<a href='https://www.medicinesresources.nhs.uk/@item.Slug'>SPS Comment</a>
</div>
}
</div>
@:*| INTERESTED:Daily specialities of interest:specialitiesAsString | *
<table class="row article-border">
<tbody>
<tr>
<th class="small-12 large-12 columns first last">
<table>
<tbody>
<tr>
<th>
<h4 class="h4 article-title"><a class="article-link" href="#">@item.Title</a></h4>
<p class="article-description">@item.ShortSummary</p>
<p class="article-description"><a class="article-link-subtle standard-link" href="https://www.medicinesresources.nhs.uk/@item.Slug">Read SPS commentary</a></p>
<p class="article-tags">
<span class="source-tag">@item.Source.Title</span>
@foreach (var spec in item.Specialities)
{
<span class="specialism-tag">@spec.Title</span>
}
</p>
</th>
<th class="expander"></th>
</tr>
</tbody>
</table>
</th>
</tr>
</tbody>
</table>
@:*| END:INTERESTED | *
}
@:*| END:INTERESTED | *
}

<table class="row article-border article-mec">
<tbody>
<tr>
<th class="small-12 large-12 columns first last">
<table>
<tbody>
<tr>
<th>
<p>
All articles from Medicines awareness services: Daily edition
</p>
</th>
<th class="expander"></th>
</tr>
</tbody>
</table>
</th>
</tr>
</tbody>
</table>

2 comments on commit 130f2b7

@NICE-TeamCity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TeamCity MAS / MAS Build 1.1.0.570 outcome was FAILURE
Summary: Artifacts size 0 B is 100% different from 3.6 MB in build #1.1.0.557-r893BC73; exit code 1 (Step: Set build number (Command Line)) (new) Build time: 00:00:15

@NICE-TeamCity
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TeamCity MAS / MAS Build 1.1.0.571-MAS-129_121__112_Dai outcome was FAILURE
Summary: Tests passed: 5; artifacts size 179.9 KB is 95% different from 3.6 MB in build #1.1.0.557-r893BC73; exit code 1 (Step: CMS - Build NuGet package (NuGet Pack)) (new) Build time: 00:00:40

Please sign in to comment.