Skip to content

Commit

Permalink
Apply itemprop attr on rows, not table GH-395
Browse files Browse the repository at this point in the history
apply "eduOPAccred" itemprop (quickfix) GH-395
  • Loading branch information
roman-yagodin committed Mar 23, 2021
1 parent 6f3a9b7 commit 43e3176
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<asp:BoundField DataField="EduLevelString" HtmlEncode="false" HeaderText="EduLevel.Column" />
<asp:BoundField DataField="EduForms_String" HtmlEncode="false" HeaderText="EduFormsAndLearningTime.Column" />
<asp:BoundField DataField="AccreditedToDateString" HtmlEncode="false" HeaderText="AccreditedToDate.Column" />
<asp:BoundField DataField="CommunityAccreditedToDate" DataFormatString="{0:d}" HeaderText="CommunityAccreditedToDate.Column" />
<asp:BoundField DataField="CommunityAccreditedToDateString" HtmlEncode="false" HeaderText="CommunityAccreditedToDate.Column" />
<asp:BoundField DataField="Languages_String" HtmlEncode="false" HeaderText="Languages.Column" />
</Columns>
</asp:GridView>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,6 @@ protected override void OnInit (EventArgs e)
{
base.OnInit (e);

gridEduProfileObrnadzorEduForms.Attributes.Add ("itemprop", "eduAccred");
gridEduProfileObrnadzorDocuments.Attributes.Add ("itemprop", "eduOP");

switch (Settings.Mode) {
case EduProgramProfileDirectoryMode.ObrnadzorEduForms:
mviewEduProgramProfileDirectory.ActiveViewIndex = 1;
Expand Down Expand Up @@ -236,6 +233,7 @@ protected void gridEduProfileObrnadzorEduForms_RowDataBound (object sender, Grid

if (e.Row.RowType == DataControlRowType.DataRow) {
var eduProgramProfile = (EduProgramProfileEduFormsViewModel) e.Row.DataItem;
e.Row.Attributes.Add ("itemprop", "eduAccred");

if (IsEditable) {
// get edit link controls
Expand Down Expand Up @@ -268,6 +266,7 @@ protected void gridEduProfileObrnadzorDocuments_RowDataBound (object sender, Gri
else if (e.Row.RowType == DataControlRowType.DataRow) {
var eduProgramProfile = (EduProfileDocumentsViewModel) e.Row.DataItem;

e.Row.Attributes.Add ("itemprop", "eduOP");
e.Row.Attributes.Add ("data-title", UniversityFormatHelper.FormatEduProfileTitle (
eduProgramProfile.EduProgram.Code, eduProgramProfile.EduProgram.Title,
eduProgramProfile.ProfileCode, eduProgramProfile.ProfileTitle)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ public EduProgramProfileEduFormsViewModel (
? Wrap (AccreditedToDate.Value.ToShortDateString (), "dateEnd")
: string.Empty;

public string CommunityAccreditedToDateString => (CommunityAccreditedToDate != null)
? Wrap (Wrap (CommunityAccreditedToDate.Value.ToShortDateString (), "dateEnd"), "eduPOAccred")
: string.Empty;

public string EduForms_String
{
get {
Expand Down

0 comments on commit 43e3176

Please sign in to comment.