From eb2fadb639478ce6c349075a884cf29fc569ec07 Mon Sep 17 00:00:00 2001 From: Tom Giannattasio Date: Tue, 9 Oct 2012 14:45:56 -0400 Subject: [PATCH 1/3] added static page templates; urls will probably need some reworking, but i wanted to get the templates in there --- cms/djangoapps/contentstore/views.py | 6 ++++++ cms/urls.py | 2 ++ 2 files changed, 8 insertions(+) diff --git a/cms/djangoapps/contentstore/views.py b/cms/djangoapps/contentstore/views.py index c1c3fc92d0..58f0eec5ad 100644 --- a/cms/djangoapps/contentstore/views.py +++ b/cms/djangoapps/contentstore/views.py @@ -675,3 +675,9 @@ def asset_index(request, location): # points to the temporary course landing page with log in and sign up def landing(request, org, course, coursename): 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', {}) \ No newline at end of file diff --git a/cms/urls.py b/cms/urls.py index 44f42343f3..324b3d554d 100644 --- a/cms/urls.py +++ b/cms/urls.py @@ -29,6 +29,8 @@ urlpatterns = ('', url(r'^(?P[^/]+)/(?P[^/]+)/course/(?P[^/]+)/remove_user$', 'contentstore.views.remove_user', name='remove_user'), url(r'^assets/(?P.*?)$', 'contentstore.views.asset_index', name='asset_index'), + url(r'^pages/(?P[^/]+)/(?P[^/]+)/course/(?P[^/]+)$', 'contentstore.views.static_pages', name='static_pages'), + url(r'^edit_static/(?P[^/]+)/(?P[^/]+)/course/(?P[^/]+)$', 'contentstore.views.edit_static', name='edit_static'), # temporary landing page for a course url(r'^landing/(?P[^/]+)/(?P[^/]+)/course/(?P[^/]+)$', 'contentstore.views.landing', name='landing') From 4c50f13e9944abe5c249d0f896702f2d486be408 Mon Sep 17 00:00:00 2001 From: Tom Giannattasio Date: Tue, 9 Oct 2012 14:47:15 -0400 Subject: [PATCH 2/3] added templates/styles for static pages --- cms/static/sass/_static-pages.scss | 64 +++++++++++++++++++++++++++++ cms/static/sass/base-style.scss | 1 + cms/templates/edit-static-page.html | 41 ++++++++++++++++++ cms/templates/static-pages.html | 41 ++++++++++++++++++ 4 files changed, 147 insertions(+) create mode 100644 cms/static/sass/_static-pages.scss create mode 100644 cms/templates/edit-static-page.html create mode 100644 cms/templates/static-pages.html diff --git a/cms/static/sass/_static-pages.scss b/cms/static/sass/_static-pages.scss new file mode 100644 index 0000000000..628d537f90 --- /dev/null +++ b/cms/static/sass/_static-pages.scss @@ -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; + } +} \ No newline at end of file diff --git a/cms/static/sass/base-style.scss b/cms/static/sass/base-style.scss index 8743790bba..628332d9ee 100644 --- a/cms/static/sass/base-style.scss +++ b/cms/static/sass/base-style.scss @@ -14,6 +14,7 @@ @import "subsection"; @import "unit"; @import "assets"; +@import "static-pages"; @import "course-info"; @import "landing"; @import "graphics"; diff --git a/cms/templates/edit-static-page.html b/cms/templates/edit-static-page.html new file mode 100644 index 0000000000..f86d00989e --- /dev/null +++ b/cms/templates/edit-static-page.html @@ -0,0 +1,41 @@ +<%inherit file="base.html" /> +<%! from django.core.urlresolvers import reverse %> +<%block name="title">Edit Static Page +<%block name="bodyclass">edit-static-page + +<%block name="content"> +
+
+
+
+
+ + +
+
+ + +
+
+
+ +
+
+ \ No newline at end of file diff --git a/cms/templates/static-pages.html b/cms/templates/static-pages.html new file mode 100644 index 0000000000..67945f0832 --- /dev/null +++ b/cms/templates/static-pages.html @@ -0,0 +1,41 @@ +<%inherit file="base.html" /> +<%! from django.core.urlresolvers import reverse %> +<%block name="title">Static Pages +<%block name="bodyclass">static-pages + +<%block name="content"> +
+
+

Static Pages

+
+ +
+ +
+
+ \ No newline at end of file From d65e1876a0f6cb8b9ae44a333452f23d48309f0b Mon Sep 17 00:00:00 2001 From: Tom Giannattasio Date: Tue, 9 Oct 2012 14:48:02 -0400 Subject: [PATCH 3/3] tweaked items in the header; tried creating class drop, but can't get the server-side jazz figured out --- cms/templates/widgets/header.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cms/templates/widgets/header.html b/cms/templates/widgets/header.html index 21e0b002cb..0805354b85 100644 --- a/cms/templates/widgets/header.html +++ b/cms/templates/widgets/header.html @@ -3,12 +3,13 @@