Commit a520574340c7c1fcaa35dd004018c38f19a08025

Authored by ailsoncgt
2 parents 240da4c1 4a4e0103

Rendering ckechbox field #55

core/static/css/base/amadeus.css
@@ -272,6 +272,9 @@ a.alert_message:hover{color : grey} @@ -272,6 +272,9 @@ a.alert_message:hover{color : grey}
272 background: #e0e0e0; 272 background: #e0e0e0;
273 } 273 }
274 274
  275 +body .container .jumbotron-inverse, body .container .well-inverse, body .container-fluid .jumbotron-inverse, body .container-fluid .well-inverse {
  276 + background-color: white;
  277 +}
275 .forum_collapse { 278 .forum_collapse {
276 color: #000; 279 color: #000;
277 } 280 }
courses/templates/course/index.html
@@ -52,50 +52,75 @@ @@ -52,50 +52,75 @@
52 52
53 {% if courses|length > 0 %} 53 {% if courses|length > 0 %}
54 {% for course in courses %} 54 {% for course in courses %}
55 - <div class="row well well-inverse">  
56 - <div class="col-md-2">  
57 - {% if course.image %}  
58 - <img src="{{ course.image.url }}" class="img-responsive" />  
59 - {% else %}  
60 - <img src="" class="img-responsive" />  
61 - {% endif %}  
62 - </div> 55 + <div class="col-md-12">
  56 + <div class="panel panel-info">
  57 + <!--{% if course.image %}
  58 + <img src="{{ course.image_url }}" class="img-responsive" />
  59 + {% else %}
  60 + <img src="" class="img-responsive" />
  61 + {% endif %} -->
  62 + <div class="panel-heading">
  63 + <h3 class="panel-title">Course</h3>
  64 + <span class="label label-info">{{ course.category }}</span>
  65 + <span class="label label-warning">{{ course.max_students }} {% trans 'students tops' %}</span>
  66 + </div>
  67 + <div class="panel-body">
  68 + <p><b>Course Name: </b>{{ course.name }}</p>
  69 + <p><b>Duration (in semesters): </b>09</p>
  70 + <p><b>Coordinator: </b>Alan Turing</p>
  71 + <p>
  72 + <b>Description:</b>
  73 + <i>
  74 + "Lorem ipsum dolor sit amet, consecctetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
  75 + </i>
  76 + </p>
  77 +
  78 + {% if user|has_role:'professor, system_admin' %}
  79 + <a href="{% url 'course:update' course.slug %}" class="btn btn-sm btn-primary">
  80 + <span class="glyphicon glyphicon-edit"></span>
  81 + </a>
  82 + <a href="{% url 'course:delete' course.slug %}" class="btn btn-sm btn-danger">
  83 + <span class="glyphicon glyphicon-trash"></span>
  84 + </a>
  85 + {% endif %}
  86 +
  87 + <a href="course_detail_student.html" class="btn btn-raised btn-default center-block">View Course</a>
  88 +
  89 + </div>
  90 + </div>
  91 + </div>
  92 + <div class="row">
63 <div class="col-md-10"> 93 <div class="col-md-10">
64 <div class="row"> 94 <div class="row">
65 - <div class="col-md-12"> 95 + <!--<div class="col-md-12">
66 <div class="pull-right"> 96 <div class="pull-right">
67 <a href="{% url 'course:view' course.slug %}" class="btn btn-sm btn-info"> 97 <a href="{% url 'course:view' course.slug %}" class="btn btn-sm btn-info">
68 <span class="glyphicon glyphicon-eye-open"></span> 98 <span class="glyphicon glyphicon-eye-open"></span>
69 </a> 99 </a>
70 - {% if user|has_role:'professor, system_admin' %}  
71 - <a href="{% url 'course:update' course.slug %}" class="btn btn-sm btn-primary">  
72 - <span class="glyphicon glyphicon-edit"></span>  
73 - </a>  
74 - <a href="{% url 'course:delete' course.slug %}" class="btn btn-sm btn-danger">  
75 - <span class="glyphicon glyphicon-trash"></span>  
76 - </a>  
77 - {% endif %} 100 +
78 </div> 101 </div>
79 <h4> 102 <h4>
80 <a href="{% url 'course:view' course.slug %}"> 103 <a href="{% url 'course:view' course.slug %}">
81 {{ course }} 104 {{ course }}
82 </a> 105 </a>
83 </h4> 106 </h4>
84 - <span class="label label-info">{{ course.category }}</span>  
85 - <span class="label label-warning">{{ course.max_students }} {% trans 'students tops' %}</span> 107 +
86 <small> 108 <small>
87 <em>{{ course.objectivies|linebreaks }}</em> 109 <em>{{ course.objectivies|linebreaks }}</em>
88 </small> 110 </small>
89 </div> 111 </div>
90 - <div class="col-md-12"> 112 + <div class="col-md-12">
91 <strong>{% trans 'Subscribe Period:' %} </strong> <em>de</em> <u>{{ course.init_register_date }}</u> <em>até</em> <u>{{ course.end_register_date }}</u> 113 <strong>{% trans 'Subscribe Period:' %} </strong> <em>de</em> <u>{{ course.init_register_date }}</u> <em>até</em> <u>{{ course.end_register_date }}</u>
92 <br /> 114 <br />
93 <strong>{% trans 'Period:' %} </strong> <em>de</em> <u>{{ course.init_date }}</u> <em>até</em> <u>{{ course.end_date }}</u> 115 <strong>{% trans 'Period:' %} </strong> <em>de</em> <u>{{ course.init_date }}</u> <em>até</em> <u>{{ course.end_date }}</u>
94 - </div> 116 + </div> -->
95 </div> 117 </div>
96 </div> 118 </div>
97 </div> 119 </div>
  120 +
98 {% endfor %} 121 {% endfor %}
  122 +
  123 +
99 <nav aria-label="Page navigation"> 124 <nav aria-label="Page navigation">
100 <ul class="pagination"> 125 <ul class="pagination">
101 {% for page_number in paginator.page_range %} 126 {% for page_number in paginator.page_range %}
courses/templates/course/view.html
@@ -93,7 +93,7 @@ @@ -93,7 +93,7 @@
93 <p> 93 <p>
94 <b>Description:</b> 94 <b>Description:</b>
95 <i> 95 <i>
96 - {{course.description}} 96 + {{course.content}}
97 </i> 97 </i>
98 </p> 98 </p>
99 99
forum/models.py
@@ -16,6 +16,7 @@ class Forum(Activity): @@ -16,6 +16,7 @@ class Forum(Activity):
16 class Meta: 16 class Meta:
17 verbose_name = _('Forum') 17 verbose_name = _('Forum')
18 verbose_name_plural = _('Foruns') 18 verbose_name_plural = _('Foruns')
  19 + app_label ='forum'
19 20
20 def __str__(self): 21 def __str__(self):
21 return self.name 22 return self.name
@@ -32,6 +33,7 @@ class Post(models.Model): @@ -32,6 +33,7 @@ class Post(models.Model):
32 class Meta: 33 class Meta:
33 verbose_name = _('Post') 34 verbose_name = _('Post')
34 verbose_name_plural = _('Posts') 35 verbose_name_plural = _('Posts')
  36 + app_label ='forum'
35 37
36 def __str__(self): 38 def __str__(self):
37 return ''.join([self.user.name, " / ", str(self.post_date)]) 39 return ''.join([self.user.name, " / ", str(self.post_date)])
@@ -48,6 +50,7 @@ class PostAnswer(models.Model): @@ -48,6 +50,7 @@ class PostAnswer(models.Model):
48 class Meta: 50 class Meta:
49 verbose_name = _('Post Answer') 51 verbose_name = _('Post Answer')
50 verbose_name_plural = _('Post Answers') 52 verbose_name_plural = _('Post Answers')
  53 + app_label ='forum'
51 54
52 def __str__(self): 55 def __str__(self):
53 return ''.join([self.user.name, " / ", str(self.answer_date)]) 56 return ''.join([self.user.name, " / ", str(self.answer_date)])
54 \ No newline at end of file 57 \ No newline at end of file
users/templates/users/create.html
@@ -14,7 +14,6 @@ @@ -14,7 +14,6 @@
14 14
15 15
16 {% block content %} 16 {% block content %}
17 - <script src="{% static 'js/base/amadeus.js' %}"></script>  
18 {% if messages %} 17 {% if messages %}
19 {% for message in messages %} 18 {% for message in messages %}
20 <div class="alert alert-{{ message.tags }} alert-dismissible" role="alert"> 19 <div class="alert alert-{{ message.tags }} alert-dismissible" role="alert">
@@ -49,8 +48,8 @@ @@ -49,8 +48,8 @@
49 </div> 48 </div>
50 {% elif field.auto_id == 'id_is_staff' or field.auto_id == 'id_is_active' %} 49 {% elif field.auto_id == 'id_is_staff' or field.auto_id == 'id_is_active' %}
51 <div class="checkbox"> 50 <div class="checkbox">
52 - <label>  
53 - <input type="checkbox" name="checkbox"><span class="checkbox-material"><span class="check"></span></span> {{field.label}} 51 + <label for="{{ field.auto_id }}">
  52 + {% render_field field %}<span class="checkbox-material"><span class="check"></span></span> {{field.label}}
54 </label> 53 </label>
55 </div> 54 </div>
56 {% elif field.auto_id == 'id_cpf' %} 55 {% elif field.auto_id == 'id_cpf' %}
@@ -91,5 +90,5 @@ @@ -91,5 +90,5 @@
91 {% endblock %} 90 {% endblock %}
92 91
93 {% block javascript %} 92 {% block javascript %}
94 - 93 + <script src="{% static 'js/base/amadeus.js' %}"></script>
95 {% endblock %} 94 {% endblock %}