-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added default page to handle base route * Created the ability to filter content by tags * Fixed empty reference aria label * Updated controller to support page type * Tidy up * Removed spacing * Fixed unit tests * Moved iD
- Loading branch information
1 parent
1fab005
commit 67254b6
Showing
17 changed files
with
100 additions
and
102 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
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
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
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
41 changes: 23 additions & 18 deletions
41
src/Dfe.ContentSupport.Web/Views/Shared/RichText/_RichText.cshtml
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 |
---|---|---|
@@ -1,61 +1,66 @@ | ||
@model RichTextContentItem | ||
|
||
@{ | ||
var tags = ViewBag.tags ?? new List<string>(); | ||
} | ||
|
||
|
||
@if (tags.Count == 0 || (Model.Tags.Count == 0 || Model.Tags.Exists(el => tags.Contains(el)))) | ||
{ | ||
var nodeType = Model.NodeType; | ||
|
||
switch (nodeType) | ||
{ | ||
case RichTextNodeType.Document: | ||
<partial name="RichText/_Document" model="@Model"/> | ||
<partial name="RichText/_Document" model="@Model" /> | ||
break; | ||
case RichTextNodeType.Paragraph: | ||
<partial name="RichText/_Paragraph" model="@Model"/> | ||
<partial name="RichText/_Paragraph" model="@Model" /> | ||
break; | ||
case RichTextNodeType.Heading2: | ||
case RichTextNodeType.Heading3: | ||
case RichTextNodeType.Heading4: | ||
case RichTextNodeType.Heading5: | ||
case RichTextNodeType.Heading6: | ||
<partial name="RichText/_H" model="@Model"/> | ||
<partial name="RichText/_H" model="@Model" /> | ||
break; | ||
case RichTextNodeType.UnorderedList: | ||
<partial name="RichText/_UnorderedList" model="@Model"/> | ||
<partial name="RichText/_UnorderedList" model="@Model" /> | ||
break; | ||
case RichTextNodeType.OrderedList: | ||
<partial name="RichText/_OrderedList" model="@Model"/> | ||
<partial name="RichText/_OrderedList" model="@Model" /> | ||
break; | ||
case RichTextNodeType.ListItem: | ||
<partial name="RichText/_ListItem" model="@Model"/> | ||
<partial name="RichText/_ListItem" model="@Model" /> | ||
break; | ||
case RichTextNodeType.Hyperlink: | ||
<partial name="RichText/_Hyperlink" model="@Model"/> | ||
<partial name="RichText/_Hyperlink" model="@Model" /> | ||
break; | ||
case RichTextNodeType.Table: | ||
<partial name="RichText/_Table" model="@Model"/> | ||
<partial name="RichText/_Table" model="@Model" /> | ||
break; | ||
case RichTextNodeType.TableRow: | ||
<partial name="RichText/_TableRow" model="@Model"/> | ||
<partial name="RichText/_TableRow" model="@Model" /> | ||
break; | ||
case RichTextNodeType.TableHeaderCell: | ||
<partial name="RichText/_TableHeaderCell" model="@Model"/> | ||
<partial name="RichText/_TableHeaderCell" model="@Model" /> | ||
break; | ||
case RichTextNodeType.TableCell: | ||
<partial name="RichText/_TableCell" model="@Model"/> | ||
<partial name="RichText/_TableCell" model="@Model" /> | ||
break; | ||
case RichTextNodeType.Hr: | ||
<hr/> | ||
<hr /> | ||
break; | ||
case RichTextNodeType.EmbeddedAsset: | ||
<partial name="RichText/_Asset" model="@Model"/> | ||
<partial name="RichText/_Asset" model="@Model" /> | ||
break; | ||
case RichTextNodeType.Text: | ||
<partial name="RichText/_Text" model="@Model"/> | ||
<partial name="RichText/_Text" model="@Model" /> | ||
break; | ||
case RichTextNodeType.EmbeddedEntry: | ||
<partial name="RichText/_Entry" model="@Model"/> | ||
<partial name="RichText/_Entry" model="@Model" /> | ||
break; | ||
default: | ||
<partial name="_UnsupportedElement" model="@Model"/> | ||
<partial name="_UnsupportedElement" model="@Model" /> | ||
break; | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.