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 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 278 .forum_collapse {
276 279 color: #000;
277 280 }
... ...
courses/templates/course/index.html
... ... @@ -52,50 +52,75 @@
52 52  
53 53 {% if courses|length > 0 %}
54 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 93 <div class="col-md-10">
64 94 <div class="row">
65   - <div class="col-md-12">
  95 + <!--<div class="col-md-12">
66 96 <div class="pull-right">
67 97 <a href="{% url 'course:view' course.slug %}" class="btn btn-sm btn-info">
68 98 <span class="glyphicon glyphicon-eye-open"></span>
69 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 101 </div>
79 102 <h4>
80 103 <a href="{% url 'course:view' course.slug %}">
81 104 {{ course }}
82 105 </a>
83 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 108 <small>
87 109 <em>{{ course.objectivies|linebreaks }}</em>
88 110 </small>
89 111 </div>
90   - <div class="col-md-12">
  112 + <div class="col-md-12">
91 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 114 <br />
93 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 117 </div>
96 118 </div>
97 119 </div>
  120 +
98 121 {% endfor %}
  122 +
  123 +
99 124 <nav aria-label="Page navigation">
100 125 <ul class="pagination">
101 126 {% for page_number in paginator.page_range %}
... ...
courses/templates/course/view.html
... ... @@ -93,7 +93,7 @@
93 93 <p>
94 94 <b>Description:</b>
95 95 <i>
96   - {{course.description}}
  96 + {{course.content}}
97 97 </i>
98 98 </p>
99 99  
... ...
forum/models.py
... ... @@ -16,6 +16,7 @@ class Forum(Activity):
16 16 class Meta:
17 17 verbose_name = _('Forum')
18 18 verbose_name_plural = _('Foruns')
  19 + app_label ='forum'
19 20  
20 21 def __str__(self):
21 22 return self.name
... ... @@ -32,6 +33,7 @@ class Post(models.Model):
32 33 class Meta:
33 34 verbose_name = _('Post')
34 35 verbose_name_plural = _('Posts')
  36 + app_label ='forum'
35 37  
36 38 def __str__(self):
37 39 return ''.join([self.user.name, " / ", str(self.post_date)])
... ... @@ -48,6 +50,7 @@ class PostAnswer(models.Model):
48 50 class Meta:
49 51 verbose_name = _('Post Answer')
50 52 verbose_name_plural = _('Post Answers')
  53 + app_label ='forum'
51 54  
52 55 def __str__(self):
53 56 return ''.join([self.user.name, " / ", str(self.answer_date)])
54 57 \ No newline at end of file
... ...
users/templates/users/create.html
... ... @@ -14,7 +14,6 @@
14 14  
15 15  
16 16 {% block content %}
17   - <script src="{% static 'js/base/amadeus.js' %}"></script>
18 17 {% if messages %}
19 18 {% for message in messages %}
20 19 <div class="alert alert-{{ message.tags }} alert-dismissible" role="alert">
... ... @@ -49,8 +48,8 @@
49 48 </div>
50 49 {% elif field.auto_id == 'id_is_staff' or field.auto_id == 'id_is_active' %}
51 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 53 </label>
55 54 </div>
56 55 {% elif field.auto_id == 'id_cpf' %}
... ... @@ -91,5 +90,5 @@
91 90 {% endblock %}
92 91  
93 92 {% block javascript %}
94   -
  93 + <script src="{% static 'js/base/amadeus.js' %}"></script>
95 94 {% endblock %}
... ...