index.html 3.34 KB
Newer Older
Kunal Sarkhel's avatar
Kunal Sarkhel committed
1
{% extends 'layouts/base.html' %}
2
3

{% block title %}
Daniel W Bond's avatar
Daniel W Bond committed
4
SRCT Bookshare • Homepage
Daniel W Bond's avatar
Daniel W Bond committed
5
{% endblock title %}
6

7
8
{% block content %}

Daniel W Bond's avatar
Daniel W Bond committed
9
<div class="container">
10
  <div class="row">
Daniel W Bond's avatar
Daniel W Bond committed
11
12
13
    <div class="col-md-12 license">
      <div class="jumbotron jumboindex">
        <h1 class="text-center"><strong>SRCT</strong>&#8203;BOOKSHARE</h1>
14
        <h3 class="text-center">A place for Mason students to exchange textbooks.</h3>
Daniel W Bond's avatar
Daniel W Bond committed
15
16
      </div>
      <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/80x15.png" title="'Mason Statue Desktop' by Daniel Bond is licensed under a Creative Commons Attribution 4.0 International License."/></a>
17
18
19
    </div>
  </div>
</div>
20
{% if user.is_authenticated %}
21
22
23

{% load trades_extras %}

24
<legend class="text-center"><i class="fa fa-eye"></i> <strong>Your Lookouts</strong> <small>(<a href="{% url 'create_lookout' %}">Create</a>)</small></legend>
25
26
  {% if lookouts %}

Daniel W Bond's avatar
Daniel W Bond committed
27
    {% for lookout in lookouts %}
Daniel W Bond's avatar
Daniel W Bond committed
28
      <legend><i class="fa fa-book"></i> <a href="{{ lookout.get_absolute_url }}">{{ lookout.isbn|isbn_name|title }}</a></legend>
29
30
      <div class="row">
        {% for listing in lookout.get_listings %}
31
          {% if not listing.cancelled or listing.exchanged %}
32
33
34
          <div class="col-md-6">
            {% include 'listing_preview_panel.html' %}
          </div>
35
36
37
38
          {% if forloop.counter|divisibleby:2 %}
          </div>
          <div class="row">
          {% endif %}
Daniel W Bond's avatar
Daniel W Bond committed
39
          {% endif %}
40
41
        {% endfor %}
      </div>
42
43
44
45
46
47
48
49
    {% endfor %}
    </div>

  {% else %}
    <div class="row">
      <div class="col-md-10 col-md-offset-1">
        <div class="panel panel-warning">
          <div class="panel-body text-center">
Daniel W Bond's avatar
Daniel W Bond committed
50
51
52
53
            <div class="row">
              <div class="col-md-10 col-md-offset-1">
                <h3>No lookout results.</h3>
                  <p>
Daniel W Bond's avatar
Daniel W Bond committed
54
55
56
57
58
                  You don't have any lookouts yet. Lookouts are automatic
                  searches for books you have an eye out for. You can
                  <a href="{% url 'create_lookout' %}">create some</a>, and
                  we'll immediately let you know  when a listing you want 
                  goes up.
Daniel W Bond's avatar
Daniel W Bond committed
59
60
61
                  </p>
              </div>
            </div>
62
63
64
65
66
67
          </div>
        </div>
      </div>
    </div>
  {% endif %}
{% else %}
Daniel W Bond's avatar
Daniel W Bond committed
68
<legend></legend>
69

Daniel W Bond's avatar
Daniel W Bond committed
70
<div class="row">
Daniel W Bond's avatar
Daniel W Bond committed
71
  <div class="col-sm-3 text-center">
Daniel W Bond's avatar
Daniel W Bond committed
72
    <h3><i class="fa fa-key fa-lg"></i></h3>
Daniel W Bond's avatar
Daniel W Bond committed
73
    <h4>Log in with your Mason credentials</h4>
Jean Michel Rouly's avatar
Jean Michel Rouly committed
74
  </div>
Daniel W Bond's avatar
Daniel W Bond committed
75
  <div class="col-sm-3 text-center">
Daniel W Bond's avatar
Daniel W Bond committed
76
    <h3><i class="fa fa-gift fa-lg"></i></h3>
77
    <h4>Exchange your used textbooks with Mason students</h4>
Jean Michel Rouly's avatar
Jean Michel Rouly committed
78
  </div>
Daniel W Bond's avatar
Daniel W Bond committed
79
  <div class="col-sm-3 text-center">
Daniel W Bond's avatar
Daniel W Bond committed
80
    <h3><i class="fa fa-book fa-lg"></i></h3>
81
    <h4>Search for textbooks by course and more</h4>
Jean Michel Rouly's avatar
Jean Michel Rouly committed
82
  </div>
Daniel W Bond's avatar
Daniel W Bond committed
83
  <div class="col-sm-3 text-center">
84
    <h3><i class="fa fa-eye fa-lg"></i></h3>
Daniel W Bond's avatar
Daniel W Bond committed
85
    <h4>Get updates when textbooks you want are posted</h4>
86
  </div>
Daniel W Bond's avatar
Daniel W Bond committed
87
</div>
88
{% endif %}
Daniel W Bond's avatar
Daniel W Bond committed
89
90
91
92
93
<legend></legend>

<div class="row">

  <div class="col-sm-5 col-sm-offset-1">
Daniel W Bond's avatar
Daniel W Bond committed
94
    <a href="{% url 'create_listing' %}" class="btn btn-primary btn-lg btn-block">I <em>have</em> a book</a>
Daniel W Bond's avatar
Daniel W Bond committed
95
96
97
  </div>

  <div class="col-sm-5">
Daniel W Bond's avatar
Daniel W Bond committed
98
    <a href="{% url 'list_listings' %}" class="btn btn-primary btn-lg btn-block">I <em>need</em> a book</a>
Daniel W Bond's avatar
Daniel W Bond committed
99
100
101
102
  </div>

</div>

Daniel W Bond's avatar
Daniel W Bond committed
103
{% endblock content %}