Changeset ae881e5
- Timestamp:
- May 16, 2010, 11:01:29 PM (16 years ago)
- Branches:
- master, fysm-4-1, space-access, stable, stage, test-hooks
- Children:
- 101bf09
- Parents:
- aaa8e04
- git-author:
- Alex Dehnert <adehnert@…> (05/16/10 23:01:29)
- git-committer:
- Alex Dehnert <adehnert@…> (05/16/10 23:01:29)
- Location:
- asadb
- Files:
-
- 3 edited
-
forms/views.py (modified) (2 diffs)
-
media/style/style.css (modified) (3 diffs)
-
template/fysm/fysm_detail.html (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
asadb/forms/views.py
raaa8e04 rae881e5 76 76 77 77 def fysm_view(request, year, submission, ): 78 submit_obj = get_object_or_404(forms.models.FYSM, pk=submission,) 79 all = forms.models.FYSM.objects.only("id", "display_name", ) 80 try: 81 prev = all.filter(display_name__lt=submit_obj.display_name).order_by("-display_name")[0] 82 except IndexError: 83 prev = None 84 try: 85 next = all.filter(display_name__gt=submit_obj.display_name).order_by("display_name")[0] 86 except IndexError: 87 next = None 78 88 return list_detail.object_detail( 79 89 request, … … 85 95 "year": year, 86 96 "pagename": "fysm", 97 "prev": prev, 98 "next": next, 87 99 }, 88 100 ) -
asadb/media/style/style.css
raaa8e04 rae881e5 90 90 } 91 91 92 .single-fysm-entry h3 a 92 .single-fysm-entry h3 a, .fysm-navstrip a 93 93 { 94 94 color:#fcfcfc; … … 96 96 } 97 97 98 .single-fysm-entry h3 a:hover 98 .single-fysm-entry h3 a:hover, .fysm-navstrip a:hover 99 99 { 100 100 text-decoration: underline; … … 158 158 } 159 159 160 .fysm-detail 160 .fysm-detail .back { float: left; } 161 .fysm-detail .forward { float: right; } 162 .fysm-detail .up { text-align: center; } 163 .fysm-detail h3 161 164 { 162 height: 100%;163 width: 100%;165 text-align: center; 166 clear: both; 164 167 } 165 168 166 .fysm- detail .single-fysm-entry169 .fysm-navstrip 167 170 { 168 margin: 0 auto; 171 clear: both; 172 margin: 0; 173 margin-top: 3em; 174 padding: 0.5em 1em; 175 background: #BE2933; 169 176 } 170 177 171 .fysm- detail td178 .fysm-navstrip p 172 179 { 173 padding: 0;180 margin: 0; 174 181 } 175 .fysm-join 176 { 177 display: block; 178 width: 100%; 179 height: 100%; 180 margin: 0; 181 padding: 0; 182 } 182 183 183 184 184 /* Reset some stuff */ -
asadb/template/fysm/fysm_detail.html
raaa8e04 rae881e5 1 {% extends "base -plain.html" %}1 {% extends "base.html" %} 2 2 {% load formcats %} 3 3 … … 5 5 {% block content %} 6 6 <div class='fysm-detail'> 7 8 <div class='fysm-navstrip'> 9 {% if prev %} 10 <p><a class='back' href='{% url fysm-view year prev.pk %}'>« {{prev.display_name}}</a></p> 11 {% endif %} 12 {% if next %} 13 <p><a class='forward' href='{% url fysm-view year next.pk %}'>{{next.display_name}} »</a></p> 14 {% endif %} 15 <p class='up'><a href='{% url fysm year %}'>Up to Index</a></p> 16 <div style='clear: both;'></div> 17 </div> 18 7 19 <div class='single-fysm-entry'> 8 <h3><a href='{{fysm.website}}'>{{fysm.display_name}}</a></h3> 20 <h3> 21 <a href='{{fysm.website}}'>{{fysm.display_name}}</a> 22 </h3> 9 23 <div class='fysm-body'> 10 24 <div class='logo'> … … 25 39 {% endif %} 26 40 </div> 27 <iframe src='{{fysm.join_url}}' class='fysm-join' height='100%'> 28 <p><a href='{{fysm.join_url}}'>Learn about joining {{fysm.display_name}}</a></p> 29 </iframe> 41 30 42 {% endblock %} 31 43
Note: See TracChangeset
for help on using the changeset viewer.