Ejemplo n.º 1
0
        public ActionResult ViewAppendix(string appendix)
        {
            HelpPermissions.ViewHelp.AssertAuthorized();

            AppendixHelp model = HelpLogic.GetAppendixHelp(appendix);

            return(View(HelpClient.ViewAppendixUrl, model));
        }
Ejemplo n.º 2
0
        public ActionResult NewAppendix()
        {
            HelpPermissions.ViewHelp.AssertAuthorized();

            var          culture = HelpLogic.GetCulture();
            AppendixHelp model   = new AppendixHelp(culture, new AppendixHelpEntity {
                Culture = culture.ToCultureInfoEntity()
            });

            return(View(HelpClient.ViewAppendixUrl, model));
        }
Ejemplo n.º 3
0
        public override void Execute()
        {
            WriteLiteral("\r\n");

            DefineSection("head", () => {
                WriteLiteral("\r\n");

                WriteLiteral("    ");


            #line 10 "..\..\Help\Views\ViewAppendix.cshtml"
                Write(Html.ScriptCss("~/help/Content/help.css"));


            #line default
            #line hidden
                WriteLiteral("\r\n");
            });

            WriteLiteral("\r\n");


            #line 13 "..\..\Help\Views\ViewAppendix.cshtml"

            AppendixHelp ah = (AppendixHelp)Model;
            ViewBag.Title = ah.Title;


            #line default
            #line hidden
            WriteLiteral("\r\n\r\n\r\n\r\n\r\n\r\n<div");

            WriteLiteral(" class=\"row\"");

            WriteLiteral(">\r\n    <div");

            WriteLiteral(" class=\"col-md-9\"");

            WriteLiteral(" id=\"entityName\"");

            WriteLiteral(">\r\n");


            #line 24 "..\..\Help\Views\ViewAppendix.cshtml"


            #line default
            #line hidden

            #line 24 "..\..\Help\Views\ViewAppendix.cshtml"
            using (TypeContext <AppendixHelpEntity> ac = new TypeContext <AppendixHelpEntity>(ah.Entity, null))
            {
                using (Html.BeginForm((HelpController hc) => hc.SaveAppendix(), new { id = "form-save" }))
                {
            #line default
            #line hidden

            #line 28 "..\..\Help\Views\ViewAppendix.cshtml"
                    Write(Html.HiddenRuntimeInfo(ac));


            #line default
            #line hidden

            #line 28 "..\..\Help\Views\ViewAppendix.cshtml"



            #line default
            #line hidden

            #line 29 "..\..\Help\Views\ViewAppendix.cshtml"
                    Write(Html.HiddenRuntimeInfo(ac, e => e.Culture));


            #line default
            #line hidden

            #line 29 "..\..\Help\Views\ViewAppendix.cshtml"


                    if (!Navigator.IsReadOnly(typeof(AppendixHelpEntity)))
                    {
                        Html.RenderPartial(HelpClient.Buttons, new ViewDataDictionary
                        {
                            { "options", Database.Query <AppendixHelpEntity>()
                              .Where(e => e.UniqueName == ac.Value.UniqueName && e.Culture != ac.Value.Culture)
                              .Select(e => new { e.Culture })
                              .ToList()
                              .Select(e => KVP.Create(e.Culture.ToCultureInfo(), this.Url.Action((HelpController a) => a.TraslateAppendix(e.Culture.Name))))
                              .ToDictionary() }
                        });
                    }
                    if (ac.Value.UniqueName == null)
                    {
            #line default
            #line hidden
                        WriteLiteral("                    <br />\r\n");


            #line 46 "..\..\Help\Views\ViewAppendix.cshtml"


            #line default
            #line hidden

            #line 46 "..\..\Help\Views\ViewAppendix.cshtml"
                        Write(Html.ValueLine(ac, e => e.UniqueName));


            #line default
            #line hidden

            #line 46 "..\..\Help\Views\ViewAppendix.cshtml"



            #line default
            #line hidden
                        WriteLiteral("            <br />\r\n");

                        WriteLiteral("            <script>\r\n");

                        WriteLiteral("                ");


            #line 49 "..\..\Help\Views\ViewAppendix.cshtml"
                        Write(HelpClient.Module["edit"]());


            #line default
            #line hidden
                        WriteLiteral("\r\n            </script>\r\n");


            #line 51 "..\..\Help\Views\ViewAppendix.cshtml"
                    }
                    else
                    {
            #line default
            #line hidden

            #line 54 "..\..\Help\Views\ViewAppendix.cshtml"
                        Write(Html.HiddenLine(ac, e => e.UniqueName));


            #line default
            #line hidden

            #line 54 "..\..\Help\Views\ViewAppendix.cshtml"
                    }


            #line default
            #line hidden
                    WriteLiteral("            <h1>\r\n");

                    WriteLiteral("                ");


            #line 57 "..\..\Help\Views\ViewAppendix.cshtml"
                    Write(Html.TextArea(ac.SubContextPrefix(a => a.Title), ah.Title, 1, 80, new { @class = "editable" }));


            #line default
            #line hidden
                    WriteLiteral("\r\n                <span");

                    WriteLiteral(" class=\"wiki\"");

                    WriteLiteral(">\r\n");

                    WriteLiteral("                    ");


            #line 59 "..\..\Help\Views\ViewAppendix.cshtml"
                    Write(Model.Title);


            #line default
            #line hidden
                    WriteLiteral("\r\n                </span>\r\n            </h1>\r\n");


            #line 62 "..\..\Help\Views\ViewAppendix.cshtml"
                    if (ac.Value.UniqueName != null)
                    {
            #line default
            #line hidden
                        WriteLiteral("            <code");

                        WriteLiteral(" class=\"shortcut\"");

                        WriteLiteral(">[a:");


            #line 64 "..\..\Help\Views\ViewAppendix.cshtml"
                        Write(ah.UniqueName);


            #line default
            #line hidden
                        WriteLiteral("]</code>\r\n");


            #line 65 "..\..\Help\Views\ViewAppendix.cshtml"
                    }


            #line default
            #line hidden

            #line 66 "..\..\Help\Views\ViewAppendix.cshtml"
                    Write(Html.TextArea(ac.SubContextPrefix(a => a.Description), ah.Description, 5, 80, new { @class = "editable" }));


            #line default
            #line hidden

            #line 66 "..\..\Help\Views\ViewAppendix.cshtml"



            #line default
            #line hidden
                    WriteLiteral("            <span");

                    WriteLiteral(" class=\"wiki\"");

                    WriteLiteral(">\r\n");

                    WriteLiteral("                ");


            #line 68 "..\..\Help\Views\ViewAppendix.cshtml"
                    Write(Html.WikiParse(ah.Description, HelpWiki.DefaultWikiSettings));


            #line default
            #line hidden
                    WriteLiteral("\r\n            </span>\r\n");


            #line 70 "..\..\Help\Views\ViewAppendix.cshtml"
                }
            }


            #line default
            #line hidden
            WriteLiteral("    </div>\r\n    <div");

            WriteLiteral(" class=\"col-md-3\"");

            WriteLiteral(">\r\n");


            #line 74 "..\..\Help\Views\ViewAppendix.cshtml"


            #line default
            #line hidden

            #line 74 "..\..\Help\Views\ViewAppendix.cshtml"
            Html.RenderPartial(HelpClient.MiniMenu, new ViewDataDictionary {
                { "appendix", ah.UniqueName }
            });

            #line default
            #line hidden
            WriteLiteral("\r\n    </div>\r\n</div>\r\n");
        }