feat: Refactor governance models and views
- Moved governance models (`Vote`, `VoteType`, `VotingResults`) from `models/governance.rs` to `controllers/governance.rs` for better organization and to avoid circular dependencies. This improves maintainability and reduces complexity. - Updated governance views to use the new model locations. - Added a limit to the number of recent activities displayed on the dashboard for performance optimization.
This commit is contained in:
@@ -87,15 +87,16 @@
|
||||
|
||||
<div class="mb-4">
|
||||
<h5 class="mb-3">Cast Your Vote</h5>
|
||||
<form>
|
||||
<form action="/governance/proposals/{{ nearest_proposal.base_data.id }}/vote" method="post">
|
||||
<div class="mb-3">
|
||||
<input type="text" class="form-control" placeholder="Optional comment on your vote"
|
||||
aria-label="Vote comment">
|
||||
<input type="text" class="form-control" name="comment"
|
||||
placeholder="Optional comment on your vote" aria-label="Vote comment">
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<button type="submit" name="vote" value="yes" class="btn btn-success">Vote Yes</button>
|
||||
<button type="submit" name="vote" value="no" class="btn btn-danger">Vote No</button>
|
||||
<button type="submit" name="vote" value="abstain" class="btn btn-secondary">Abstain</button>
|
||||
<button type="submit" name="vote_type" value="Yes" class="btn btn-success">Vote Yes</button>
|
||||
<button type="submit" name="vote_type" value="No" class="btn btn-danger">Vote No</button>
|
||||
<button type="submit" name="vote_type" value="Abstain"
|
||||
class="btn btn-secondary">Abstain</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user