Ejemplo n.º 1
0
		// End Added by JEMAU

		/// <summary>
		/// Common code for emitting sets of changes for use in the dashboard view.
		/// </summary>
		/// <param name="sectionTitle">Title of the section containing the table. Can be null for no title.</param>
		/// <param name="reviews">The reviews to emit into the table.</param>
		/// <param name="includeReviewOwner">Whether to include the review owner.</param>
		/// <returns></returns>
		private WebControl CreateReviewsSectionCommon(string sectionTitle, IEnumerable<ChangeList> reviews, bool includeReviewOwner, bool includeCoseButton = false)
		{
			Panel sectionDiv = new Panel() { CssClass = "ChangesSummarySection" };

			if (sectionTitle != null)
				sectionDiv.AddText("<p>" + sectionTitle + ":", "Title");

			Table table = new Table();
			sectionDiv.Controls.Add(table);

			foreach (ChangeList changeList in reviews)
				table.Rows.Add(GetReviewRow(changeList, includeReviewOwner, includeCoseButton));

			ApplyRowBackgroundCssStyle(table);

			return sectionDiv;
		}