Hobo / hobo

The web app builder for Rails (moved from tablatom/hobo)
http://hobocentral.net
103 stars 39 forks source link

URL is incorrect for the <app-name> in the navbar #102

Open hbaragar opened 10 years ago

hbaragar commented 10 years ago

The application name in the navbar is a link that takes you back to the home page of the application. When you change to a subsite, the subsite name is appended to the app-name (e.g. "My Application - Admin"); however, the URL in the link does not change correspondingly. Either the link should change, or the should not append the subsite name. Currently, I would prefer the link to change when the user enters a subsite.

hbaragar commented 10 years ago

Alternative 1 --- Add the subsite to the URL

In hobo_bootstrap-2.1.1/taglibs/page.dryml, change the following line from:

<a class="brand" href="#{base_url}/"><app-name/></a>

to:

<a class="brand" href="#{base_url}/#{subsite}"><app-name/></a>
hbaragar commented 10 years ago

Alternative 2 --- Remove the subsite from the <app-name> tag

If hobo_rapid-2.1.1/app/helpers/hobo_rapid_helper.rb, change the line:

def app_name(add_subsite=true)

to:

def app_name(add_subsite=false)

This alternative has a much bigger impact to existing applications that have subsites.

BTW, I was not able to figure out how to pass add_subsite=false to the <app-name> tag.