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 | 4 | <script type="text/javascript" src="{% static 'js/forum.js' %}"></script> |
5 | 5 | <script src="{% static 'js/file.js' %}"></script> |
6 | 6 | <script type="text/javascript" src="{% static 'js/material.js' %}"></script> |
7 | + <script type = "text/javascript" src="{% static 'link.js' %}"></script> | |
7 | 8 | {% endblock %} |
8 | 9 | |
9 | 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 | 55 | <div class="dropdown"> |
55 | 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 | 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 | 59 | <li> |
59 | 60 | <a href="javascript:get_modal_file('{% url 'course:file:create_file' topic.slug %}', '#fileModal', '#divModalFile')"> |
60 | 61 | {% trans "Create a file" %} |
... | ... | @@ -69,7 +70,7 @@ |
69 | 70 | </div> |
70 | 71 | <ul> |
71 | 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 | 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 | 75 | </ul> |
75 | 76 | </div> |
... | ... | @@ -113,12 +114,13 @@ |
113 | 114 | <div class="dropdown"> |
114 | 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 | 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 | 118 | <li><a href="javascript:void(0)" data-toggle="modal" data-target="#fileModal">Create a file</a></li> |
118 | 119 | </ul> |
119 | 120 | </div> |
120 | 121 | </div> |
121 | 122 | <ul> |
123 | + {% list_topic_link_edit request topic%} | |
122 | 124 | {% list_topic_file_edit request topic %} |
123 | 125 | </ul> |
124 | 126 | </div> |
... | ... | @@ -174,31 +176,6 @@ |
174 | 176 | </div> |
175 | 177 | </div> |
176 | 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 | 179 | {% professor_subject topic.subject user as professor_links %} |
203 | 180 | {% if professor_links%} |
204 | 181 | {% include "links/create_link.html" %} | ... | ... |