Пример #1
0
 private static HtmlBuilder AccountMenu(this HtmlBuilder hb)
 {
     return(hb.Ul(id: "AccountMenu", css: "menu", action: () => hb
                  .Li(action: () => hb
                      .A(
                          href: Locations.Logout(),
                          action: () => hb
                          .Span(css: "ui-icon ui-icon-locked")
                          .Text(text: Displays.Logout())))
                  .Li(
                      action: () => hb
                      .A(
                          href: Locations.Edit("Users", Sessions.UserId()),
                          action: () => hb
                          .Span(css: "ui-icon ui-icon-wrench")
                          .Text(text: Displays.EditProfile())),
                      _using: Parameters.Service.ShowProfiles)
                  .Li(
                      action: () => hb
                      .A(
                          href: Locations.Get("Users", "EditApi"),
                          action: () => hb
                          .Span(css: "ui-icon ui-icon-link")
                          .Text(text: Displays.ApiSettings())),
                      _using: Contract.Api())
                  .Li(action: () => hb
                      .A(
                          href: Parameters.General.HtmlUsageGuideUrl,
                          target: "_blank",
                          action: () => hb
                          .Span(css: "ui-icon ui-icon-help")
                          .Text(text: Displays.UsageGuide())))
                  .Li(action: () => hb
                      .A(
                          href: Parameters.General.HtmlBlogUrl,
                          target: "_blank",
                          action: () => hb
                          .Span(css: "ui-icon ui-icon-info")
                          .Text(text: Displays.Blog())))
                  .Li(action: () => hb
                      .A(
                          href: Parameters.General.HtmlCopyrightUrl,
                          target: "_blank",
                          action: () => hb
                          .Span(css: "ui-icon ui-icon-contact")
                          .Text(text: Displays.Support())))
                  .Li(action: () => hb
                      .A(
                          href: Parameters.General.HtmlPortalUrl,
                          target: "_blank",
                          action: () => hb
                          .Span(css: "ui-icon ui-icon-cart")
                          .Text(text: Displays.Portal())))
                  .Li(action: () => hb
                      .A(
                          href: Locations.Get("versions"),
                          action: () => hb
                          .Span(css: "ui-icon ui-icon-info")
                          .Text(text: Displays.Version())))));
 }
Пример #2
0
 private static HtmlBuilder HelpMenu(
     this HtmlBuilder hb,
     Context context)
 {
     return(hb.Ul(
                id: "HelpMenu",
                css: "menu",
                action: () => hb
                .Li(action: () => hb
                    .A(
                        href: Parameters.General.HtmlUserManualUrl,
                        target: "_blank",
                        action: () => hb
                        .Span(css: "ui-icon ui-icon-help")
                        .Text(text: Displays.UserManual(context: context))))
                .Li(action: () => hb
                    .A(
                        href: Parameters.General.HtmlAnnualSupportServiceUrl,
                        target: "_blank",
                        action: () => hb
                        .Span(css: "ui-icon ui-icon-clipboard")
                        .Text(text: Displays.AnnualSupportService(context: context))))
                .Li(action: () => hb
                    .A(
                        href: Parameters.General.HtmlEnterPriseEditionUrl,
                        target: "_blank",
                        action: () => hb
                        .Span(css: "ui-icon ui-icon-lightbulb")
                        .Text(text: Displays.EnterpriseEdition(context: context))))
                .Li(action: () => hb
                    .A(
                        href: Parameters.General.HtmlBlogUrl,
                        target: "_blank",
                        action: () => hb
                        .Span(css: "ui-icon ui-icon-info")
                        .Text(text: Displays.Blog(context: context))))
                .Li(action: () => hb
                    .A(
                        href: Parameters.General.HtmlContactUrl,
                        target: "_blank",
                        action: () => hb
                        .Span(css: "ui-icon ui-icon-contact")
                        .Text(text: Displays.Contact(context: context))))
                .Li(action: () => hb
                    .A(
                        href: Parameters.General.HtmlPortalUrl,
                        target: "_blank",
                        action: () => hb
                        .Span(css: "ui-icon ui-icon-cart")
                        .Text(text: Displays.Portal(context: context))))
                .Li(action: () => hb
                    .A(
                        href: Locations.Get(
                            context: context,
                            parts: "versions"),
                        action: () => hb
                        .Span(css: "ui-icon ui-icon-info")
                        .Text(text: Displays.Version(context: context))))));
 }
 private static HtmlBuilder AccountMenu(this HtmlBuilder hb, Context context)
 {
     return(hb.Ul(id: "AccountMenu", css: "menu", action: () => hb
                  .Li(action: () => hb
                      .A(
                          href: Locations.Logout(context: context),
                          action: () => hb
                          .Span(css: "ui-icon ui-icon-locked")
                          .Text(text: Displays.Logout(context: context))))
                  .Li(action: () => hb
                      .A(
                          href: Parameters.General.HtmlUserManualUrl,
                          target: "_blank",
                          action: () => hb
                          .Span(css: "ui-icon ui-icon-help")
                          .Text(text: Displays.UserManual(context: context))))
                  .Li(
                      action: () => hb
                      .A(
                          href: "javascript:void(0);",
                          attributes: new HtmlAttributes()
                          .OnClick("$p.setStartGuide(0,1);"),
                          action: () => hb
                          .Span(css: "ui-icon ui-icon-help")
                          .Text(text: Displays.ShowStartGuide(context: context))),
                      _using: context.UserSettings.ShowStartGuideAvailable(context: context))
                  .Li(
                      action: () => hb
                      .A(
                          href: Locations.Edit(
                              context: context,
                              controller: "Users",
                              id: context.UserId),
                          action: () => hb
                          .Span(css: "ui-icon ui-icon-wrench")
                          .Text(text: Displays.EditProfile(context: context))),
                      _using: Parameters.Service.ShowProfiles)
                  .Li(
                      action: () => hb
                      .A(
                          href: Locations.Get(
                              context: context,
                              parts: new string[]
     {
         "Users",
         "EditApi"
     }),
                          action: () => hb
                          .Span(css: "ui-icon ui-icon-link")
                          .Text(text: Displays.ApiSettings(context: context))),
                      _using: context.ContractSettings.Api != false && Parameters.Api.Enabled)
                  .Li(action: () => hb
                      .A(
                          href: Parameters.General.HtmlBlogUrl,
                          target: "_blank",
                          action: () => hb
                          .Span(css: "ui-icon ui-icon-info")
                          .Text(text: Displays.Blog(context: context))))
                  .Li(action: () => hb
                      .A(
                          href: Parameters.General.HtmlSupportUrl,
                          target: "_blank",
                          action: () => hb
                          .Span(css: "ui-icon ui-icon-contact")
                          .Text(text: Displays.Support(context: context))))
                  .Li(action: () => hb
                      .A(
                          href: Parameters.General.HtmlContactUrl,
                          target: "_blank",
                          action: () => hb
                          .Span(css: "ui-icon ui-icon-contact")
                          .Text(text: Displays.Contact(context: context))))
                  .Li(action: () => hb
                      .A(
                          href: Parameters.General.HtmlPortalUrl,
                          target: "_blank",
                          action: () => hb
                          .Span(css: "ui-icon ui-icon-cart")
                          .Text(text: Displays.Portal(context: context))))
                  .Li(action: () => hb
                      .A(
                          href: Locations.Get(
                              context: context,
                              parts: "versions"),
                          action: () => hb
                          .Span(css: "ui-icon ui-icon-info")
                          .Text(text: Displays.Version(context: context))))));
 }