From c37e01286d1b06a26d09698fe24bcef9fbcf4724 Mon Sep 17 00:00:00 2001 From: ailsoncgt Date: Tue, 29 Nov 2016 15:59:08 -0300 Subject: [PATCH] Font awesome in icon file #405 --- courses/templates/topic/list_file.html | 2 +- courses/templates/topic/list_file_edit.html | 2 +- files/templates/files/render_file.html | 2 +- files/utils.py | 18 ++++++++++++++---- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/courses/templates/topic/list_file.html b/courses/templates/topic/list_file.html index a1df36c..16abdcf 100644 --- a/courses/templates/topic/list_file.html +++ b/courses/templates/topic/list_file.html @@ -2,7 +2,7 @@
{% for file in files %} -
  • {{ file.file_type.icon }} {{ file.name }}
  • +
  • {{ file.name }}
  • {% endfor %}
    diff --git a/courses/templates/topic/list_file_edit.html b/courses/templates/topic/list_file_edit.html index 396d1d0..cfca6dd 100644 --- a/courses/templates/topic/list_file_edit.html +++ b/courses/templates/topic/list_file_edit.html @@ -3,7 +3,7 @@
    {% for file in files %}
  • -
  • {{ file.file_type.icon }} {{ file.name }}
  • +
  • {{ file.name }}
  • {% endfor %}
    diff --git a/files/templates/files/render_file.html b/files/templates/files/render_file.html index c0cc3be..592f0e9 100644 --- a/files/templates/files/render_file.html +++ b/files/templates/files/render_file.html @@ -1 +1 @@ -
  • {{ file.file_type.icon }} {{ file.name }}
  • \ No newline at end of file +
  • {{ file.name }}
  • \ No newline at end of file diff --git a/files/utils.py b/files/utils.py index f2868eb..be1b4de 100644 --- a/files/utils.py +++ b/files/utils.py @@ -1,6 +1,16 @@ mime_type_to_material_icons = { - 'application/pdf': 'picture_as_pdf', - 'text/plain': 'format_align_justify', - 'image/png': 'photo', - 'image/jpeg': 'photo' + 'application/pdf': 'fa-file-pdf-o', + 'text/plain': 'file-text-o', + 'image/png': 'file-picture-o', + 'image/jpeg': 'file-picture-o', + 'application/msword': 'file-word-o', + 'application/excel': 'file-powerpoint-o', + 'application/vnd.ms-excel': 'file-powerpoint-o', + 'application/x-excel': 'file-powerpoint-o', + 'application/x-msexcel': 'file-powerpoint-o', + 'application/mspowerpoint': 'file-powerpoint-o', + 'application/powerpoint': 'file-powerpoint-o', + 'application/vnd.ms-powerpoint': 'file-powerpoint-o', + 'application/x-mspowerpoint': 'file-powerpoint-o', + } \ No newline at end of file -- libgit2 0.21.2