Skip to content
Snippets Groups Projects
Commit 001b5cb9 authored by Johannes Graf's avatar Johannes Graf
Browse files

unanswered_surveys done, dynamic cards not tested

parent b2f1e54d
No related branches found
No related tags found
1 merge request!16Feature/unanswered surveys
...@@ -150,6 +150,46 @@ button:hover { ...@@ -150,6 +150,46 @@ button:hover {
background-color: #a3cbff; background-color: #a3cbff;
} }
.unanswered-survey-container{
max-width: 1200px;
justify-content: center;
padding: 20px;
display: flex;
flex-direction: column;
align-items: center;
}
/*Should be able to use for all survey-cards*/
.survey-cards {
display: flex;
align-items: center;
max-width: 900px;
flex-wrap: wrap;
gap: 20px;
justify-content: center;
margin: 20px 0;
}
.survey-card {
border: 1px solid #ccc;
border-radius: 8px;
padding: 15px;
width: 200px;
position: relative;
background-color: #fff;
}
.view-results {
margin-top: 20px;
padding: 10px 20px;
background-color: #007bff;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
.start-container { .start-container {
max-width: 1200px; max-width: 1200px;
margin: 0 auto; margin: 0 auto;
......
...@@ -8,22 +8,37 @@ ...@@ -8,22 +8,37 @@
<link rel="stylesheet" href="{% static 'styles.css' %}" /> <link rel="stylesheet" href="{% static 'styles.css' %}" />
</head> </head>
<body> <body>
<!--
<div class="unanswered-survey-container"> <div class="unanswered-survey-container">
<h1>Obesvarade enkäter</h1> <h1>Obesvarade enkäter</h1>
<h2>Du har {{ surveys.count }} obesvarade enkäter</h2> <h2>Du har {{ unanswered_count }} obesvarade enkäter</h2>
<div class="survey-cards"> <div class="survey-cards">
{% for survey in surveys %} {% for survey in unanswered_surveys %}
<div class="survey-card {% if survey.is_completed %}completed{% else %}pending{% endif %}"> <div class="survey-card">
<p>Publicerades: {{ survey.published_date }}</p> <p>Publicerades: {{ survey.published_survey.sending_date }}</p>
<p><strong>*{{ survey.title }}*</strong></p> <p><strong>*{{ survey.published_survey.name }}*</strong></p>
<p>Deadline: {{ survey.deadline }}</p> <p>Deadline: {{ survey.published_survey.deadline }}</p>
</div> </div>
{% endfor %} {% endfor %}
<!-- Example survey cards for testing -->
<div class="survey-card">
<p>Publicerades: 2025-02-20</p>
<p><strong>*Namn på enkät*</strong></p>
<p>Deadline: 2026-02-20</p>
</div>
<div class="survey-card">
<p>Publicerades: 2025-02-20</p>
<p><strong>*Namn på enkät*</strong></p>
<p>Deadline: 2026-02-20</p>
</div>
<div class="survey-card">
<p>Publicerades: 2025-02-20</p>
<p><strong>*Namn på enkät*</strong></p>
<p>Deadline: 2026-02-20</p>
</div>
<!-- Add more survey cards as needed -->
</div> </div>
<button class="view-results">Visa resultat på tidigare enkäter</button> <button class="view-survey_result" onclick="window.location.href='{% url 'survey_result' %}'"> Visa resultat på tidigare enkäter</button>
</div> </div>
-->
</body> </body>
</html> </html>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment