Skip to content

Commit

Permalink
Fixed media references to use properly namedspaces media in the form …
Browse files Browse the repository at this point in the history
…{{ MEDIA_URL }}schedules/(img|js|css)/foo except when the media is 100% generic (like jquery), in which case it's at media/(js|img|css) and referenced at {{ MEDIA_URL }}(img|js|css)/foo

Signed-off-by: Bartek Górny <bartek@gorny.edu.pl>
  • Loading branch information
winhamwr authored and bartekgorny committed Jul 7, 2009
1 parent 3f5de2e commit 94aab78
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.pyc
/project_sample/project_sample.db
/docs/_build/
django_schedule.egg-info
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion schedule/templates/schedule/_create_event_options.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<a href="{{ create_event_url }}&next={{here}}"><img border="0" src="{{ MEDIA_URL }}img/add.png" alt="Add Event"></a>
<a href="{{ create_event_url }}&next={{here}}"><img border="0" src="{{ MEDIA_URL }}schedule/img/add.png" alt="Add Event"></a>
12 changes: 6 additions & 6 deletions schedule/templates/schedule/_event_options.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
{% if occurrence.event.rule %}
{% if occurrence.id %}
<a href="#" onclick="openURL('{{ edit_occurrence }}?next={{ here }}', event);">
<img border="0" src="{{ MEDIA_URL }}img/pencil.png" alt="Edit Event">
<img border="0" src="{{ MEDIA_URL }}schedule/img/pencil.png" alt="Edit Event">
</a>
{% else %}
<a href="#" onclick="openEditDialog(this, '{{ edit_occurrence }}?next={{ here }}', '{{ edit_event }}?next={{ here }}', event);">
<img border="0" src="{{ MEDIA_URL }}img/pencil.png" alt="Edit Event">
<img border="0" src="{{ MEDIA_URL }}schedule/img/pencil.png" alt="Edit Event">
</a>
{% endif %}
{% else %}
<a href="#" onclick="openURL('{{ edit_event }}?next={{ here }}', event);">
<img border="0" src="{{ MEDIA_URL }}img/pencil.png" alt="Edit Event">
<img border="0" src="{{ MEDIA_URL }}schedule/img/pencil.png" alt="Edit Event">
</a>
{% endif %}
{% endif %}
Expand All @@ -23,16 +23,16 @@
{% if occurrence.event.rule %}
{% if occurrence.id %}
<a href="#" onclick="openURL('{{cancel_occurrence}}?next={{here}}', event);">
<img border="0" src="{{ MEDIA_URL }}img/delete.png" alt="Delete Event">
<img border="0" src="{{ MEDIA_URL }}schedule/img/delete.png" alt="Delete Event">
</a>
{% else %}
<a href="#" onclick="openCancelDialog(this, '{{ cancel_occurrence }}?next={{here}}', '{{delete_event}}?next={{here}}', event);">
<img border="0" src="{{ MEDIA_URL }}img/delete.png" alt="Delete Event">
<img border="0" src="{{ MEDIA_URL }}schedule/img/delete.png" alt="Delete Event">
</a>
{% endif %}
{% else %}
<a href="#" onclick="openURL('{{delete_event}}?next={{here}}', event);">
<img border="0" src="{{ MEDIA_URL }}img/delete.png" alt="Delete Event">
<img border="0" src="{{ MEDIA_URL }}schedule/img/delete.png" alt="Delete Event">
</a>
{% endif %}
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions schedule/templates/schedule/_prevnext.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{% load scheduletags %}
<div class="prevnext">
<a href="{% prev_url target slug period %}">
<img align="top" border="0" src="{{ MEDIA_URL }}/img/left_mod.png"/>
<img align="top" border="0" src="{{ MEDIA_URL }}schedule/img/left_mod.png"/>
</a>
&nbsp; <b>{{period_name}}</b> &nbsp;
<a href="{% next_url target slug period %}">
<img align="top" border="0" src="{{ MEDIA_URL }}/img/right_mod.png"/>
<img align="top" border="0" src="{{ MEDIA_URL }}schedule/img/right_mod.png"/>
</a>
</div>

12 changes: 11 additions & 1 deletion schedule/templates/schedule/base.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
{% extends "site_base.html" %}
{% block extra_head %}
{{ block.super }}
<link rel="stylesheet" href="{{ MEDIA_URL }}css/schedule.css" type="text/css" media="screen" />
<link rel="stylesheet" href="{{ MEDIA_URL }}schedule/css/schedule.css" type="text/css" media="screen" />
<link rel="stylesheet" href="{{ MEDIA_URL }}css/jquery-ui.css" type="text/css" media="screen" />
<link rel="stylesheet" href="{{ MEDIA_URL }}css/jquery.tooltip.css" />
<script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}js/jquery-ui.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.tooltip.js"></script>
{% endblock %}

{% block rtab_id %}id="schedule_tab"{% endblock %}

{% block subnav %}
<ul>
<li><a href="">Create a Calendar</a></li>
<li><a href="">Your Calendars</a></li>
<li><a href="">All Calendars</a></li>
</ul>
{% endblock %}
6 changes: 3 additions & 3 deletions schedule/templates/schedule/event.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
<div class="event_actions" align="center">
{% if back_url %}
<a href="{{ back_url }}">
<img border="0" src="{{ MEDIA_URL }}img/left_mod.png" alt="{% trans "Back" %}"/>
<img border="0" src="{{ MEDIA_URL }}schedule/img/left_mod.png" alt="{% trans "Back" %}"/>
</a>
&nbsp;
{% endif %}
<a href="{% url edit_event event.calendar.slug,event.id %}">
<img border="0" src="{{ MEDIA_URL }}img/pencil.png" alt="{% trans "Change" %}"/>
<img border="0" src="{{ MEDIA_URL }}schedule/img/pencil.png" alt="{% trans "Change" %}"/>
</a>
&nbsp;
<a href="{% url delete_event event.id %}">
<img border="0" src="{{ MEDIA_URL }}img/delete.png" alt="{% trans "Delete" %}"/>
<img border="0" src="{{ MEDIA_URL }}schedule/img/delete.png" alt="{% trans "Delete" %}"/>
</a>
</div>
<h2 align="center">{{event.title}}</h2>
Expand Down
2 changes: 1 addition & 1 deletion schedule/templates/schedule/event_form_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% block extra_head %}
{{ block.super }}
<link rel="stylesheet" href="{{ MEDIA_URL }}css/jquery-ui.css" type="text/css" media="screen" />
<link rel="stylesheet" href="{{ MEDIA_URL }}css/schedule.css" type="text/css" media="screen" />
<link rel="stylesheet" href="{{ MEDIA_URL }}schedule/css/schedule.css" type="text/css" media="screen" />
<script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}js/jquery-ui.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.timePicker.js"></script>
Expand Down
6 changes: 3 additions & 3 deletions schedule/templates/schedule/occurrence.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
</div>
<div class="event_actions" align="center">
{% if back_url %}
<a href="{{ back_url }}"><img border="0" src="{{ MEDIA_URL }}img/left_mod.png" alt="{% trans "Back" %}"></a> &nbsp;
<a href="{{ back_url }}"><img border="0" src="{{ MEDIA_URL }}schedule/img/left_mod.png" alt="{% trans "Back" %}"></a> &nbsp;
{% endif %}
<a href="{{occurrence.get_edit_url}}"><img border="0" src="{{ MEDIA_URL }}img/pencil.png" alt="{% trans "Change" %}"></a> &nbsp;
<a href="{{occurrence.get_cancel_url}}"><img border="0" src="{{ MEDIA_URL }}img/delete.png" alt="{% trans "Cancel" %}"></a>
<a href="{{occurrence.get_edit_url}}"><img border="0" src="{{ MEDIA_URL }}schedule/img/pencil.png" alt="{% trans "Change" %}"></a> &nbsp;
<a href="{{occurrence.get_cancel_url}}"><img border="0" src="{{ MEDIA_URL }}schedule/schedule/img/delete.png" alt="{% trans "Cancel" %}"></a>
</div>
<h2 align="center">{{occurrence.title}}</h2>
<table align="center">
Expand Down

0 comments on commit 94aab78

Please sign in to comment.