public string get_partial(PartialInput input) { var builder = new StringBuilder(); var partialModels = new[] { new PartialViewModel { Name = "Item1" }, new PartialViewModel { Name = "Item2" }, new PartialViewModel { Name = "Item3" } }; partialModels.Each(m => { _request.Set(m); var page = new FubuHtmlDocument <PartialViewModel>(_locator, _request); builder.AppendLine(SourceModifier(page).ToString()); //builder.AppendLine(); }); return(builder.ToString()); }
public virtual HtmlDocument BuildView(LoginRequest request) { // TODO -- Revisit all of this when we get HTML conventions everywhere var view = new FubuHtmlDocument <LoginRequest>(_services, _request); var form = view.FormFor <LoginRequest>(); form.Append(new HtmlTag("legend").Text(LoginKeys.Login)); if (request.Message.IsNotEmpty()) { form.Append(new HtmlTag("p").Text(request.Message).Style("color", "red")); } form.Append(view.Edit(x => x.UserName)); form.Append(view.Edit(x => x.Password)); form.Append(view.Edit(x => x.RememberMe)); form.Append(view.DisplayFor(x => x.Message).Id("login-message")); form.Append(new HiddenTag().Name("Url").Attr("value", request.Url)); form.Append(new HtmlTag("input").Attr("type", "submit").Attr("value", LoginKeys.Login).Id("login-submit")); view.Add(form); view.Add(new LiteralTag(view.WriteExtensions().ToHtmlString())); return(view); }
public FubuContinuation CreateCombinations() { var doc = new FubuHtmlDocument(_serviceLocator); doc.WriteCssTags("site-styles"); doc.WriteScriptTags("site-scripts"); return FubuContinuation.RedirectTo<HomeAction>(x => x.Home()); }
public CaseController(IRepository repository, FubuHtmlDocument <Case> document, ISqlRunner runner, IUrlRegistry urls) { _repository = repository; _document = document; _runner = runner; _urls = urls; }
public void WriteAssetsInto(FubuHtmlDocument document, IEnumerable<Specification> specs) { RegisterRequirements(specs); document.WriteAssetsToHead(); RegisterSpecifications(specs); document.WriteAssetsToHead(); }
public HomeEndpoint(IServiceBus serviceBus, INumberCache cache, FubuHtmlDocument document, FubuRuntime runtime, MessagePumper pumper) { _serviceBus = serviceBus; _cache = cache; _document = document; _runtime = runtime; _pumper = pumper; }
public void WriteAssetsInto(FubuHtmlDocument document, IEnumerable <Specification> specs) { RegisterRequirements(specs); document.WriteAssetsToHead(); RegisterSpecifications(specs); document.WriteAssetsToHead(); }
public DetailTableBuilder(FubuHtmlDocument document) { _document = document; _detailTag = new DetailsTableTag(); _document.Add(_detailTag); }
public Visualizer(BehaviorGraph graph, FubuHtmlDocument document) { _document = document; _hasVisualizer = new Cache <Type, bool>(type => { return(graph.Behaviors.Any(x => type == x.InputType())); }); }
public HomeEndpoint(IClientConnector connector, StorytellerContext context, FubuHtmlDocument document, IPersistenceController persistence, IAssetTagBuilder tags, IFubuApplicationFiles files) { _connector = connector; _context = context; _document = document; _persistence = persistence; _tags = tags; _files = files; }
public void SetUp() { var services = new InMemoryServiceLocator(); theDocument = new FubuHtmlDocument(services); theDocument.Push("div"); theBuilder = new DetailTableBuilder(theDocument); }
public JasminePages(SpecificationGraph specifications, SpecHierarchyBuilder builder, SpecAssetRequirements requirements, FubuHtmlDocument document) { _specifications = specifications; _builder = builder; _requirements = requirements; _document = document; _document.Body.Append(new HtmlTag("div").Text(_header).Encoded(false)); }
public HtmlDocument GettingStarted() { var document = new FubuHtmlDocument(_services); document.Title = "Getting Started with FubuMVC"; document.Add(x => x.Image("logo.png")); document.Push("div"); document.Add("hr"); document.Add(x => x.LinkTo<BehaviorGraphWriter>(o => o.Index()).Text("Diagnostics for your application")); document.Add("div").Encoded(false).Text(getContent()); return document; }
public HtmlDocument GettingStarted() { var document = new FubuHtmlDocument(_services); document.Title = "Getting Started with FubuMVC"; document.Add(x => x.Image("logo.png")); document.Push("div"); document.Add("hr"); document.Add(x => x.LinkTo <BehaviorGraphWriter>(o => o.Index()).Text("Diagnostics for your application")); document.Add("div").Encoded(false).Text(getContent()); return(document); }
public HtmlDocument get_person_Name(TextModel model) { var document = new FubuHtmlDocument <TextModel>(_services, new InMemoryFubuRequest()) { Model = model }; document.Title = "Persion:" + model.Name; document.Push("p"); document.Add(x => x.LabelFor(o => o.Name)); document.Add(x => x.InputFor(o => o.Name)); return(document); }
public HtmlDocument get_person_Name(TextModel model) { var document = new FubuHtmlDocument <TextModel>(_services, new InMemoryFubuRequest()) { Model = model }; document.Title = "Persion:" + model.Name; document.Push("p"); document.Add("span").Text(document.Model.Name); document.Add("input").Attr("type", "text").Id("Name").Name("Name").Value(model.Name); return(document); }
public HtmlDocument get_register(CreateAccount account) { var document = new FubuHtmlDocument<CreateAccount>(_services, _request); var form = document.FormFor<CreateAccount>() .Append(document.Edit(x => x.Name)) .Append(document.Edit(x => x.EmailAddress)) .Append(document.Edit(x => x.Password)) .Append(document.Edit(x => x.Subscriptions)) .Append(new HtmlTag("input").Attr("type", "submit").Attr("value", "Create Account").Id(Submit)); document.Add("h1").Text("Create New Account"); document.Add(form); return document; }
public HtmlDocument GettingStarted() { var document = new FubuHtmlDocument(_services); document.Title = "Getting Started with FubuMVC"; document.Add(x => x.Image("logo.png")); document.Push("div"); document.Add("hr"); // we're gonna cheat here since the diagnostics markers changed // TODO -- Share input models for the dashboard document.Add(new LinkTag("Diagnostics for your application", _request.ToFullUrl("_fubu"))); document.Add("div").Encoded(false).Text(getContent()); return document; }
public HtmlDocument GettingStarted() { var document = new FubuHtmlDocument(_services); document.Title = "Getting Started with FubuMVC"; document.Add(x => x.Image("logo.png")); document.Push("div"); document.Add("hr"); // we're gonna cheat here since the diagnostics markers changed // TODO -- Share input models for the dashboard document.Add(new LinkTag("Diagnostics for your application", _request.ToFullUrl("_fubu"))); document.Add("div").Encoded(false).Text(getContent()); return(document); }
public HtmlDocument Home() { var doc = new FubuHtmlDocument(_serviceLocator); doc.Add("div").Add("a") .Attr("href", "/_content/styles/c7006a7dd72c7f9160a2e2edd8ac9265.css") .Attr("target", "_blank") .Text("site-styles"); doc.Add("div").Add("a") .Attr("href", "/_content/scripts/c31341d908c2ecf36dccc1f009346361.js") .Attr("target", "_blank") .Text("site-scripts"); doc.Add("div").Add("a") .Attr("href", doc.Urls.UrlFor<HomeAction>(x => x.CreateCombinations())) .Text("create combinations"); doc.Add("div").Add("a") .Attr("href", doc.Urls.UrlFor<HomeAction>(x => x.RecycleApp())) .Text("recycle app"); return doc; }
public HomeEndpoint(IServiceBus serviceBus, INumberCache cache, FubuHtmlDocument document) { _serviceBus = serviceBus; _cache = cache; _document = document; }
public AjaxEndpoint(FubuHtmlDocument <AjaxModel> page) { _page = page; }
public InstrumentationEndpoint(FubuHtmlDocument document, IUrlRegistry urls) { _document = document; _urls = urls; }
public AppErrorEndpoint(FubuHtmlDocument document) { _document = document; }
public IgnoredEndpoint(FubuHtmlDocument<IgnoredModel> page) { _page = page; }
public TagBuildingEndpoint(FubuHtmlDocument document) { _document = document; }
public IndexerOwnerEndpoint(FubuHtmlDocument<Parent> document) { _document = document; }
public SelectTagEndpoint(FubuHtmlDocument<SelectTagModel> page) { _page = page; }
public CachedEndpoints(FubuHtmlDocument document, IOutputWriter writer, IPartialInvoker partials) { _document = document; _writer = writer; _partials = partials; }
public HomeEndpoint(BehaviorGraph graph, FubuHtmlDocument document, ILogger logger) { _graph = graph; _document = document; _logger = logger; }
public static void WriteAssetsToHead(this FubuHtmlDocument document) { document.Head.Append(document.WriteAssetTags()); }
public ConventionEndpoint(FubuHtmlDocument<ImageTarget> document) { _document = document; }
public IndexerOwnerEndpoint(FubuHtmlDocument <Parent> document) { _document = document; }
public ElementHandlerEndpoint(FubuHtmlDocument <ElementHandler> page) { _page = page; }
public JavascriptRoutesEndpoint(FubuHtmlDocument document) { _document = document; }
public CachedEndpoints(FubuHtmlDocument document, IOutputWriter writer) { _document = document; _writer = writer; }
public CreateUserEndpoint(FubuHtmlDocument<User> page, IUserService users) { _page = page; _users = users; }
public HomeEndpoint(FubuHtmlDocument document) { _document = document; }
public FormRequestEndpoint(FubuHtmlDocument <FormTagModel> document) { _document = document; }
public AjaxEndpoint(FubuHtmlDocument<AjaxModel> page) { _page = page; }
public IgnoredEndpoint(FubuHtmlDocument <IgnoredModel> page) { _page = page; }
public ShowEditEndpoints(FubuHtmlDocument<ShowModel> document, ActiveProfile profile) { _document = document; _profile = profile; }
public ChainEndpoint(IUrlRegistry urls, BehaviorGraph graph, FubuHtmlDocument document) { _urls = urls; _graph = graph; _document = document; }
public PublicAssetFolderEndpoint(FubuHtmlDocument document) { _document = document; }
public static void WriteScriptsToBody(this FubuHtmlDocument document) { document.Body.Append(document.WriteScriptTags()); }
public AssetEndpoint(FubuHtmlDocument document) { _document = document; }
public IntegrationEndpoint(FubuHtmlDocument<IntegrationModel> page) { _page = page; }
public ConventionEndpoint(FubuHtmlDocument <ConventionTarget> document) { _document = document; }
public InlineModelEndpoint(FubuHtmlDocument<InlineModel> page) { _page = page; }