Skip to content

Commit

Permalink
updated the concept view and edit pages to show the code system of th…
Browse files Browse the repository at this point in the history
…e reference term(s)
  • Loading branch information
Nityan Khanna committed Jan 16, 2018
1 parent 9b5b1b4 commit bd6c1d4
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public ReferenceTermViewModel()
public ReferenceTermViewModel(ReferenceTerm referenceTerm) : this()
{
this.CreationTime = referenceTerm.CreationTime.DateTime;
this.CodeSystem = referenceTerm.CodeSystem?.Oid;
this.DisplayNames = referenceTerm.DisplayNames;
this.Id = referenceTerm.Key.Value;
this.Mnemonic = referenceTerm.Mnemonic;
Expand All @@ -75,7 +76,14 @@ public ReferenceTermViewModel(Concept concept)
}

/// <summary>
/// Gets or sets the concept identifier associated with the reference term
/// Gets or sets the code system.
/// </summary>
/// <value>The code system.</value>
[Display(Name = "CodeSystem", ResourceType = typeof(Locale))]
public string CodeSystem { get; set; }

/// <summary>
/// Gets or sets the concept identifier associated with the reference term.
/// </summary>
public Guid? ConceptId { get; set; }

Expand Down
1 change: 1 addition & 0 deletions OpenIZAdmin/Views/Concept/Edit.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
{ "orderable": false },
null,
null,
null,
{ "orderable": false }
]
});
Expand Down
1 change: 1 addition & 0 deletions OpenIZAdmin/Views/Concept/ViewConcept.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
columns: [
{ "orderable": false },
null,
null,
null
]
});
Expand Down
24 changes: 13 additions & 11 deletions OpenIZAdmin/Views/Shared/_ManageReferenceTermsPartial.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,42 @@

@if (Model.Any())
{
<table class="table table-striped table-bordered" id="referenceTermsTable">
<table class="table table-striped table-bordered" id="referenceTermsTable">
<thead>
<tr>
<th></th>
<th>@Html.DisplayNameFor(m => m.Mnemonic)</th>
<th>@Html.DisplayNameFor(m => m.Names)</th>
<th></th>
</tr>
<tr>
<th></th>
<th>@Html.DisplayNameFor(m => m.Mnemonic)</th>
<th>@Html.DisplayNameFor(m => m.Names)</th>
<th>@Html.DisplayNameFor(m => m.CodeSystem)</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var referenceTerm in Model)
{
<tr>
<td class="centerContent autoFitContents"><span class="glyphicon glyphicon-list" aria-hidden="true"></span></td>
<td>@referenceTerm.Mnemonic</td>
<td>@referenceTerm.Names</td>
<td>@referenceTerm.Names</td>
<td>@referenceTerm.CodeSystem</td>
<td class="autoFitContents centerContent">
<a class="btn btn-warning" href="@Url.Action("Edit", "ReferenceTerm", new { id = referenceTerm.Id })">
@Locale.Edit
<span class="glyphicon glyphicon-pencil"></span>
</a>
@using (Html.BeginForm("DeleteReferenceTerm", "Concept", new {id = referenceTerm.ConceptId, versionId = referenceTerm.ConceptVersionKey, refTermId = referenceTerm.Id}, FormMethod.Post, new {@class = "inlineForm form-horizontal", role = "form"}))
@using (Html.BeginForm("DeleteReferenceTerm", "Concept", new { id = referenceTerm.ConceptId, versionId = referenceTerm.ConceptVersionKey, refTermId = referenceTerm.Id }, FormMethod.Post, new { @class = "inlineForm form-horizontal", role = "form" }))
{
@Html.AntiForgeryToken()

<button type="submit" data-wait-text="@Locale.PleaseWait" class="btn btn-danger">
@Locale.Delete
<span class="glyphicon glyphicon-remove"></span>
</button>
}
}
</td>

</tr>
}
}
</tbody>
</table>
}
Expand Down
18 changes: 10 additions & 8 deletions OpenIZAdmin/Views/Shared/_ReferenceTermsPartial.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,25 @@

@if (Model.Any())
{
<table class="table table-striped table-bordered" id="referenceTermsTable">
<table class="table table-striped table-bordered" id="referenceTermsTable">
<thead>
<tr>
<th></th>
<th>@Html.DisplayNameFor(m => m.Mnemonic)</th>
<th>@Html.DisplayNameFor(m => m.Names)</th>
</tr>
<tr>
<th></th>
<th>@Html.DisplayNameFor(m => m.Mnemonic)</th>
<th>@Html.DisplayNameFor(m => m.Names)</th>
<th>@Html.DisplayNameFor(m => m.CodeSystem)</th>
</tr>
</thead>
<tbody>
@foreach (var referenceTerm in Model)
{
<tr>
<td class="centerContent autoFitContents"><span class="glyphicon glyphicon-list" aria-hidden="true"></span></td>
<td>@referenceTerm.Mnemonic</td>
<td>@referenceTerm.Names</td>
<td>@referenceTerm.Names</td>
<td>@referenceTerm.CodeSystem</td>
</tr>
}
}
</tbody>
</table>
}
Expand Down

0 comments on commit bd6c1d4

Please sign in to comment.