<!-- Title Variables -->
<% phc_title "Member Listings Manager" %>
<% phc_title_tagline "Listing Index for " + @members_profile_info.mfirstname + " " + @members_profile_info.mlastname %>

<!-- Page Header -->
<div class="row wrapper border-bottom white-bg page-heading">
	<div class="col-sm-4">
		<h2><%= yield(:phc_title) %></h2>
		<!-- Bread Crumb -->
		<ol class="breadcrumb">
			<li><%= link_to "Dashboard", modules_dashboards_index_path %></li>
			<li><%= link_to "Member Profile List", member_profiles_path %></li>
			<li class="active"><%= yield(:phc_title_tagline) %></li>
		</ol>
	</div>
	<div class="col-sm-8">
		<div class="title-action">
			<%= link_to new_member_profile_listing_path, class: "btn btn-primary" do %>
				<i class="fa fa-plus"></i> Create a New Listing for <%= @members_profile_info.mfirstname + ' ' + @members_profile_info.mlastname %>
			<% end %>
		</div>
	</div>
</div>

<div class="wrapper wrapper-content animated fadeInRight">

	<!-- Page Content -->
	<div class="row">
		<div class="col-lg-12">

			<div class="ibox float-e-margins">

				<div class="ibox-title">
					<h5><%= yield(:phc_title_tagline) %></h5>
					<div class="ibox-tools">
						<a class="collapse-link">
							<i class="fa fa-chevron-up"></i>
						</a>
						<a class="close-link">
							<i class="fa fa-times"></i>
						</a>
					</div>
				</div>

				<div class="ibox-content">
					<div class="table-responsive">
						<table class="table table-striped table-bordered table-hover dataTables-example">
					
							<thead class="thead-inverse">
								<tr>
									<th>Company Name</th>
									<th>Conact Name</th>
									<th>City</th>
									<th>Country</th>
									<th>Listing Phone</th>
									<th>Listing Email</th>
									<th>Listing Website</th>
									<th></th>
								</tr>
							</thead>
					
							<tbody>
								<% @member_listings.each do |member_listing| %>
									<tr>
										<td class="highlight"><%= link_to member_listing.mbcompanyname, member_profile_listing_path(member_listing.profile, member_listing) %></td>
										<td class="highlight"><%= link_to member_listing.mbcontactname, member_profile_listing_path(member_listing.profile, member_listing) %></td>
										<td class="highlight"><%= link_to member_listing.mbcity, member_profile_listing_path(member_listing.profile, member_listing) %></td>
										<td class="highlight"><%= link_to member_listing.mbcountry, member_profile_listing_path(member_listing.profile, member_listing) %></td>
										<td class="highlight"><%= link_to member_listing.mbphone, member_profile_listing_path(member_listing.profile, member_listing) %></td>
										<td class="highlight"><%= link_to member_listing.mbcontactemail, member_profile_listing_path(member_listing.profile, member_listing) %></td>
										<td class="highlight"><%= link_to member_listing.mbwebsite, member_profile_listing_path(member_listing.profile, member_listing) %></td>
										<td><%= link_to 'Remove', member_profile_listing_path(member_listing.profile, member_listing), class: "btn btn-danger btn-xs", method: :delete, data: { confirm: 'Are you sure? This will remove address information and cannot be reversed.' } %></td>
									</tr>
								<% end %>
							</tbody>
					
						</table>
					</div>
				</div>

			</div>

		</div>
	</div>

</div>