From b60692310202b24388fe3f43fc590d2c04ba1f0d Mon Sep 17 00:00:00 2001 From: Mahmoud-Emad Date: Wed, 21 May 2025 15:56:47 +0300 Subject: [PATCH] feat: Finish the proposal dashboard --- actix_mvc_app/src/views/governance/index.html | 301 +++++++++--------- 1 file changed, 156 insertions(+), 145 deletions(-) diff --git a/actix_mvc_app/src/views/governance/index.html b/actix_mvc_app/src/views/governance/index.html index 6ca829e..6765880 100644 --- a/actix_mvc_app/src/views/governance/index.html +++ b/actix_mvc_app/src/views/governance/index.html @@ -3,170 +3,181 @@ {% block title %}Governance Dashboard{% endblock %} {% block content %} - -
-
- + +
+
+ +
+
+ + +
+
+
+ +
About Governance
+

The governance system allows token holders to participate in decision-making processes by voting on + proposals that affect the platform's future. Create proposals, cast votes, and help shape the direction + of our decentralized ecosystem.

+
+
- -
-
-
- -
About Governance
-

The governance system allows token holders to participate in decision-making processes by voting on proposals that affect the platform's future. Create proposals, cast votes, and help shape the direction of our decentralized ecosystem.

- + +
+ +
+ {% if nearest_proposal is defined %} +
+
+
Urgent: Voting Closes Soon
+
+ Ends: {{ nearest_proposal.vote_end_date | + date(format="%Y-%m-%d") }} + View Full Proposal +
+
+
+

{{ nearest_proposal.title }}

+
Proposed by {{ nearest_proposal.creator_name }}
+ +
+

{{ nearest_proposal.description }}

+
+ +
+
65% Yes
+
35% No
+
+ +
+ 26 votes cast + Quorum: 75% reached +
+ +
+
Cast Your Vote
+
+
+ +
+
+ + + +
+
- - -
- -
- {% if nearest_proposal is defined %} -
-
-
Urgent: Voting Closes Soon
-
- Ends: {{ nearest_proposal.voting_ends_at | date(format="%Y-%m-%d") }} - View Full Proposal -
-
-
-

{{ nearest_proposal.title }}

-
Proposed by {{ nearest_proposal.creator_name }}
- -
-

{{ nearest_proposal.description }}

-
- -
-
65% Yes
-
35% No
-
- -
- 26 votes cast - Quorum: 75% reached -
- -
-
Cast Your Vote
-
-
- -
-
- - - -
-
-
-
+ {% else %} +
+
+ +
No active proposals requiring votes
+

When new proposals are created, they will appear here for voting.

+ Create Proposal
- {% else %} -
-
- -
No active proposals requiring votes
-

When new proposals are created, they will appear here for voting.

- Create Proposal -
-
- {% endif %}
- - -
-
-
-
Recent Activity
-
-
-
- {% for activity in recent_activity %} -
-
-
- -
-
-
- {{ activity.user }} - {{ activity.timestamp | date(format="%H:%M") }} -
-

{{ activity.action }} on {{ activity.proposal_title }}

- {% if activity.type == "comment" and activity.comment is defined %} -

"{{ activity.comment }}"

- {% endif %} + {% endif %} +
+ + +
+
+
+
Recent Activity
+
+
+
+ {% for activity in recent_activity %} +
+
+
+ +
+
+
+ {{ activity.user }} + {{ activity.timestamp | date(format="%H:%M") }}
+

{{ activity.action }} on {{ + activity.proposal_title }}

+ {% if activity.type == "comment" and activity.comment is defined %} +

"{{ activity.comment }}"

+ {% endif %}
- {% endfor %}
+ {% endfor %}
- +
+
+
- -
-
-
-
-
Active Proposals (Ending Soon)
-
-
-
- {% set count = 0 %} - {% for proposal in proposals %} - {% if count < 3 %} -
-
-
-
{{ proposal.title }}
-
By {{ proposal.creator_name }}
-

{{ proposal.description | truncate(length=100) }}

-
- - {{ proposal.status }} - - View Details -
-
- -
+ +
+
+
+
+
Active Proposals (Ending Soon)
+
+
+
+ {% set count = 0 %} + {% for proposal in proposals %} + {% if count < 3 %}
+
+
+
{{ proposal.title }}
+
By {{ proposal.creator_name }}
+

{{ proposal.description | truncate(length=100) }}

+
+ + {{ proposal.status }} + + View Details
- {% set count = count + 1 %} - {% endif %} - {% endfor %} -
+
+ +
+ {% set count = count + 1 %} + {% endif %} + {% endfor %}
-{% endblock %} +
+
+{% endblock %} \ No newline at end of file