/// <summary> /// Shows the topic history list. /// </summary> private void ShowTopicHistoryList() { this.lblPageTopic.Text = PageTopic.Replace(WikiModuleBase.WikiHomeName, "Home"); this.lblDateTime.Text = "..."; this.lblPageContent.Text = Localization.GetString("HistoryListHeader", this.RouterResourceFile) + " <br /> " + this.CreateHistoryTable(); this.BackBtn.NavigateUrl = DotNetNuke.Common.Globals.NavigateURL( this.TabId, this.PortalSettings, string.Empty, "topic=" + WikiMarkup.EncodeTitle(this.PageTopic)); }
/// <summary> /// Displays the topic. /// </summary> private void DisplayTopic() { this.cmdSave.Visible = true; this.cmdSaveAndContinue.Visible = true; this.cmdCancel.Visible = true; this.teContent.Text = this.ReadTopicForEdit(); if (this.WikiSettings.AllowDiscussions) { this.AllowDiscuss.Enabled = true; this.AllowDiscuss.Checked = this.CurrentTopic.AllowDiscussions || this.WikiSettings.DefaultDiscussionMode == true; } else { this.AllowDiscuss.Enabled = false; this.AllowDiscuss.Checked = false; } if (this.WikiSettings.AllowRatings) { this.AllowRating.Enabled = true; this.AllowRating.Checked = this.CurrentTopic.AllowRatings || this.WikiSettings.DefaultRatingMode == true; } else { this.AllowRating.Enabled = false; this.AllowRating.Checked = false; } this.DeleteBtn.Visible = this.DeleteLbl.Visible = this.CurrentTopic.Name != WikiModuleBase.WikiHomeName; if (string.IsNullOrWhiteSpace(this.CurrentTopic.Name)) { this.txtPageName.Text = string.Empty; this.txtPageName.ReadOnly = false; } else { this.txtPageName.Text = HttpUtility.HtmlDecode(CurrentTopic.Name.Trim().Replace("[L]", string.Empty)); this.txtPageName.ReadOnly = PageTopic.Equals(WikiModuleBase.WikiHomeName); } if (!string.IsNullOrWhiteSpace(this.CurrentTopic.Title)) { this.txtTitle.Text = HttpUtility.HtmlDecode(CurrentTopic.Title.Replace("[L]", string.Empty)); } this.txtDescription.Text = CurrentTopic.Description; this.txtKeywords.Text = CurrentTopic.Keywords; }
/// <summary> /// Shows the old version. /// </summary> private void ShowOldVersion() { if (this.CanEdit) { this.RestoreLbl.Visible = true; this.cmdRestore.Visible = true; } string historyPK = null; historyPK = this.Request.QueryString["ShowHistory"]; var topicHistory = TopicHistoryBo.GetItem(int.Parse(historyPK)); this.lblPageTopic.Text = PageTopic.Replace(WikiModuleBase.WikiHomeName, "Home"); this.lblPageContent.Text = topicHistory.Cache; this.lblDateTime.Text = string.Format(Localization.GetString("HistoryAsOf", this.RouterResourceFile), topicHistory.UpdateDate.ToString(CultureInfo.CurrentCulture)); this.BackBtn.NavigateUrl = DotNetNuke.Common.Globals.NavigateURL( this.TabId, this.PortalSettings, string.Empty, "loc=TopicHistory", "topic=" + WikiMarkup.EncodeTitle(this.PageTopic)); }