Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement logo support #1034

Closed
jakkarth opened this issue Apr 30, 2019 · 4 comments
Closed

Implement logo support #1034

jakkarth opened this issue Apr 30, 2019 · 4 comments

Comments

@jakkarth
Copy link
Contributor

Using 0.8.6

Actual behavior:

Specifying openboxes.report.header.logo as described here doesn't actually put the logo anywhere that I can find.

Expected behavior:

In fairness, it says it's not supported. I'd like to see the logo on html/pdf/excel exports for shipments/stock movements, reports, and in the header above the megamenu, and wherever else it would be appropriate.

Steps to reproduce:

  1. Ignore the comment saying the config option isn't supported
  2. Set the config option to a URL of an image
  3. Restart OB
  4. Generate a report, look at main menu, etc, and note the lack of logo.
@jmiranda
Copy link
Member

This is a feature we'll probably be working on in one of the next two sprints. This config property will become the default value for all report / document logos, but we'll probably add a new field to location to support per location logos like we do with the header logo.

One question for you. I want to go away from storing the logo in the database, so this field will likely just be a string URL pointing to the image hosted somewhere. Obvious solution would be to upload the logo to S3 or Azure Storage and serve from there. However, do you know any cheap ways to host images and logos as a temporary solution.

@jakkarth
Copy link
Contributor Author

I do not. Anyone doing self-hosted probably has the resources to be able to put an image up somewhere. I'm not sure if a .war can reach outside of itself to the host filesystem, but if so, we could put logo files next to the .war and have them served up as regular web assets via tomcat, couldn't we? If those aren't options, then S3 or some other CDN would probably be a reasonable choice.

@jmiranda
Copy link
Member

Tomcat explodes the WAR file so we could definitely copy logos into exploded war directory, but those files would be overwritten each time we deploy a new version. We usually front Tomcat with an Apache instance so that's another possible solution. But I'll probably look into manually uploading to AWS/Azure since that'll be the easiest solution. I just wanted to see if there was an easier / cheaper (free) solution.

@jmiranda
Copy link
Member

I'll add documentation for this soon, but for the time being here are the available properties.

openboxes.report.logo.url = https://openboxes.com/img/logo_100.png

# The following properties are available but don't need to be set unless you really need them
#openboxes.report.logo.width = 100
#openboxes.report.logo.height = 100
#openboxes.report.logo.label = Tagline goes here

We're also planning to add a new logo field to Location to allow a custom report logo per-location. But that's probably not going to happen for at least a few releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants