You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
3.7 KiB

10 years ago
  1. @model IQueryable<Sevomin.Models.Ad>
  2. @if (Model.Any())
  3. {
  4. <div class="row">
  5. <div class="col-md-12 rtl">
  6. <div class="panel panel-default" id="ad-management-panel">
  7. <div class="panel-heading">
  8. <h4 class="panel-title"><a data-toggle="collapse" data-parent="ad-management-panel" href="#ad-management-panel-body">ویرایش متن راهنمای پارامترها</a></h4>
  9. </div>
  10. <div id="ad-management-panel-body" class="panel-collapse collapse in">
  11. <div class="panel-body">
  12. <div class="panel-heading">
  13. <div class="panel-title">
  14. آگهی های فعال
  15. </div>
  16. </div>
  17. <div class="panel-body">
  18. <ul>
  19. @foreach (var ad in Model.Where(m => m.Active))
  20. {
  21. <li>
  22. <div class="col-md-6">
  23. @ad.Title
  24. </div>
  25. <div class="col-md-2">
  26. <input type="number" placeholder="تغییر روز" name="ChangeDays" value="@ad.Duration" />
  27. </div>
  28. <div class="col-md-2">
  29. <button type="submit" class="btn btn-success">
  30. <a href="@Url.Action("ChangeDays", new { id = ad.Id })">تغییر روز</a>
  31. </button>
  32. </div>
  33. <div class="col-md-2">
  34. <button type="submit" class="btn btn-default">
  35. <a href="@Url.Action("ToggleAd", new { id = ad.Id })">غیر فعالسازی</a>
  36. </button>
  37. </div>
  38. </li>
  39. }
  40. </ul>
  41. </div>
  42. <div class="panel-heading">
  43. <div class="panel-title">
  44. آگهی های غیر فعال
  45. </div>
  46. </div>
  47. <div class="panel-body">
  48. <ul>
  49. @foreach (var ad in Model.Where(m => !m.Active))
  50. {
  51. <li>
  52. <div class="col-md-3">
  53. @ad.Title
  54. </div>
  55. <div class="col-md-7">
  56. @ad.Description
  57. </div>
  58. <div class="col-md-2">
  59. <button type="submit" class="btn btn-default">
  60. <a href="@Url.Action("ToggleAd", new { id = ad.Id })">فعالسازی</a>
  61. </button>
  62. </div>
  63. </li>
  64. }
  65. </ul>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. }