diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-07-02 14:13:48 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-07-02 14:13:48 -0500 |
commit | b28e91ce181bf0558bc0ef25df0de8d7d3ecd5ea (patch) | |
tree | a8212caaf39cc0930456bee78285a9ba85b41148 | |
parent | 0e3400357d55caf9099f4288ce8aef90eff7867c (diff) | |
parent | bf332e827ef4df843aa8c936fabdff430130919c (diff) | |
download | mediagoblin-b28e91ce181bf0558bc0ef25df0de8d7d3ecd5ea.tar.lz mediagoblin-b28e91ce181bf0558bc0ef25df0de8d7d3ecd5ea.tar.xz mediagoblin-b28e91ce181bf0558bc0ef25df0de8d7d3ecd5ea.zip |
Merge remote branch 'remotes/schendje/master'
-rw-r--r-- | mediagoblin/static/css/base.css | 31 | ||||
-rw-r--r-- | mediagoblin/static/images/iconDelete.png | bin | 0 -> 472 bytes | |||
-rw-r--r-- | mediagoblin/static/images/iconEdit.png | bin | 0 -> 297 bytes | |||
-rw-r--r-- | mediagoblin/static/images/iconFeed.png | bin | 0 -> 522 bytes | |||
-rw-r--r-- | mediagoblin/templates/mediagoblin/user_pages/media.html | 77 | ||||
-rw-r--r-- | mediagoblin/templates/mediagoblin/utils/pagination.html | 9 |
6 files changed, 64 insertions, 53 deletions
diff --git a/mediagoblin/static/css/base.css b/mediagoblin/static/css/base.css index 31573820..3b2a9a50 100644 --- a/mediagoblin/static/css/base.css +++ b/mediagoblin/static/css/base.css @@ -133,15 +133,6 @@ a.mediagoblin_logo:hover { /* common website elements */ -.dotted_line { - width:100%; - height:0px; - border-bottom: dotted 1px #5f5f5f; - position:absolute; - left:0px; - margin-top:-20px; -} - .button { font-family:'Carter One', arial, serif; height:32px; @@ -164,6 +155,10 @@ a.mediagoblin_logo:hover { padding-right:11px; } +.pagination{ +text-align:center; +} + /* forms */ .form_box { @@ -223,6 +218,17 @@ a.mediagoblin_logo:hover { width:280px; } +/* comments */ + +.comment_author { + margin-bottom:40px; + padding-top:4px; +} + +.comment_content p { + margin-bottom:4px; +} + /* media galleries */ ul.media_thumbnail { @@ -240,3 +246,10 @@ li.media_thumbnail { zoom:1; . *display:inline; } + +/* icons */ + +img.media_icon{ + margin:0 4px; + vertical-align:sub; +} diff --git a/mediagoblin/static/images/iconDelete.png b/mediagoblin/static/images/iconDelete.png Binary files differnew file mode 100644 index 00000000..9d76a5db --- /dev/null +++ b/mediagoblin/static/images/iconDelete.png diff --git a/mediagoblin/static/images/iconEdit.png b/mediagoblin/static/images/iconEdit.png Binary files differnew file mode 100644 index 00000000..480c73ad --- /dev/null +++ b/mediagoblin/static/images/iconEdit.png diff --git a/mediagoblin/static/images/iconFeed.png b/mediagoblin/static/images/iconFeed.png Binary files differnew file mode 100644 index 00000000..11e5b1e7 --- /dev/null +++ b/mediagoblin/static/images/iconFeed.png diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index 3cebe2f9..8ed25f9d 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -23,79 +23,76 @@ {# temporarily, an "image gallery" that isn't one really ;) #} {% if media %} <div class="grid_8 alpha media_image"> - <h1> - {{media.title}} - </h1> - <img class="media_image" src="{{ request.app.public_store.file_url( + <img src="{{ request.app.public_store.file_url( media.media_files.main) }}" /> + <h2> + {{media.title}} + </h2> + {% autoescape False %} + <p>{{ media.description_html }}</p> + {% endautoescape %} <p> - Uploaded on + — uploaded on {{ "%4d-%02d-%02d"|format(media.created.year, media.created.month, media.created.day) }} by <a href="{{ request.urlgen('mediagoblin.user_pages.user_home', user= media.uploader().username) }}"> {{- media.uploader().username }}</a> - </p> - - {% autoescape False %} - <p>{{ media.description_html }}</p> - {% endautoescape %} - - {% if media['uploader'] == request.user['_id'] %} - <p><a href="{{ request.urlgen('mediagoblin.edit.edit_media', - user= media.uploader().username, - media= media._id) }}">Edit</a></p> - {% endif %} + </p> + <br /><br /> + <h3>Comments</h3> {% if request.user %} <form action="{{ request.urlgen('mediagoblin.user_pages.media_post_comment', user= media.uploader().username, media=media._id) }}" method="POST"> - <h3>Post a comment!</h3> {{ wtforms_util.render_field_div(comment_form.comment) }} <div class="form_submit_buttons"> - <input type="submit" value="Submit" class="button" /> + <input type="submit" value="Post comment!" class="button" /> </div> </form> {% endif %} - {# {{ wtforms_util.render_textarea_div(submit_form.description) }} {{ wtforms_util.render_field_div(submit_form.file) }} #} - {% if comments %} - <h3>Comments</h3> {% for comment in comments %} <div class="comment_wrapper" id="comment-{{ comment['_id'] }}"> - <div class="comment_author">By: - <a href="{{ request.urlgen('mediagoblin.user_pages.user_home', - user = comment['author']['username']) }}"> - {{ comment['author']['username'] }} - </a> - </div> - <div class="comment_datetime"> - <a href="#comment-{{ comment['_id'] }}"> - {{ "%4d-%02d-%02d %02d:%02d"|format(comment.created.year, - comment.created.month, - comment.created.day, - comment.created.hour, - comment.created.minute) }} - </a> - </div> <div class="comment_content"> {% autoescape False %} {{ comment.content_html }} {% endautoescape %} - </div> - </div> + </div> + <div class="comment_author">— + <a href="{{ request.urlgen('mediagoblin.user_pages.user_home', + user = comment['author']['username']) }}"> + {{ comment['author']['username'] }}</a> at + <!--</div> + <div class="comment_datetime">--> + <a href="#comment-{{ comment['_id'] }}"> + {{ "%4d-%02d-%02d %02d:%02d"|format(comment.created.year, + comment.created.month, + comment.created.day, + comment.created.hour, + comment.created.minute) }} + </a> + </div> + </div> {% endfor %} {% include "mediagoblin/utils/pagination.html" %} </div> {% endif %} - <div class="grid_4 omega media_sidebar"> - <p>This is a sidebar! Yay!</p> + <h3>Sidebar content here!</h3> + <p> + {% if media['uploader'] == request.user['_id'] %} + <p><a href="{{ request.urlgen('mediagoblin.edit.edit_media', + user= media.uploader().username, + media= media._id) }}"><img src="{{ request.staticdirect('/images/iconEdit.png') }}" class="media_icon" />edit</a></p> + <p><img src="{{ request.staticdirect('/images/iconDelete.png') }}" class="media_icon" />delete</p> + {% endif %} + </p> </div> {% else %} <p>Sorry, no such media found.<p/> diff --git a/mediagoblin/templates/mediagoblin/utils/pagination.html b/mediagoblin/templates/mediagoblin/utils/pagination.html index 2be0b92e..2423d08d 100644 --- a/mediagoblin/templates/mediagoblin/utils/pagination.html +++ b/mediagoblin/templates/mediagoblin/utils/pagination.html @@ -19,17 +19,17 @@ {% if pagination %} <div class="pagination"> - + <p> {% if pagination.has_prev %} - <a href="{{ pagination.get_page_url(request, pagination.page-1) }}">« Prev</> + <a href="{{ pagination.get_page_url(request, pagination.page-1) }}">« Prev</a> {% endif %} {%- for page in pagination.iter_pages() %} {% if page %} {% if page != pagination.page %} - <a href="{{ pagination.get_page_url(request, page) }}">{{ page }}</a> + <a href="{{ pagination.get_page_url(request, page) }}">{{ page }}</a> {% else %} - <strong>{{ page }}</strong> + {{ page }} {% endif %} {% else %} <span class="ellipsis">…</span> @@ -39,6 +39,7 @@ {% if pagination.has_next %} <a href="{{ pagination.get_page_url(request, pagination.page + 1) }}">Next »</a> {% endif %} + </p> </div> {% endif %} |