<commit_before>﻿@model Purchasing.Web.Controllers.DepartmentalAdminRequestViewModel

@{
    ViewBag.Title = "Approve";

}

@{
    Bundles.Reference("css/single/jquery.multiselector.css");
    Bundles.Reference("scripts/public/single/jquery.multiselector.js");
}

@section AdditionalScripts{
 
    <script type="text/javascript">

        $(function () {
            var userUrl = "@Url.Action("SearchOrgs", "DepartmentalAdminRequest")";            
            $("#User_Organizations").multiSelector({dataUrl: userUrl, placeholder: "Org Name or Id", showOptions: true});
            $("#Existing_Organizations").multiSelector({dataUrl: userUrl, placeholder: "Org Name or Id", showOptions: true});
        })

    </script>

}

@section SubNav
{
	<ul class="navigation">
		<li>@Html.ActionLink("Back to List", "Index", new { }, new { @class = "button" })</li>
	</ul>
}

@using (Html.BeginForm())
{
	@Html.AntiForgeryToken()
	@Html.ValidationSummary(true)
    @Html.HiddenFor(x => x.DepartmentalAdminRequest.Id)
    @Html.HiddenFor(x => x.DepartmentalAdminRequest.FirstName)
    @Html.HiddenFor(x => x.DepartmentalAdminRequest.LastName)
    @Html.HiddenFor(x => x.DepartmentalAdminRequest.Email)

    @Html.Partial("_daRequest")
}

<section class="display-form">
	<header class="ui-widget-header ui-corner-top">Org Details</header>

    <div class="section-contents">
        
        @* <ul>
            @foreach (var org in Model.Organizations)
            {
                <li>@org.Id
                    <ul>
                         @foreach (var email in Model.OrgsExistingUsers.Where(a => a.Key == org.Id))
                         {
                             <li>
  
                                 <div class="display-details">
                                     @Html.Encode(email.Value)
                                     @{
                                         var url = string.Format("http://www.ucdavis.edu/search/directory_results.shtml?filter={0}", email.Value);
                                     }
                                     <a class="button" href="@url" target="_blank">Lookup</a>

                                 </div>
                             </li>
                         }      
                    </ul>
                </li>
                
            }
        </ul>*@
        
         <dl>
            @foreach (var org in Model.Organizations)
            {
                <dt>
                    @Html.Encode(org.Id)
                </dt>
                    
                             foreach (var email in Model.OrgsExistingUsers.Where(a => a.Key == org.Id))
                             {
                             <dd>
  
                                 <div class="display-details">
                                     
                                     @{
                                            var url = string.Format("http://www.ucdavis.edu/search/directory_results.shtml?filter={0}", email.Value);
                                     }
                                     <a class="button" href="@url" target="_blank">Lookup</a>
                                     @Html.Encode(email.Value)
                                 </div>
                             </dd>
                             }  
                    
                
                
            }<commit_msg>cleaned up details section of DA approve page<commit_after>﻿@model Purchasing.Web.Controllers.DepartmentalAdminRequestViewModel

@{
    ViewBag.Title = "Approve";

}

@{
    Bundles.Reference("css/single/jquery.multiselector.css");
    Bundles.Reference("scripts/public/single/jquery.multiselector.js");
}

@section AdditionalScripts{
 
    <script type="text/javascript">

        $(function () {
            var userUrl = "@Url.Action("SearchOrgs", "DepartmentalAdminRequest")";            
            $("#User_Organizations").multiSelector({dataUrl: userUrl, placeholder: "Org Name or Id", showOptions: true});
            $("#Existing_Organizations").multiSelector({dataUrl: userUrl, placeholder: "Org Name or Id", showOptions: true});
        })

    </script>

}

@section SubNav
{
	<ul class="navigation">
		<li>@Html.ActionLink("Back to List", "Index", new { }, new { @class = "button" })</li>
	</ul>
}

@using (Html.BeginForm())
{
	@Html.AntiForgeryToken()
	@Html.ValidationSummary(true)
    @Html.HiddenFor(x => x.DepartmentalAdminRequest.Id)
    @Html.HiddenFor(x => x.DepartmentalAdminRequest.FirstName)
    @Html.HiddenFor(x => x.DepartmentalAdminRequest.LastName)
    @Html.HiddenFor(x => x.DepartmentalAdminRequest.Email)

    @Html.Partial("_daRequest")
}

<section class="display-form">
	<header class="ui-widget-header ui-corner-top">Org Details</header>

    <div class="section-contents">
        
         <dl>
            @foreach (var org in Model.Organizations)
            {
                var nameAndId = string.Format("{0} ({1})", org.Name, org.Id);
                <dt>
                    <h2>@nameAndId</h2>
                </dt>
                    
                foreach (var email in Model.OrgsExistingUsers.Where(a => a.Key == org.Id))
                {
                    <dd>
  
                        <div class="display-details">
                                     
                            @{
                                var url = string.Format("http://www.ucdavis.edu/search/directory_results.shtml?filter={0}", email.Value);
                                var emailString = string.Format("mailto:{0}", email.Value);
                            }
                            <a class="button" href="@url" target="_blank">Lookup</a>
                            <a href="@emailString">@Html.Encode(email.Value)</a>                                                       
                        </div>
                    </dd>
                }
            }
{'fraction_non_alphanumeric': 0.13005780346820808, 'fraction_numerical': 0.0013600816048962938, 'mean_word_length': 1.3788920339668418, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 68, 'https://': 0, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '935163', 'n_tokens_mistral': 1596, 'n_tokens_neox': 1528, 'n_words': 248}