Merge pull request #845 from MITx/feature/tomg/cas-static-tabs
added static tab templates
This commit is contained in:
@@ -777,3 +777,9 @@ def asset_index(request, location):
|
|||||||
# points to the temporary course landing page with log in and sign up
|
# points to the temporary course landing page with log in and sign up
|
||||||
def landing(request, org, course, coursename):
|
def landing(request, org, course, coursename):
|
||||||
return render_to_response('temp-course-landing.html', {})
|
return render_to_response('temp-course-landing.html', {})
|
||||||
|
|
||||||
|
def static_pages(request, org, course, coursename):
|
||||||
|
return render_to_response('static-pages.html', {})
|
||||||
|
|
||||||
|
def edit_static(request, org, course, coursename):
|
||||||
|
return render_to_response('edit-static-page.html', {})
|
||||||
|
|||||||
64
cms/static/sass/_static-pages.scss
Normal file
64
cms/static/sass/_static-pages.scss
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
.static-pages {
|
||||||
|
.new-static-page-button {
|
||||||
|
@include grey-button;
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
padding: 12px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.static-page-item {
|
||||||
|
position: relative;
|
||||||
|
margin: 10px 0;
|
||||||
|
padding: 22px 20px;
|
||||||
|
border: 1px solid $darkGrey;
|
||||||
|
border-radius: 3px;
|
||||||
|
background: #fff;
|
||||||
|
@include box-shadow(0 1px 2px rgba(0, 0, 0, .1));
|
||||||
|
|
||||||
|
.page-name {
|
||||||
|
font-size: 19px;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-actions {
|
||||||
|
margin-top: 19px;
|
||||||
|
margin-right: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.edit-static-page {
|
||||||
|
.main-wrapper {
|
||||||
|
margin-top: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.static-page-details {
|
||||||
|
@extend .window;
|
||||||
|
padding: 32px 40px;
|
||||||
|
|
||||||
|
.row {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-display-name-input {
|
||||||
|
width: 100%;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-contents {
|
||||||
|
@include box-sizing(border-box);
|
||||||
|
width: 100%;
|
||||||
|
height: 360px;
|
||||||
|
padding: 15px;
|
||||||
|
border: 1px solid #b0b6c2;
|
||||||
|
border-radius: 2px;
|
||||||
|
@include linear-gradient(top, rgba(255, 255, 255, 0), rgba(255, 255, 255, .3));
|
||||||
|
background-color: #edf1f5;
|
||||||
|
@include box-shadow(0 1px 2px rgba(0, 0, 0, .1) inset);
|
||||||
|
font-family: Monaco, monospace;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #3c3c3c;
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
@import "subsection";
|
@import "subsection";
|
||||||
@import "unit";
|
@import "unit";
|
||||||
@import "assets";
|
@import "assets";
|
||||||
|
@import "static-pages";
|
||||||
@import "course-info";
|
@import "course-info";
|
||||||
@import "landing";
|
@import "landing";
|
||||||
@import "graphics";
|
@import "graphics";
|
||||||
|
|||||||
41
cms/templates/edit-static-page.html
Normal file
41
cms/templates/edit-static-page.html
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<%inherit file="base.html" />
|
||||||
|
<%! from django.core.urlresolvers import reverse %>
|
||||||
|
<%block name="title">Edit Static Page</%block>
|
||||||
|
<%block name="bodyclass">edit-static-page</%block>
|
||||||
|
|
||||||
|
<%block name="content">
|
||||||
|
<div class="main-wrapper">
|
||||||
|
<div class="inner-wrapper">
|
||||||
|
<div class="main-column">
|
||||||
|
<article class="static-page-details">
|
||||||
|
<div class="row">
|
||||||
|
<label>Display Name:</label>
|
||||||
|
<input type="text" value="Syllabus" class="page-display-name-input" data-metadata-name="display_name"/>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<label>Page Content:</label>
|
||||||
|
<textarea class="page-contents"></textarea>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="unit-properties window">
|
||||||
|
<h4>Page Settings</h4>
|
||||||
|
<div class="window-contents">
|
||||||
|
<div class="row visibility">
|
||||||
|
<label class="inline-label">Visibility:</label>
|
||||||
|
<select>
|
||||||
|
<option>Public</option>
|
||||||
|
<option>Private</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="row unit-actions">
|
||||||
|
<a href="#" class="save-button">Save</a>
|
||||||
|
<a href="#" target="_blank" class="preview-button">Preview</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</%block>
|
||||||
41
cms/templates/static-pages.html
Normal file
41
cms/templates/static-pages.html
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<%inherit file="base.html" />
|
||||||
|
<%! from django.core.urlresolvers import reverse %>
|
||||||
|
<%block name="title">Static Pages</%block>
|
||||||
|
<%block name="bodyclass">static-pages</%block>
|
||||||
|
|
||||||
|
<%block name="content">
|
||||||
|
<div class="main-wrapper">
|
||||||
|
<div class="inner-wrapper">
|
||||||
|
<h1>Static Pages</h1>
|
||||||
|
<div class="page-actions">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<article class="static-page-overview">
|
||||||
|
<a href="#" class="new-static-page-button wip-box"><span class="plus-icon"></span> New Static Page</a>
|
||||||
|
<ul class="static-page-list">
|
||||||
|
<li class="static-page-item">
|
||||||
|
<a href="#" class="page-name">Course Info</a>
|
||||||
|
<div class="item-actions">
|
||||||
|
<a href="#" class="edit-button wip"><span class="delete-icon"></span></a>
|
||||||
|
<a href="#" class="drag-handle wip"></a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="static-page-item">
|
||||||
|
<a href="#" class="page-name">Textbook</a>
|
||||||
|
<div class="item-actions">
|
||||||
|
<a href="#" class="edit-button wip"><span class="delete-icon"></span></a>
|
||||||
|
<a href="#" class="drag-handle wip"></a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="static-page-item">
|
||||||
|
<a href="#" class="page-name">Syllabus</a>
|
||||||
|
<div class="item-actions">
|
||||||
|
<a href="#" class="edit-button wip"><span class="delete-icon"></span></a>
|
||||||
|
<a href="#" class="drag-handle wip"></a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</%block>
|
||||||
@@ -7,8 +7,9 @@
|
|||||||
<a href="#" class="class-name wip-box">6.002x Circuits and Electronics <span class="drop-icon">▾</span></a>
|
<a href="#" class="class-name wip-box">6.002x Circuits and Electronics <span class="drop-icon">▾</span></a>
|
||||||
<ul class="class-nav">
|
<ul class="class-nav">
|
||||||
<li><a href="overview-full.html" class="active">Courseware</a></li>
|
<li><a href="overview-full.html" class="active">Courseware</a></li>
|
||||||
<li><a href="updates.html" class="wip-box">Course Info</a></li>
|
<li><a href="#" class="wip-box">Pages</a></li>
|
||||||
<li><a href="textbook.html" class="wip-box">Textbook</a></li>
|
<li><a href="#" class="wip-box">Assets</a></li>
|
||||||
|
<li><a href="#" class="wip-box">Users</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
@@ -18,7 +19,6 @@
|
|||||||
% else:
|
% else:
|
||||||
<a href="${reverse('login')}">Log in</a>
|
<a href="${reverse('login')}">Log in</a>
|
||||||
% endif
|
% endif
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ urlpatterns = ('',
|
|||||||
url(r'^(?P<org>[^/]+)/(?P<course>[^/]+)/course/(?P<name>[^/]+)/remove_user$',
|
url(r'^(?P<org>[^/]+)/(?P<course>[^/]+)/course/(?P<name>[^/]+)/remove_user$',
|
||||||
'contentstore.views.remove_user', name='remove_user'),
|
'contentstore.views.remove_user', name='remove_user'),
|
||||||
url(r'^assets/(?P<location>.*?)$', 'contentstore.views.asset_index', name='asset_index'),
|
url(r'^assets/(?P<location>.*?)$', 'contentstore.views.asset_index', name='asset_index'),
|
||||||
|
url(r'^pages/(?P<org>[^/]+)/(?P<course>[^/]+)/course/(?P<coursename>[^/]+)$', 'contentstore.views.static_pages', name='static_pages'),
|
||||||
|
url(r'^edit_static/(?P<org>[^/]+)/(?P<course>[^/]+)/course/(?P<coursename>[^/]+)$', 'contentstore.views.edit_static', name='edit_static'),
|
||||||
|
|
||||||
# temporary landing page for a course
|
# temporary landing page for a course
|
||||||
url(r'^landing/(?P<org>[^/]+)/(?P<course>[^/]+)/course/(?P<coursename>[^/]+)$', 'contentstore.views.landing', name='landing')
|
url(r'^landing/(?P<org>[^/]+)/(?P<course>[^/]+)/course/(?P<coursename>[^/]+)$', 'contentstore.views.landing', name='landing')
|
||||||
|
|||||||
Reference in New Issue
Block a user