Esempio n. 1
0
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
#line 3 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Index.cshtml"

            ViewData["Title"] = "لیست پست ها";

#line default
#line hidden
            BeginContext(94, 2, true);
            WriteLiteral("\r\n");
            EndContext();
            BeginContext(96, 98, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("link", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "9e581cb8d7ab489983c97798cfaedc34", async() => {
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(194, 2, true);
            WriteLiteral("\r\n");
            EndContext();
            BeginContext(196, 96, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("link", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "64cc04b12dc746f9af3fd78ce4ae5f20", async() => {
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(292, 2, true);
            WriteLiteral("\r\n");
            EndContext();
            BeginContext(294, 147, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "a3faf27e89d142a2b416454d096a17ef", async() => {
                BeginContext(372, 34, true);
                WriteLiteral("\r\n    <i class=\"fa fa-plus\"></i>  ");
                EndContext();
                BeginContext(407, 23, false);
#line 10 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Index.cshtml"
                Write(ViewBag.postTypeDisplay);

#line default
#line hidden
                EndContext();
                BeginContext(430, 7, true);
                WriteLiteral(" جدید\r\n");
                EndContext();
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
            __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_4.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_5);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(441, 225, true);
            WriteLiteral("\r\n<div class=\"row\">\r\n    <div class=\"col-sm-12 \">\r\n\r\n        <table id=\"tblList\" class=\"table table-bordered dt-responsive nowrap w-100 align-items-center\">\r\n            <thead>\r\n                <tr>\r\n                    <th>");
            EndContext();
            BeginContext(667, 42, false);
#line 18 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Index.cshtml"
            Write(Html.DisplayNameFor(p => p.ThumbPostImage));

#line default
#line hidden
            EndContext();
            BeginContext(709, 31, true);
            WriteLiteral("</th>\r\n                    <th>");
            EndContext();
            BeginContext(741, 33, false);
#line 19 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Index.cshtml"
            Write(Html.DisplayNameFor(p => p.Title));

#line default
#line hidden
            EndContext();
            BeginContext(774, 31, true);
            WriteLiteral("</th>\r\n                    <th>");
            EndContext();
            BeginContext(806, 39, false);
#line 20 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Index.cshtml"
            Write(Html.DisplayNameFor(p => p.IsPublished));

#line default
#line hidden
            EndContext();
            BeginContext(845, 262, true);
            WriteLiteral(@"</th>
                    <th>تاریخ ایجاد/ارسال</th>
                    <th>تعداد بازدید</th>
                    <th>ترجمه</th>
                    <th style=""width: 10%"">عملیات</th>

                </tr>
            </thead>


            <tbody>
");
            EndContext();
#line 31 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Index.cshtml"
            foreach (var item in Model ?? Enumerable.Empty <PostViewModel>())
            {
                var sendDate = item.IsPublished == true?PersianDateTime.ToPersianDate(item.PublishDate.Value) : PersianDateTime.ToPersianDate(item.CreateDate);

#line default
#line hidden
                BeginContext(1376, 81, true);
                WriteLiteral("                    <tr >\r\n                        <td><img class=\"img-thumbnail\"");
                EndContext();
                BeginWriteAttribute("src", " src=\"", 1457, "\"", 1483, 1);
#line 35 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Index.cshtml"
                WriteAttributeValue("", 1463, item.ThumbPostImage, 1463, 20, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(1484, 38, true);
                WriteLiteral("/> </td>\r\n                        <td>");
                EndContext();
                BeginContext(1523, 10, false);
#line 36 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Index.cshtml"
                Write(item.Title);

#line default
#line hidden
                EndContext();
                BeginContext(1533, 35, true);
                WriteLiteral("</td>\r\n                        <td>");
                EndContext();
#line 37 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Index.cshtml"
                var state = item.IsPublished ? "منشر شده" : "منتشر نشده";

#line default
#line hidden
                BeginContext(1631, 5, false);
#line 37 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Index.cshtml"
                Write(state);

#line default
#line hidden
                EndContext();
                BeginContext(1636, 35, true);
                WriteLiteral("</td>\r\n                        <td>");
                EndContext();
                BeginContext(1672, 8, false);
#line 38 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Index.cshtml"
                Write(sendDate);

#line default
#line hidden
                EndContext();
                BeginContext(1680, 35, true);
                WriteLiteral("</td>\r\n                        <td>");
                EndContext();
                BeginContext(1716, 17, false);
#line 39 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Index.cshtml"
                Write(item.VisitCounter);

#line default
#line hidden
                EndContext();
                BeginContext(1733, 36, true);
                WriteLiteral("</td>\r\n                        <td> ");
                EndContext();
                BeginContext(1789, 30, true);
                WriteLiteral("\r\n                            ");
                EndContext();
                BeginContext(1819, 124, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "35084b5795d746318ad44b2805fdc873", async() => {
                    BeginContext(1932, 7, true);
                    WriteLiteral("English");
                    EndContext();
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_4.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4);
                if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null)
                {
                    throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-rid", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues"));
                }
                BeginWriteTagHelperAttribute();
#line 41 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Index.cshtml"
                WriteLiteral(item.Id);

#line default
#line hidden
                __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["rid"] = __tagHelperStringValueBuffer;
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-rid", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["rid"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null)
                {
                    throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-lang", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues"));
                }
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["lang"] = (string)__tagHelperAttribute_6.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_6);
                BeginWriteTagHelperAttribute();
#line 41 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Index.cshtml"
                WriteLiteral(ViewBag.postType);

#line default
#line hidden
                __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["posttype"] = __tagHelperStringValueBuffer;
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-posttype", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["posttype"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(1943, 92, true);
                WriteLiteral("\r\n                        </td>\r\n                        <td >\r\n                            ");
                EndContext();
                BeginContext(2035, 163, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("a", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "55a4ebf92af645af91622de9e0012f6b", async() => {
                    BeginContext(2154, 40, true);
                    WriteLiteral("<i class=\"fa fa-pencil ml-1\"></i> ویرایش");
                    EndContext();
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper);
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.Action = (string)__tagHelperAttribute_7.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_7);
                if (__Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues == null)
                {
                    throw new InvalidOperationException(InvalidTagHelperIndexerAssignment("asp-route-id", "Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper", "RouteValues"));
                }
                BeginWriteTagHelperAttribute();
#line 44 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Index.cshtml"
                WriteLiteral(item.Id);

#line default
#line hidden
                __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"] = __tagHelperStringValueBuffer;
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-id", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["id"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                BeginWriteTagHelperAttribute();
#line 44 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Index.cshtml"
                WriteLiteral(ViewBag.postType);

#line default
#line hidden
                __tagHelperStringValueBuffer = EndWriteTagHelperAttribute();
                __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["posttype"] = __tagHelperStringValueBuffer;
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-route-posttype", __Microsoft_AspNetCore_Mvc_TagHelpers_AnchorTagHelper.RouteValues["posttype"], global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_8);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(2198, 37, true);
                WriteLiteral("\r\n                            <button");
                EndContext();
                BeginWriteAttribute("dataId", "  dataId=\"", 2235, "\"", 2253, 1);
#line 45 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Index.cshtml"
                WriteAttributeValue("", 2245, item.Id, 2245, 8, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginWriteAttribute("dataTitle", " dataTitle=\"", 2254, "\"", 2283, 1);
#line 45 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Index.cshtml"
                WriteAttributeValue("", 2266, ViewBag.postType, 2266, 17, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(2284, 150, true);
                WriteLiteral(" class=\"btn btn-danger DeleteButton\"><i class=\"fa fa-remove ml-1\"></i> پاک کردن</button>\r\n                        </td>\r\n\r\n                    </tr>\r\n");
                EndContext();
#line 49 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Index.cshtml"
            }

#line default
#line hidden
            BeginContext(2453, 62, true);
            WriteLiteral("            </tbody>\r\n        </table>\r\n    </div>\r\n</div>\r\n\r\n");
            EndContext();
            DefineSection("Scripts", async() => {
                BeginContext(2532, 8, true);
                WriteLiteral("\r\n\r\n    ");
                EndContext();
                BeginContext(2540, 54, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("script", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "4aa3cddabc7c4d80a3c940255602dae0", async() => {
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_9);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(2594, 6, true);
                WriteLiteral("\r\n    ");
                EndContext();
                BeginContext(2600, 85, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("script", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "360be60aee01412bad2e4aea2af7cae5", async() => {
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_10);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(2685, 6, true);
                WriteLiteral("\r\n    ");
                EndContext();
                BeginContext(2691, 85, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("script", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "9c1202d5516748e8893f37a8b2256f51", async() => {
                }
                                                                            );
                __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_11);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(2776, 247, true);
                WriteLiteral("\r\n    <script>\r\n        $(document).ready(function () {\r\n            $(\'#tblList\').DataTable({\r\n                responsive: true,\r\n                \"language\": { \"url\": \"/lib/DataTables/Persian.json\" }\r\n            });\r\n        });\r\n    </script>\r\n");
                EndContext();
            }
                          );
        }