#584 Error message styling
Merged by abompard. Opened by ryanlerch.
ryanlerch/fedora-hubs widget-no-config-messages  into  develop

Download 584.patch

This adds a bit more logic to the error messages we show if there is no configuration for that widget in the Hub Config. The basic rule i implemented here is that if you own the hub (or it is a stream, since you are the only one to see the stream) you see the message that you need to update the hubconfig for the widget to work. If you are not a owner of that hub, you just see a generic message, i.e. "no issues found"

I also styled up the warnings a little bit too.

The widgets that i touched are:

  • meetings
  • repositories widget
  • pullrequests
  • newest open issues
  • issues (the user one)

fixes #580 #581

Screen_Shot_2018-02-16_at_21.31.14-fullpage.pngScreen_Shot_2018-02-16_at_21.28.26-fullpage.pngScreen_Shot_2018-02-16_at_21.27.09-fullpage.png

rebased onto f489be95def43bb2e0401b72be621be14cf39586

Actually the config panel is called "Version Control" for that one.

You don't actually need it, you can use widget_instance.allows(g.user, "config") in the templates.

It's better to use instance.hub.allows(flask.g.user, "config").

rebased onto 60ffc0e14910ffa7a805126740fcacbfdd37bfd2

thanks for the review, @abompard !

using hub.allows is so much easier! didnt know about that obviously :) thanks for pointing that out!

updated all commits to use that instead, and removed the commit that added the extra unneede is owner template global.

Thanks! What about my comment on the message for the issue widget? :-)

Yeah, I reworded it to point people to the version control tab in the settings.

Oh right I didn't see that change. It's all good then, thanks! :-)

Commit 4efcf062 fixes this pull-request

Pull-Request has been merged by abompard

Pull-Request has been merged by abompard

Metadata