<commit_before>﻿@model CampaignShowViewModel
@using GiveCRM.Web.Models.Campaigns

@{
    ViewBag.Title = Model.Title;
	string formWidthClass = "span4";
}

<div class="campaign">
	<div class="row">
		<div class="span16">
			<h1>@Model.Title</h1>
		</div>
	</div>

	<div class="row">
		<div class="maincol span-two-thirds">
		@using (Html.BeginForm())
		{
			@Html.ValidationSummary(true)
			<h2>General Details</h2>
			<fieldset>
				@Html.HiddenFor(m => m.Campaign.Id)

				<div class="clearfix">
					@Html.LabelFor(m => m.Campaign.Name)
					<div class="input">
						@Html.TextBoxFor(m => m.Campaign.Name, new { @class = formWidthClass })
					</div>
				</div>

				<div class="clearfix">
					@Html.LabelFor(m => m.Campaign.Description)
					<div class="input">
						@Html.TextAreaFor(m => m.Campaign.Description, 5, 80, new { @class = formWidthClass })
					</div>
				</div>
			</fieldset>
				
			<h2>Recipient Listing</h2>
			
			@* TODO(BS) Build logic to create recipient list generation *@
			<h3>Search Filters</h3>				
			<ul>
				@if (Model.SearchFilters.Any() == false) {
					@Model.NoSearchFiltersText;
				}
				else {
					foreach (MemberSearchFilterViewModel filterViewModel in Model.SearchFilters) {
						<li>
							@filterViewModel.CriteriaDisplayText
							@Html.ActionLink("[x]", "DeleteMemberSearchFilter", new {
								campaignId = filterViewModel.CampaignId,
								memberSearchFilterId = filterViewModel.MemberSearchFilterId
							})
						</li>
					}
				}

				<li>
					@Html.ActionLink("Add new search filter", "AddMembershipSearchFilter", new { campaignId = Model.Campaign.Id })
				</li>
			</ul>

			<h3>Matched Recipient Listing</h3>
			@* TODO *@
					
			
			<div class="actions clearfix">
				<input type="submit" value="Save Campaign" class="btn primary @formWidthClass" />
			</div>
  }
		</div>
	
		<div class="sidebar span-one-third">
			<h2>Quick Links</h2>
		
			<ul class="toolbar">
				<li>Nothing Here</li>
			</ul>
		</div>
	</div>
</div>

<!-- TODO(BS) pull these in from http://www.asp.net/ajaxlibrary/cdn.ashx#ASPNET_MVC_Releases_on_the_CDN_9 with local fallback -->
<!-- TODO(BS) ensure JS validation works as expected (once back end is working too) -->
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script><commit_msg>only show links when they are appropriate<commit_after>﻿@model CampaignShowViewModel
@using GiveCRM.Web.Models.Campaigns

@{
    ViewBag.Title = Model.Title;
	string formWidthClass = "span4";
}

<div class="campaign">
	<div class="row">
		<div class="span16">
			<h1>@Model.Title</h1>
		</div>
	</div>

	<div class="row">
		<div class="maincol span-two-thirds">
		@using (Html.BeginForm())
		{
			@Html.ValidationSummary(true)
			<h2>General Details</h2>
			<fieldset>
				@Html.HiddenFor(m => m.Campaign.Id)

				<div class="clearfix">
					@Html.LabelFor(m => m.Campaign.Name)
					<div class="input">
						@Html.TextBoxFor(m => m.Campaign.Name, new { @class = formWidthClass })
					</div>
				</div>

				<div class="clearfix">
					@Html.LabelFor(m => m.Campaign.Description)
					<div class="input">
						@Html.TextAreaFor(m => m.Campaign.Description, 5, 80, new { @class = formWidthClass })
					</div>
				</div>
			</fieldset>
				
			<h2>Recipient Listing</h2>
			
			@* TODO(BS) Build logic to create recipient list generation *@
			<h3>Search Filters</h3>				
			<ul>
				@if (Model.SearchFilters.Any() == false) {
					@Model.NoSearchFiltersText;
				}
				else {
					foreach (MemberSearchFilterViewModel filterViewModel in Model.SearchFilters) {
						<li>
							@filterViewModel.CriteriaDisplayText
							@Html.ActionLink("[x]", "DeleteMemberSearchFilter", new {
								campaignId = filterViewModel.CampaignId,
								memberSearchFilterId = filterViewModel.MemberSearchFilterId
							})
						</li>
					}
				}

                            @if (Model.Campaign.Id > 0) {
				<li>@Html.ActionLink("Add new search filter", "AddMembershipSearchFilter", new { campaignId = Model.Campaign.Id })</li>
                            }
			</ul>

			<h3>Matched Recipient Listing</h3>
			@* TODO *@
					
			
			<div class="actions clearfix">
				<input type="submit" value="Save Campaign" class="btn primary @formWidthClass" />
			</div>
  }
		</div>
	
		<div class="sidebar span-one-third">
			<h2>Quick Links</h2>
		
			<ul class="toolbar">
                            @if (Model.Campaign.Id > 0) {
                                <li>@Html.ActionLink("Close campaign", "CloseCampaign", new {campaignId = Model.Campaign.Id})</li>
                            }
                            else {
                                <li>Nothing Here</li>
                            }
			</ul>
		</div>
	</div>
</div>

<!-- TODO(BS) pull these in from http://www.asp.net/ajaxlibrary/cdn.ashx#ASPNET_MVC_Releases_on_the_CDN_9 with local fallback -->
<!-- TODO(BS) ensure JS validation works as expected (once back end is working too) -->
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
{'fraction_non_alphanumeric': 0.15836332638757342, 'fraction_numerical': 0.00757719265012313, 'mean_word_length': 2.7822349570200573, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 0, '>': 123, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3422304', 'n_tokens_mistral': 2172, 'n_tokens_neox': 1748, 'n_words': 339}