Commit e6034fe7e1c079e5008f062e66cd4a272b050355
1 parent
eedb88cb
Exists in
master
and in
5 other branches
Including links js, listing links, create link modal with js, view link [Issue:#126]
Showing
1 changed file
with
5 additions
and
28 deletions
Show diff stats
courses/templates/subject/form_view_teacher.html
@@ -4,6 +4,7 @@ | @@ -4,6 +4,7 @@ | ||
4 | <script type="text/javascript" src="{% static 'js/forum.js' %}"></script> | 4 | <script type="text/javascript" src="{% static 'js/forum.js' %}"></script> |
5 | <script src="{% static 'js/file.js' %}"></script> | 5 | <script src="{% static 'js/file.js' %}"></script> |
6 | <script type="text/javascript" src="{% static 'js/material.js' %}"></script> | 6 | <script type="text/javascript" src="{% static 'js/material.js' %}"></script> |
7 | + <script type = "text/javascript" src="{% static 'link.js' %}"></script> | ||
7 | {% endblock %} | 8 | {% endblock %} |
8 | 9 | ||
9 | <div class="panel-group accordion ui-accordion ui-widget ui-helper-reset ui-sortable" role="tablist" aria-multiselectable="false"> | 10 | <div class="panel-group accordion ui-accordion ui-widget ui-helper-reset ui-sortable" role="tablist" aria-multiselectable="false"> |
@@ -54,7 +55,7 @@ | @@ -54,7 +55,7 @@ | ||
54 | <div class="dropdown"> | 55 | <div class="dropdown"> |
55 | <a href="#" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-plus-circle fa-lg" aria-hidden="true"></i></a> | 56 | <a href="#" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-plus-circle fa-lg" aria-hidden="true"></i></a> |
56 | <ul class="dropdown-menu" aria-labelledby="dLabel"> | 57 | <ul class="dropdown-menu" aria-labelledby="dLabel"> |
57 | - <li><a href="javascript:void(0)" data-toggle="modal" data-target="#createLinksModal">Create a Link<div class="ripple-container"><div class="ripple ripple-on ripple-out" style="left: 54.5312px; top: 22px; background-color: rgb(0, 150, 136); transform: scale(20);"></div></div></a></li> | 58 | + <li><a href=" javascript:get_modal_link('{% url 'course:links:create_link' %}', '#createLinksModal','#divModalLink') ">Create a Link<div class="ripple-container"><div class="ripple ripple-on ripple-out" style="left: 54.5312px; top: 22px; background-color: rgb(0, 150, 136); transform: scale(20);"></div></div></a></li> |
58 | <li> | 59 | <li> |
59 | <a href="javascript:get_modal_file('{% url 'course:file:create_file' topic.slug %}', '#fileModal', '#divModalFile')"> | 60 | <a href="javascript:get_modal_file('{% url 'course:file:create_file' topic.slug %}', '#fileModal', '#divModalFile')"> |
60 | {% trans "Create a file" %} | 61 | {% trans "Create a file" %} |
@@ -69,7 +70,7 @@ | @@ -69,7 +70,7 @@ | ||
69 | </div> | 70 | </div> |
70 | <ul> | 71 | <ul> |
71 | {% list_topic_file request topic %} | 72 | {% list_topic_file request topic %} |
72 | - <li><i class="fa fa-link" aria-hidden="true"></i> <a href="#" data-toggle="modal" data-target="#linksModal">Link 1</a></li> | 73 | + {% list_topic_link request topic%} |
73 | <li><i class="fa fa-file-code-o" aria-hidden="true"></i> <a href="#" data-toggle="modal" data-target="#embedModal">EMBED Material</a></li> | 74 | <li><i class="fa fa-file-code-o" aria-hidden="true"></i> <a href="#" data-toggle="modal" data-target="#embedModal">EMBED Material</a></li> |
74 | </ul> | 75 | </ul> |
75 | </div> | 76 | </div> |
@@ -113,12 +114,13 @@ | @@ -113,12 +114,13 @@ | ||
113 | <div class="dropdown"> | 114 | <div class="dropdown"> |
114 | <a href="#" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-plus-circle fa-lg" aria-hidden="true"></i></a> | 115 | <a href="#" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-plus-circle fa-lg" aria-hidden="true"></i></a> |
115 | <ul class="dropdown-menu" aria-labelledby="dLabel"> | 116 | <ul class="dropdown-menu" aria-labelledby="dLabel"> |
116 | - <li><a href="javascript:void(0)" data-toggle="modal" data-target="#createLinksModal">Create a Link</a></li> | 117 | + <li><a href=" javascript:get_modal_link('{% url 'course:links:create_link' %}', '#createLinksModal','#divModalLink') ">Create a Link</a></li> |
117 | <li><a href="javascript:void(0)" data-toggle="modal" data-target="#fileModal">Create a file</a></li> | 118 | <li><a href="javascript:void(0)" data-toggle="modal" data-target="#fileModal">Create a file</a></li> |
118 | </ul> | 119 | </ul> |
119 | </div> | 120 | </div> |
120 | </div> | 121 | </div> |
121 | <ul> | 122 | <ul> |
123 | + {% list_topic_link_edit request topic%} | ||
122 | {% list_topic_file_edit request topic %} | 124 | {% list_topic_file_edit request topic %} |
123 | </ul> | 125 | </ul> |
124 | </div> | 126 | </div> |
@@ -174,31 +176,6 @@ | @@ -174,31 +176,6 @@ | ||
174 | </div> | 176 | </div> |
175 | </div> | 177 | </div> |
176 | <!-- END --> | 178 | <!-- END --> |
177 | - <!--MODAL VIEW LINK--> | ||
178 | - <div class="modal fade" id="linksModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> | ||
179 | - <div class="modal-dialog" role="document"> | ||
180 | - <div class="modal-content"> | ||
181 | - <div class="modal-header"> | ||
182 | - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | ||
183 | - <h4 class="modal-title" id="myModalLabel">Links</h4> | ||
184 | - </div> | ||
185 | - <div class="modal-body"> | ||
186 | - <!-- Card --> | ||
187 | - <article class="card animated fadeInLeft"> | ||
188 | - <img class="card-img-top img-responsive" src="https://www.python.org/static/opengraph-icon-200x200.png" align="left"> | ||
189 | - <div class="card-block"> | ||
190 | - <b class="card-title">Python</b><p></p> | ||
191 | - <b class="text-muted">Guido van Rossum</b> | ||
192 | - <p class="card-text"> </p><p>Python is a widely used high-level, general-purpose, interpreted, dynamic programming language. Its design philosophy emphasizes code readability, and its syntax allows programmers to express concepts in fewer lines of code than possible in languages such as C++ or Java.</p> | ||
193 | - <a href="https://www.python.org/" class="btn btn-primary">Read more</a> | ||
194 | - </div> | ||
195 | - </article> | ||
196 | - <!-- .end Card --> | ||
197 | - </div> | ||
198 | - </div> | ||
199 | - </div> | ||
200 | - </div> | ||
201 | - <!-- EndModal --> | ||
202 | {% professor_subject topic.subject user as professor_links %} | 179 | {% professor_subject topic.subject user as professor_links %} |
203 | {% if professor_links%} | 180 | {% if professor_links%} |
204 | {% include "links/create_link.html" %} | 181 | {% include "links/create_link.html" %} |