Giter Site home page Giter Site logo

Comments (9)

mjallday avatar mjallday commented on June 11, 2024

Please include the title as mocked in #33.

from balanced-dashboard.

nodesocket avatar nodesocket commented on June 11, 2024

Where is value {{ name }} coming from inside the marketplace.hbs file? Couldn't find it anywhere.

<h2><span class="marketplace-name">{{ name }}</span></h2>

I need to replace this with arbitrary page titles, i.e. Activity, Logs, etc.

from balanced-dashboard.

kleinsch avatar kleinsch commented on June 11, 2024

It's the name attribute for the marketplace. In Ember, all attributes come from the controller, which proxies a model object. If you query for the name attribute and the controller doesn't have an attribute with that name, it returns that attribute from the model set on it by the route (the marketplace in this case).

I only put that in there to make it obvious that these pages were inside the marketplace container. It'd probably make sense to pull that line out and have the individual pages set the page title.

from balanced-dashboard.

nodesocket avatar nodesocket commented on June 11, 2024

@kleinsch That is what I was thinking. I tried adding an attribute cowboy coding in the router.js into a route like:

this.route("activity", {
    path: "/activity",
    pageTitle: "Activity"
});

Then in the template marketplace.hbs simply do:

<h1 class="page-title">{{ pageTitle }}</h1>

But that does not work. Ideas?

Muchas gracias.

from balanced-dashboard.

kleinsch avatar kleinsch commented on June 11, 2024

Let me take a step back for a sec...

Let's say you view the logs for a marketplace (https://dash.balancedpayments.com/#/marketplaces/TEST-MP5m04ORxNlNDm1bB7nkcgSY/logs). Here's what the controller hierarchy looks like in our app:

application
  marketplace
    logs

You can figure this out by looking at how the routes are nested in router.js. There are templates corresponding to each route. Within a template, attributes are looked up from its corresponding controller (not the route!). Even if you could set options on the route, it doesn't make sense for the marketplace controller or template to know anything about the child route that's nested inside it.

In this case, the line you included is in the marketplace template. Rather than trying to change the variable that's populated into the marketplace template, it would probably make more sense to move that line out of the marketplace template and into the child's template (logs in this case). That way you're not trying to embed child-specific logic into a parent's template.

from balanced-dashboard.

nodesocket avatar nodesocket commented on June 11, 2024

@kleinsch Once again you've explained things great, makes complete sense, and I'm done this. 👍

from balanced-dashboard.

nodesocket avatar nodesocket commented on June 11, 2024

Done. This does not work though, but it is part of search:

pasting a search guid OHM123... into the search box should automatically redirect to the log entry

from balanced-dashboard.

nodesocket avatar nodesocket commented on June 11, 2024

done in #118

from balanced-dashboard.

mjallday avatar mjallday commented on June 11, 2024

Split the OHM redirect item into its own issue at #124

from balanced-dashboard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.