votes: User opinions¶
lino_xl.lib.votes plugin adds functionality for managing votes.
Table of contents:
This is a tested document. The following instructions are used for initialization:
A database object that can receive votes.
When adding this plugin to your application, you must specify the
- class lino_xl.lib.votes.Vote¶
Django model for representing a vote. Inherits from UserAuthored, Created, Workable
The ticket (or other votable) being voted.
The user who is voting.
The state of this vote. Pointer to
My personal priority for this ticket.
How the ticket author rates my help on this ticket.
Why I am interested in this ticket.
My nickname for this ticket. Optional.
If this is specified, then I get a quicklink to this ticket.
- class lino_xl.lib.votes.Votes¶
There are two class attributes for defining a filter conditions which cannot be removed by the user:
A set of vote states to require (i.e. to filter upon). This must resolve using
- class lino_xl.lib.votes.AllVotes¶
Show all votes of all users.
- class lino_xl.lib.votes.MyVotes¶
Show all my votes.
- class lino_xl.lib.votes.VotesByVotable¶
Show the votes about this object.
- class lino_xl.lib.votes.VoteState¶
The state of a vote.
Translatable text. How a vote is called when in this state.
- class lino_xl.lib.votes.VoteStates¶
The default implementation defines the following choices:
Reserved for the author's vote. Lino automatically creates an author vote for every author of a ticket (see
- class lino_xl.lib.votes.Ratings¶
The list of available ratings.
- class lino_xl.lib.votes.VoteEvents¶
- class lino_xl.lib.votes.Votable¶
This model mixin adds two workflow actions ☆ and ★, which are mutually exclusive.
Define your vote about this object.
Button label: ☆
Visible only when you don't yet have a vote on this object. Clicking it will create a default vote object and show that object in a detail window.
Edit your vote about this object.
Button label: ★