Commit c37e01286d1b06a26d09698fe24bcef9fbcf4724
1 parent
e2dcefc6
Exists in
master
and in
5 other branches
Font awesome in icon file #405
Showing
4 changed files
with
17 additions
and
7 deletions
Show diff stats
courses/templates/topic/list_file.html
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | |
3 | 3 | <div id="list-topic{{ topic.id }}-files"> |
4 | 4 | {% for file in files %} |
5 | - <li id="file_{{ file.slug }}"><i class="material-icons">{{ file.file_type.icon }}</i> <a href="{% url 'course:file_material_view' file.slug %}" target="_blank">{{ file.name }}</a></li> | |
5 | + <li id="file_{{ file.slug }}"><i class="fa {{ file.file_type.icon }}"></i> <a href="{% url 'course:file_material_view' file.slug %}" target="_blank">{{ file.name }}</a></li> | |
6 | 6 | {% endfor %} |
7 | 7 | </div> |
8 | 8 | ... | ... |
courses/templates/topic/list_file_edit.html
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | <div id="list-topic{{ topic.id }}-files-edit"> |
4 | 4 | {% for file in files %} |
5 | 5 | <li class="icon_edit_remove" id="file_edit_icon_{{ file.slug }}"> <a href="javascript:modal.get('{% url 'course:file:update_file' file.slug %}', '#fileUpdateModal', '#requisicoes_ajax')" ><i class="fa fa-pencil fa-lg" aria-hidden="true"></i></a> <a href="javascript:modal.get('{% url 'course:file:delete_file' file.slug %}', '#fileDeleteModal', '#requisicoes_ajax')"><i class="fa fa-trash fa-lg" aria-hidden="true"></i></a></li> |
6 | - <li id="file_edit_{{ file.slug }}"><i class="material-icons">{{ file.file_type.icon }}</i> <a href="{{ file.file_url.url }}" target="_blank">{{ file.name }}</a></li> | |
6 | + <li id="file_edit_{{ file.slug }}"><i class="fa {{ file.file_type.icon }}"></i> <a href="{{ file.file_url.url }}" target="_blank">{{ file.name }}</a></li> | |
7 | 7 | {% endfor %} |
8 | 8 | </div> |
9 | 9 | ... | ... |
files/templates/files/render_file.html
1 | -<li id="file_{{ file.slug }}"><i class="material-icons">{{ file.file_type.icon }}</i> <a href="{{ file.file_url.url }}" target="_blank">{{ file.name }}</a></li> | |
2 | 1 | \ No newline at end of file |
2 | +<li id="file_{{ file.slug }}"><i class="fa {{ file.file_type.icon }}"></i> <a href="{{ file.file_url.url }}" target="_blank">{{ file.name }}</a></li> | |
3 | 3 | \ No newline at end of file | ... | ... |
files/utils.py
1 | 1 | mime_type_to_material_icons = { |
2 | - 'application/pdf': 'picture_as_pdf', | |
3 | - 'text/plain': 'format_align_justify', | |
4 | - 'image/png': 'photo', | |
5 | - 'image/jpeg': 'photo' | |
2 | + 'application/pdf': 'fa-file-pdf-o', | |
3 | + 'text/plain': 'file-text-o', | |
4 | + 'image/png': 'file-picture-o', | |
5 | + 'image/jpeg': 'file-picture-o', | |
6 | + 'application/msword': 'file-word-o', | |
7 | + 'application/excel': 'file-powerpoint-o', | |
8 | + 'application/vnd.ms-excel': 'file-powerpoint-o', | |
9 | + 'application/x-excel': 'file-powerpoint-o', | |
10 | + 'application/x-msexcel': 'file-powerpoint-o', | |
11 | + 'application/mspowerpoint': 'file-powerpoint-o', | |
12 | + 'application/powerpoint': 'file-powerpoint-o', | |
13 | + 'application/vnd.ms-powerpoint': 'file-powerpoint-o', | |
14 | + 'application/x-mspowerpoint': 'file-powerpoint-o', | |
15 | + | |
6 | 16 | } |
7 | 17 | \ No newline at end of file | ... | ... |