string GetEduProgramLinks() { return(Wrap(FormatDocumentsLinkWithData( GetDocuments(EduProgramProfile.GetDocumentsOfType(SystemDocumentType.EduProgram)), UniversityFormatHelper.FormatEduProgramProfileTitle(EduProgram.Title, ProfileCode, ProfileTitle) .Append(IsAdopted ? Context.LocalizeString("IsAdopted.Text") : null, " - "), "oop", IsAdopted ? "itemprop=\"adOpMain\"" : "itemprop=\"opMain\"" ), "eduName")); }
public static string FormatTitle(this IEduProgramProfile epp, bool withEduProgramCode = true) { if (withEduProgramCode) { return(UniversityFormatHelper.FormatEduProgramProfileTitle( epp.EduProgram.Code, epp.EduProgram.Title, epp.ProfileCode, epp.ProfileTitle )); } return(UniversityFormatHelper.FormatEduProgramProfileTitle( epp.EduProgram.Title, epp.ProfileCode, epp.ProfileTitle )); }
protected void gridEduProgramProfileObrnadzorDocuments_RowDataBound(object sender, GridViewRowEventArgs e) { var now = HttpContext.Current.Timestamp; // show / hide edit column e.Row.Cells [0].Visible = IsEditable; if (e.Row.RowType == DataControlRowType.Header) { // set right table section for header row e.Row.TableSection = TableRowSection.TableHeader; } else if (e.Row.RowType == DataControlRowType.DataRow) { var eduProgramProfile = (EduProgramProfileDocumentsViewModel)e.Row.DataItem; e.Row.Attributes.Add("data-title", UniversityFormatHelper.FormatEduProgramProfileTitle( eduProgramProfile.EduProgram.Code, eduProgramProfile.EduProgram.Title, eduProgramProfile.ProfileCode, eduProgramProfile.ProfileTitle) .Append(eduProgramProfile.IsAdopted ? LocalizeString("IsAdopted.Text") : null, " - ") .Append(eduProgramProfile.EduLevel.Title, ": ") ); if (IsEditable) { // get edit link controls var linkEdit = (HyperLink)e.Row.FindControl("linkEdit"); var iconEdit = (Image)e.Row.FindControl("iconEdit"); // fill edit link controls linkEdit.NavigateUrl = EditUrl("eduprogramprofile_id", eduProgramProfile.EduProgramProfileID.ToString(), "EditEduProgramProfileDocuments"); iconEdit.ImageUrl = UniversityIcons.Edit; } if (!eduProgramProfile.IsPublished(now)) { e.Row.AddCssClass("u8y-not-published"); } } }