Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2017
750
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 7.10 KB | None | 0 0
  1. @model DormXpress.ViewModels.DormitoryViewViewModel
  2.  
  3. @{
  4.     ViewBag.Title = Model.DormitoryInformation.Rows[0]["Address"] + " | DormXpress.com";
  5.     Layout = "~/Views/Shared/_Layout.cshtml";
  6. }
  7.  
  8. <style>
  9.     body {
  10.         background: rgb(233, 235, 238);
  11.     }
  12. </style>
  13.  
  14. <div class="container-fluid" style="margin-top: 20px;">
  15.     <div class="row">
  16.         <div class="col-md-8 col-xs-12">
  17.  
  18.             <div class="panel panel-default">
  19.                 <div class="panel-heading">
  20.                     <h4 class="panel-title">Dormitory information</h4>
  21.                 </div>
  22.                 <div class="panel-body">
  23.  
  24.                     <div class="form-group">
  25.                         <div id="GoogleMaps" style="height: 500px; max-width: inherit;"></div>
  26.                     </div>
  27.                     <hr/>
  28.                     <div class="row">
  29.                         <div class="col-xs-12">
  30.                             <div class="form-group">
  31.                                 <label style="color: cornflowerblue">@Model.DormitoryInformation.Rows[0]["Address"]</label>
  32.                                 <p>
  33.                                     posted on @Model.DormitoryInformation.Rows[0]["PostDate"] in <strong>Room</strong>
  34.                                 </p>
  35.                             </div>
  36.                             <div class="form-group">
  37.                                 <p style="white-space: pre-line">
  38.                                     @Model.DormitoryInformation.Rows[0]["Description"]
  39.                                 </p>
  40.                             </div>
  41.                         </div>
  42.                     </div>
  43.                     <hr style="margin-bottom: 3px" />
  44.                 </div>
  45.  
  46.  
  47.                 <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAp_GkAczL2VGgNGlw-M89nc4UINioGD5c&callback=initMap"></script>
  48.  
  49.                 <script>
  50.                     var AddressInfo = '<div id="content">' +
  51.                         '<p><b>@Model.DormitoryInformation.Rows[0]["Address"]</b></p>' +
  52.                         '</div>';
  53.  
  54.                     var infowindow = new google.maps.InfoWindow({
  55.                         content: AddressInfo
  56.                     });
  57.  
  58.                     function initialize() {
  59.                         var myLatlng = new google.maps.LatLng(@Model.DormitoryInformation.Rows[0]["Latitude"], @Model.DormitoryInformation.Rows[0]["Longitude"]);
  60.                         var mapOptions = {
  61.                             zoom: 17,
  62.                             center: myLatlng
  63.                         }
  64.                         var map = new google.maps.Map(document.getElementById("GoogleMaps"), mapOptions);
  65.  
  66.                         var marker = new google.maps.Marker({
  67.                             position: myLatlng,
  68.                         });
  69.  
  70.                         marker.setMap(map);
  71.                         infowindow.open(map, marker);
  72.  
  73.                         marker.addListener('click', function() {
  74.                             infowindow.open(map, marker);
  75.                         });
  76.                     }
  77.                     google.maps.event.addDomListener(window, 'load', initialize);
  78.                 </script>
  79.  
  80.  
  81.             </div>
  82.         </div>
  83.         <div class="col-md-4 col-xs-12">
  84.             <div class="panel panel-default">
  85.                 <div class="panel-heading">
  86.                     <h4 class="panel-title">Profile view</h4>
  87.                 </div>
  88.                 <div class="panel-body">
  89.                     <div class="row">
  90.                         <div class="col-xs-12">
  91.                             <div class="centerblock">
  92.                                 <img src="~/Images/User/image.png" class="user" />
  93.                             </div>
  94.                             <p></p>
  95.                             <div class="centerblock">
  96.                                 <label>@Model.DormitoryInformation.Rows[0]["FirstName"] @Model.DormitoryInformation.Rows[0]["LastName"]</label>
  97.                             </div>
  98.                             <div class="centerblock">
  99.                                 <p style="font-size: 13px; color: #A8A8A8"><span class="glyphicon glyphicon-envelope"></span> @Model.DormitoryInformation.Rows[0]["Email"]</p>
  100.                             </div>
  101.                             <div class="centerblock">
  102.                                 <p style="font-size: 13px; color: #A8A8A8"><span class="glyphicon glyphicon-earphone"></span> @Model.DormitoryInformation.Rows[0]["ContactNo"]</p>
  103.                             </div>
  104.                         </div>
  105.                     </div>
  106.                     <hr />
  107.  
  108.                     <div class="row">
  109.                         <div class="col-xs-10 col-xs-offset-1">
  110.                             @using (Html.BeginForm("Reserve", "Reservation", FormMethod.Post))
  111.                             {
  112.                                 <div class="form-group">
  113.                                    
  114.                                     @if (Session["Usertype"] == (object) 2)
  115.                                     {
  116.                                         <label class="centerblock" style="margin-bottom: 20px">Request for a reservation?</label>
  117.                                         @Html.TextAreaFor(m => m.Reserve.Message, new { @class="form-control", style="min-height: 100px; max-width: inherit", placeholder="Write your message..." })
  118.                                         @Html.ValidationMessageFor(m => m.Reserve.Message)
  119.                                         <button type="submit" class=" form-control btn btn-success" style="margin-top: 12px">Submit</button>
  120.                                     }
  121.                                     else if (Session["Usertype"] != null)
  122.                                     {
  123.  
  124.                                     }
  125.                                     else
  126.                                     {
  127.                                         <label class="centerblock" style="margin-bottom: 20px">Request for a reservation?</label>
  128.                                         <div class="centerblock">
  129.                                             <p style="text-align: center">You're not logged in to request for a reservation.</p>
  130.                                         </div>
  131.                                         <div class="centerblock">
  132.                                             <a href="/Login?redirecttocontroller=Dormitory&redirecttoaction=View&id=@Model.ID"><strong>Click here to log in.</strong></a>
  133.                                         </div>
  134.                                         <div class="centerblock">
  135.                                             <h5>Don't have an account? <a href="/Register"><strong>Register here.</strong></a></h5>
  136.                                         </div>
  137.                                     }
  138.                                 </div>
  139.                             }
  140.                         </div>
  141.                     </div>
  142.                 </div>
  143.             </div>
  144.         </div>
  145.     </div>
  146.  
  147. </div>
  148.  
  149. @section scripts
  150. {
  151.     @Scripts.Render("~/bundles/jqueryval")
  152. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement