aboutsummaryrefslogtreecommitdiff
path: root/views/questions.hbs
blob: 36d2a253f6dc6fa0a8a1bc044c354a65c660beb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<main id = 'solutions-main'>
    <div class = 'search container' id = 'solutions-div'>

        <!-- EXAM DETAILS -->
        {{# if messages.success }}
            <section class="alert alert-success custom-Alert">
                <!-- Change those to banners later -->
                <h4>{{ messages.success }}</h4>
            </section>
        {{ else }}
            {{# if messages.error }}
                <section class="alert alert-danger custom-Alert">
                    <h4>{{ messages.error }}</h4>
                </section>
            {{/if}}
        {{/if}}




        <a href="http://www.cs.toronto.edu/~fpitt/CSC148/20131/tests/test1-0101.pdf" target='_blank'><img src="/assets/images/exam.png" class='exam-img img-responsive exam-info'></a>

            <section class='exam-info'>
                <h3>{{examInfo.courseCode}}</h3>
                <p>{{examInfo.term}} {{examInfo.year}} {{examInfo.type}}</p>
                <p><em>Instructor(s): </em>{{examInfo.instructors}}</p>
                <p><em>Upload date:</em> {{examInfo.uploadDate}}</p>
                <p><em>Uploaded by:</em> {{examInfo.uploader}}</p>
                <p><em>Page count:</em> {{examInfo.pageCount}}</p>
                <p><em>Question count:</em> {{examInfo.questionCount}}</p>
            </section>

            <!-- QUESTION LISTINGS -->



        <form action="/user/follow_exam/{{examInfo.id}}" method = 'post'>
            <input type="hidden" name="_csrf" value="{{ csrfToken }}">
            <button class="col-xs-4 col-sm-2 col-md-2 col-lg-2
            col-xs-offset-4 col-sm-offset-5 col-md-offset-2
            col-lg-offset-2 rounded" id="add-solution" type="submit">
                <h3>Follow Exam</h3>
            </button>
        </form>




        {{#each query}}
                <a href="/solutions/{{../examInfo.id}}/{{this.q_id}}">
                    <section class = 'solutions-card row'>
                        <div class='pull-left col-sm-8 col-md-8'>
                            <h3 class = 'questions-number'>Question {{this.q_id}}</h3>
                            <p><span class='questions-sol-num'>{{this.count}} solutions, </span> <span class = 'questions-comment'>{{this.comments}} comments</span></p>
                        </div>
                        <div class='pull-right right-arrow'>
                            <img class='rounded' src="/assets/images/right-arrow.png">
                        </div>
                    </section>
                </a>

            {{/each}}



    </div>
</main>