kylewm / redwind

Flask-based personal website #IndieWeb #OwnYourData
Other
45 stars 5 forks source link

Context sensitive "Publish" button labels #19

Closed kylewm closed 9 years ago

kylewm commented 9 years ago

Different text if the post:

The one wrinkle is that plugins depend on this button text (hacky yes I know) to determine whether to fire some behaviors. twitter.py checks that action = 'Publish + Tweet' to decide it should automatically tweet.

I'd guess there is a way in HTML to set the action and displayed button text to different values (e.g. value="publish_and_tweet", display="Republish & Tweet"), and only the display text would change in different contexts.

Suggested by @thedod in https://github.com/thedod/redwind/wiki

State-sensitive GUI: create/edit GUI always shows publish publish+tweet publish quietly save draft regardless of whether item was already published (should say update update and republish) or a draft (no indication when I view a draft that users can't see it), etc.