Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/activity_player.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,23 @@

<div class="new_note header_text_block header_text_md_block">
<a title="Click here to write a Note" {% if user_access_priv == "allow" %} target="_blank" href="{% url 'course_notebook' group_id %}?create=True" {% else %} class="user_not_enrolled" {% endif %}><i class="fa fa-edit header_icon"></i>&nbsp;
{% trans "Write Note" %}
{% if "announced_unit" in node.member_of_names_list or "drafts_unit" in node.member_of_names_list%}
{% trans "Write Note" %}
{% else %}
{% trans "Write Blog" %}
{% endif %}

</a>
}
</div>
<div class="new_note header_text_block header_text_lg_block">
<a {% if prev_lesson_id and lesson_act_prev_id and not resource_prev_id%} href="{% url 'activity_player_detail' group_id prev_lesson_id lesson_act_prev_id %}" title="Go to previous lesson" {% else %} class = "disabled" title="You are on the first lesson" {% endif %} ><i class="fa fa-angle-double-left header_icon"></i>&nbsp;
{% trans "Previous Lesson" %}
{% if "announced_unit" in node.member_of_names_list or "drafts_unit" in node.member_of_names_list%}
<a {% if prev_lesson_id and lesson_act_prev_id and not resource_prev_id%} href="{% url 'activity_player_detail' group_id prev_lesson_id lesson_act_prev_id %}" title="Go to previous lesson" {% else %} class = "disabled" title="You are on the first lesson" {% endif %} ><i class="fa fa-angle-double-left header_icon"></i>&nbsp;
{% trans "Previous Lesson" %}
{% else %}
<a {% if prev_lesson_id and lesson_act_prev_id and not resource_prev_id%} href="{% url 'activity_player_detail' group_id prev_lesson_id lesson_act_prev_id %}" title="Go to previous section" {% else %} class = "disabled" title="You are on the first section" {% endif %} ><i class="fa fa-angle-double-left header_icon"></i>&nbsp;
{% trans "Previous Section" %}
{% endif %}
</a>
</div>

Expand All @@ -105,8 +116,16 @@
</div>

<div class="new_note header_text_block header_text_lg_block">
<a {% if next_lesson_id and lesson_next_act_id and not resource_next_id %} title="Go to next lesson" href="{% url 'activity_player_detail' group_id next_lesson_id lesson_next_act_id %}" {% else %} class = "disabled" title="You are on the last Lesson" {% endif %} >
{% trans "Next Lesson" %} <i class="fa fa-angle-double-right header_icon"></i>
{% if "announced_unit" in node.member_of_names_list or "drafts_unit" in node.member_of_names_list%}

<a {% if next_lesson_id and lesson_next_act_id and not resource_next_id %} title="Go to next lesson" href="{% url 'activity_player_detail' group_id next_lesson_id lesson_next_act_id %}" {% else %} class = "disabled" title="You are on the last Lesson" {% endif %} >
{% trans "Previous Lesson" %}

{% else %}
<a {% if next_lesson_id and lesson_next_act_id and not resource_next_id %} title="Go to next section" href="{% url 'activity_player_detail' group_id next_lesson_id lesson_next_act_id %}" {% else %} class = "disabled" title="You are on the last section" {% endif %} >
{% trans "Next Section" %}
{% endif %}
<i class="fa fa-angle-double-right header_icon"></i>
</a>
</div>
</div>
Expand Down
146 changes: 121 additions & 25 deletions gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,32 @@ <h1><a href="{{site.HOME_PAGE|default_if_none:'/home/'}}">
<a title="Click here to view your enrolled Courses" href="{% url 'my_desk' request.user.id %}" {% if title == "my desk" or title == "my performance" %} class="active" {% endif %}> My Desk</a>
</li>
{% endif %}
<li class="second-has-form">
<div class="large-1 small-2 columns">
<button type="submit" class="tiny button" value="" id="search-submit" class="checked">
<i class="fi-magnifying-glass" title="Search"></i>
</button>
</div>

</li>
<li class="has-form">
<!-- <form id = "search_form" {% if groupid %} action="{% url 'results' groupid %}" {% else %} action="" {% endif %}
name="search_form" method="GET" >
<!--<form id="search_form" name="search_form" method="GET" >
{{group_object.name|truncatechars:15}}
<div class="row collapse">
<div class="large-11 small-10 columns">
<input type="text" name="search_text" id="search_text" placeholder='{% trans "Search" %} ' autocomplete="off" required />
</div>
<div class="large-1 small-2 columns">
<button type="submit" class="tiny button" value="" id="search-submit" class="checked">
<i class="fi-magnifying-glass"></i>
</button>
</div>
</div>

</form>-->
</li>
</ul>
<!-- -END of NROER level one menu -->
{% comment %}
Expand Down Expand Up @@ -451,16 +476,19 @@ <h5><small class="fi-torso"> {{each_buddy}}</small></h5>
<ul class="title-area text-center">
<li class="name" title="{% firstof group_object.altnames group_object.name %}">
<h1>
<a href="{% url 'groupchange' group_id %}">

{% get_relation_value group_object.pk 'has_profile_pic' as grel_dict %}
{% if not grel_dict.cursor and grel_dict.grel_node %}
<img src="{{MEDIA_URL}}{{grel_dict.grel_node.if_file.original.relurl}}" />
{% else %}
<img src="/static/ndf/images/metaStudio-profile.svg" alt="Profile picture for this group." height="20px" width="20px" >
{% endif %}
{% if group_object.name == "home" %}
<a href="{% url 'landing_page' %}">
{% else %}
<a href="{% url 'groupchange' group_id %}">
{% endif %}
{% get_relation_value group_object.pk 'has_profile_pic' as grel_dict %}
{% if not grel_dict.cursor and grel_dict.grel_node %}
<img src="{{MEDIA_URL}}{{grel_dict.grel_node.if_file.original.relurl}}" />
{% else %}
<img src="/static/ndf/images/metaStudio-profile.svg" alt="Profile picture for this group." height="20px" width="20px" >
{% endif %}

<span style="color:black!important">{% firstof group_object.altnames|truncatechars:7 group_object.name|truncatechars:7 %}</span>
<span style="color:black!important">{% firstof group_object.altnames|truncatechars:7 group_object.name|truncatechars:7 %}</span>
</a>
</h1>
</li>
Expand Down Expand Up @@ -529,23 +557,7 @@ <h1>
</div>
</form>
</li> -->
<li class="has-form">
<form {% if groupid %} action="{% url 'results' groupid %}" {% else %} action="" {% endif %}
name="search_form" method="GET" >

<div class="row collapse">
<div class="large-11 small-10 columns">
<input type="text" name="search_text" id="search_text" placeholder='{% trans "Search" %} {{group_object.name|truncatechars:15}}' autocomplete="off" required/>
</div>
<div class="large-1 small-2 columns">
<button type="submit" class="tiny button" value="" id="search-submit">
<i class="fi-magnifying-glass"></i>
</button>
</div>
</div>

</form>
</li>

<!-- END of search in the app bar -->

Expand Down Expand Up @@ -644,3 +656,87 @@ <h1>
</script>

{% endif %}
<script>
// $(document).on("click", "#search-submit", function() {
//
// if( $("#search_text").val().length === 0 )
// {
// if($("#search-submit").hasClass("checked"))
// {
// $("#search_text").show();
// $("#search-submit").removeClass("checked");

// }
// else
// {
// $("#search_text").hide();
// $("#search-submit").addClass("checked");
//
// }
// }
// else
// {
// $("#search_text").show();
// //action="{% url 'results' groupid %}"
// $('#search_form').attr('action', "{% url 'results' groupid %}");
// }
// });
//$('#search_form').submit(function (event)
$( document ).ready(function() {
$("li.second-has-form").show();
//$("li.has-form").hide();

});


$(document).on("click", "#search-submit1", function() {

//var action = '';
// compute action here...
$("li.second-has-form").hide();
$("li.has-form").show();


// if( $("#search_text").val().length === 0 )
// {
//
// //$("#search_form").attr('action', action);
// if($("#search-submit").hasClass("checked"))
// {
// $("#search_text").show();
// $("#search-submit").removeClass("checked");
//
// }
// else
// {
// $("#search_text").hide();
// $("#search-submit").addClass("checked");
//
// }
// }
// else
// {
// $("li.has-form").show();
// $("li.second-has-form").hide();
//action="{% url 'results' groupid %}"
//$("#search_form").attr('action', action);
// }

});
</script>
<script>
$(document).on("click", "#search-submit", function() {
$("li.second-has-form").hide();

//$('li').attr({class: "has-form"});
$('li.has-form').append("<form id = 'search_form' {% if groupid %} action='{% url 'results' groupid %}' {% else %} action='' {% endif %} name='search_form' method=GET></form>");
$('#search_form').append('<div class="row collapse"><div class="large-11 small-10 columns"><input type="text" name="search_text" id="search_text" placeholder="{% trans "Search" %}" autocomplete="off" required /></div><div class="large-1 small-2 columns"><button type="submit" class="tiny button" value="" id="search-submit1" class="checked"><i class="fi-magnifying-glass"></i></button></div></div>');

//$('form').attr({id: "search_form"});



});
</script>


2 changes: 1 addition & 1 deletion gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/lms.html
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@

{% endif %}
<li>
<a href="{% url 'unit_edit' groupid group_object.pk %}" class="fi-pencil"> {% trans "Edit Metadata" %}</a>
<a href="{% url 'unit_edit' groupid group_object.pk %}" class="fi-pencil"> {% if 'Author' in group_object_member_of_names_list %} {% trans "Edit Profile" %} {% else %} {% trans "Edit Metadata" %} {% endif %}</a>
</li>
<li> <a data-reveal-id="delete-unit"><i class="fa fa-trash"></i> {% trans "Delete" %}</a> </li>
<div id="delete-unit" class="reveal-modal tiny text-center" data-reveal>
Expand Down