Skip to content

Commit

Permalink
Merge pull request #1906 from saavrabh/master-UI
Browse files Browse the repository at this point in the history
LMS UI bugs/features
  • Loading branch information
katkamrachana authored Mar 8, 2018
2 parents 2915acd + c7587a1 commit 0ba53f7
Show file tree
Hide file tree
Showing 12 changed files with 97 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5699,8 +5699,6 @@ ul.authoring-tab > li > a.selected, ul.authoring-tab > li > a:hover {
/* line 5976, ../../../scss/_clix2017.scss */
input.transcript-toggler {
background-image: url(/static/ndf/images/Transcript.svg) no-repeat !important;
background-color: transparent;
/* make the button transparent */
background-repeat: no-repeat;
/* make the background image appear only once */
background-position: 0px 0px;
Expand Down
29 changes: 29 additions & 0 deletions gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/Transcript_v1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/scss/_clix2017.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5975,7 +5975,7 @@ ul.authoring-tab{

input.transcript-toggler{
background-image: url(/static/ndf/images/Transcript.svg) no-repeat !important;
background-color: transparent; /* make the button transparent */
// background-color: transparent; /* make the button transparent */
background-repeat: no-repeat; /* make the background image appear only once */
background-position: 0px 0px; /* equivalent to 'top left' */
border: none; /* assuming we don't want any borders */
Expand Down
9 changes: 5 additions & 4 deletions gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/add_asset.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ <h4 class="page-name">{% firstof asset_obj.altnames|truncatechars:25 asset_obj.
{% endif %}
-->
{% endif %}
{% if asset_content_list.grel_id and asset_obj.created_by == request.user.id or is_gstaff and asset_obj and asset_content_list.grel_id %}

<button type="button" class="orange-button delete-asset-content right" title="Click on the checkbox on the files below to Delete"><i class="fa fa-trash"></i> {% trans "Delete Files" %}</button>
{% endif %}
</div>
</div>

Expand Down Expand Up @@ -270,10 +274,7 @@ <h3 class="left overlay-title">&nbsp;


<div class="row">
{% if asset_content_list.grel_id and asset_obj.created_by == request.user.id or is_gstaff and asset_obj and asset_content_list.grel_id %}

<button type="button" class="orange-button delete-asset-content right icon-widget" style="margin-right: 100px;" title="Click on the checkbox on the files below to Delete"><i class="fa fa-trash"></i> {% trans "Delete Files" %}</button>
{% endif %}


<div class="row listing-row">
{% for each in asset_content_list.grel_node %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{% check_is_gstaff group_id request.user as is_gstaff %}
{% get_download_filename node as download_filename %}
{% get_group_object groupid as group_object %}
{% get_file_obj node as file_obj %}
<div class="row">
<div class="medium 12 columns">
<div class="left small-12 medium-6 columns">
Expand All @@ -13,6 +14,11 @@
<label>{% trans "Created By:" %} <b> {{ node.user_details_dict.contributors|join:', ' }} </b>
<!--<input type="text" placeholder="" name="resource_name" />-->
</label>
{% if file_obj.length %}
<label>{% trans "File Size:" %} <b> {{file_obj.length|filesizeformat}} </b>
<!--<input type="text" placeholder="" name="resource_name" />-->
</label>
{% endif %}

<div class="preview_asset">
{% if title == "asset_content_detail" or title == "asset_gallery_detail" or title == "raw_material_detail"%}
Expand Down
2 changes: 1 addition & 1 deletion gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/header_clix.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
</li>
{% else %}
<li>
<a title="Click here to login" class="" href="{% url 'auth_login' %}" accesskey="l">
<a title="Click here to login" class="" href="{% url 'auth_login' %}{% if not is_ac_url %}?next={{request.path}}{% endif %}" accesskey="l">
<i class="fi-key"></i>&nbsp; {% trans "Login" %}
</a>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@

<div {% if user_access_priv == "allow" %} onclick="createDiscussion()" class="ckeditor-comment explore-button "{% else %} class="ckeditor-comment explore-button user_not_enrolled" {% endif %} id="create-discussion" data-id="{{ node.pk }}" style="margin-bottom:0;">
{% if thr_int_type %}
{{thr_int_type}} {% if all_replies|length > 0 %}({{all_replies|length }}) {% endif %}
<i class="fa fa-comments"></i> {{thr_int_type}} {% if all_replies|length > 0 %}({{all_replies|length }}) {% endif %}
{% else %}
{{default_discussion_lbl}} {% if all_replies|length > 0 %} ({{all_replies|length }}) {% endif %}
<i class="fa fa-comments"></i> {{default_discussion_lbl}} {% if all_replies|length > 0 %} ({{all_replies|length }}) {% endif %}
{% endif %}
</div>
{% endif %}
Expand Down
69 changes: 47 additions & 22 deletions gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/lms_dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
{% get_gstudio_workspace_instance as is_workspace_instance %}

<div class="mydesk_page">

<div class="page_banner">
<div class="banner_overlay"></div>
<div class="banner_profile">
Expand All @@ -32,14 +33,23 @@
<div class="page_menu">
<ul class="nav_menu_1">
<li>
<a href="{% url 'my_desk' request.user.id %}" {% if title == "my desk" %} class="selected" {% endif %}> {% if is_workspace_instance %} {% trans "My Workspaces" %} {% else %} <i class="fi-book-bookmark" style="font-size:20px;"></i> {% trans "My Courses" %} {% endif %} </a>

{% if site.SITE_NAME == "NROER" %}
<a href="{% url 'my_desk' request.user.id %}" {% if title == "my desk" %} class="selected" {% endif %}><i class="fi-book-bookmark" style="font-size:20px;"></i> {% trans "My Workspaces" %}</a>

{% else %}
<a href="{% url 'my_desk' request.user.id %}" {% if title == "my desk" %} class="selected" {% endif %}> {% if is_workspace_instance %} {% trans "My Workspaces" %} {% else %} <i class="fi-book-bookmark" style="font-size:20px;"></i> {% trans "My Courses" %} {% endif %} </a>
{% endif %}
</li>


{# <li class=""><a {% if title == "my workspace" %} class="selected" {% endif %} href="{% url 'course_about' request.user.username %}">{% trans "My WorkSpace" %}</a> </li> #}
<li class=""><a {% if title == "my performance" %} class="selected" {% endif %} href="{% url 'my_performance' request.user.id %}"> <i class="fa fa-line-chart" aria-hidden="true"></i> {% trans "My Performance" %}</a> </li>

</ul>
</div>


<ul class="small-block-grid-1 medium-block-grid-2 large-block-grid-2" >
{% comment %}

Expand All @@ -51,32 +61,46 @@
No modules found!
{% endfor %}
</ul>
</div>
{% endcomment %}
</br>

{% endcomment %}
</br>

<div class="small-12 columns group_sections_content">
{% if title == "my desk" %}
<div class="small-12 columns lms_explore_back_unit">
<ul class="small-block-grid-1 medium-block-grid-3 large-block-grid-3">
{% for each_obj in units_cur %}
<li class="card-image-wrapper">
{% include "ndf/card_group.html" with node=each_obj url_name="groupchange" first_arg=each_obj.pk no_enroll=True %}
</li>
{% empty %}
<section class="empty-dashboard-message">
<p>You are not enrolled in any course!</p>
<a class="button-explore-courses" href="{% url 'explore_courses' %}"> <i class="fa fa-binoculars" aria-hidden="true"></i> Explore</a>
</section>
{% endfor %}
</ul>
</div>
{% endif %}
</div>
{% if title == "my desk" %}
<div class="row" style=" margin-left: 10px !important ">
<h3> My Workspace</h3>
<ul class="small-block-grid-1 medium-block-grid-3 large-block-grid-3">
<li class="card-image-wrapper">
{% include "ndf/card_group.html" with node=node url_name="course_about" first_arg=node.pk no_enroll=True %}
</li>
</ul>
</div>
<hr/>
<div class="row" style=" margin-left: 10px !important ">
<h3 >Joined Workspaces & Enrolled Courses </h3>
</div>
</br>
<div class="small-12 columns lms_explore_back_unit">
<ul class="small-block-grid-1 medium-block-grid-3 large-block-grid-3">
{% for each_obj in units_cur %}
<li class="card-image-wrapper">
{% include "ndf/card_group.html" with node=each_obj url_name="groupchange" first_arg=each_obj.pk no_enroll=True %}
</li>
{% empty %}
<section class="empty-dashboard-message">
<p>You are not enrolled in any course!</p>
<a class="button-explore-courses" href="{% url 'explore_courses' %}"> <i class="fa fa-binoculars" aria-hidden="true"></i> Explore</a>
</section>
{% endfor %}
</ul>
</div>
{% endif %}
</div></div></div>

<div class="small-12 columns group_sections_content">
{% if title == "my performance" %}
<div class="small-12 columns lms_explore_back_unit">
<ul class="small-block-grid-1 medium-block-grid-3 large-block-grid-3">
<ul class="small-block-grid-1 medium-block-grid-3 large-block-grid-3" style="margin-top: -200px;">
{% for each_obj in units_cur %}
<li class="card-image-wrapper">
{% include "ndf/card_group.html" with group_counts=True node=each_obj no_url=True first_arg=each_obj.pk %}
Expand All @@ -92,6 +116,7 @@
</div>

<div id="show-overlay" class="reveal-modal reveal-modal-overlay" data-options="close_on_background_click:false;close_on_esc:false;" data-reveal aria-labelledby="modalTitle" aria-hidden="true" role="dialog"></div>
</div>

<script type="text/javascript">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
{% get_gstudio_twitter_via as twitter_via %}
{% check_is_gstaff groupid request.user as is_gstaff %}
{#% get_gstudio_facebook_app_id as fb_app_id %#}
{% get_group_object groupid as group_obj %}
{% get_gstudio_social_share_resource as social_share %}
<script type="text/javascript" src="/static/ndf/bower_components/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="/static/ndf/bower_components/ckeditor/config.js"></script>
Expand Down Expand Up @@ -535,7 +536,7 @@ <h4 class="text-right small-4 columns redirection" onclick="Book.nextPage();">

{% if not topic and not is_group %}
<div>
{% if site.SITE_NAME != "NROER" %}
{% if site.SITE_NAME != "NROER" and 'announced_unit' not in group_obj.member_of_names_list %}
<small class="text-gray">
[<em>{% trans "Contributed by" %} {{ node.user_details_dict.contributors|join:', ' }}</em> on {{node.last_update}}]
</small>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
{% if transcript_rel %}

<div>
{# <button type = "button" class="small radius transcript-toggler" onclick="togglerTranscript(this)">Transcript</button> #}
{# <button type = "button" class="small radius transcript-toggler" onclick="togglerTranscript(this)">Transcript</button> #}
<input type="button" class="small radius transcript-toggler" onclick="togglerTranscript(this)" value="Transcript">
<img src="/static/ndf/images/Transcript.svg" style="margin-top: -60px;margin-left: 9px;" />
<img src="/static/ndf/images/Transcript_v1.svg" style="margin-top: -60px;margin-left: 9px;" />
<div class="transcript-data hide">
<object type="text/html" data="{{MEDIA_URL}}{{transcript_rel.grel_node.if_file.original.relurl}}"></object>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
{% if transcript_rel %}
<div>
<input type="button" class="small radius transcript-toggler" onclick="togglerTranscript(this)" value="Transcript">
<img src="/static/ndf/images/Transcript.svg" style="margin-top: -60px;margin-left: 9px;" />
<img src="/static/ndf/images/Transcript_v1.svg" style="margin-top: -60px;margin-left: 9px;" />
<div class="transcript-data hide">
<object type="text/html" data="{{MEDIA_URL}}{{transcript_rel.grel_node.if_file.original.relurl}}" style="width:100%; height:100%"></object>
</div>
Expand Down
2 changes: 1 addition & 1 deletion gnowsys-ndf/gnowsys_ndf/ndf/views/gcourse.py
Original file line number Diff line number Diff line change
Expand Up @@ -3538,7 +3538,7 @@ def assetcontent_detail(request, group_id, asset_id,asst_content_id,page_no=1):
group_obj = get_group_name_id(group_id, get_obj=True)
# print group_id,asset_id,asst_content_id
asset_content_list = get_relation_value(ObjectId(asset_obj._id),'has_assetcontent')
template = 'ndf/gevent_base.html'
template = 'ndf/lms.html'
assetcontent_page_info = paginator.Paginator(asset_content_list['grel_node'], page_no, GSTUDIO_NO_OF_OBJS_PP)
context_variables = {
'asset_content_list':asset_content_list,'group_id':group_id,
Expand Down

0 comments on commit 0ba53f7

Please sign in to comment.