Reorder media.html (comments, icons, links, layout)
authorJef van Schendel <jefvanschendel@gmail.com>
Fri, 1 Jul 2011 16:59:07 +0000 (18:59 +0200)
committerJef van Schendel <jefvanschendel@gmail.com>
Fri, 1 Jul 2011 16:59:07 +0000 (18:59 +0200)
mediagoblin/static/css/base.css
mediagoblin/templates/mediagoblin/user_pages/media.html

index 924d68b2b9d220423451472db81f9a1037486f4b..2dd276b06db84814462b9acf90baf7389e7e3d08 100644 (file)
@@ -254,26 +254,7 @@ li.media_thumbnail {
 
 /* icons */
 
-.iconFeed{
-  width:16px;
-  height:16px;
-  background-image:url('../images/iconFeed.png');
-  float:left;
-  margin-right:5px;
-}
-
-.iconEdit{
-  width:16px;
-  height:16px;
-  background-image:url('../images/iconEdit.png');
-  float:left;
-  margin-right:5px;
-}
-
-.iconDelete{
-  width:16px;
-  height:16px;
-  background-image:url('../images/iconDelete.png');
-  float:left;
-  margin-right:5px;
+img.media_icon{
+  margin:0 4px;
+  vertical-align:sub;
 }
index 175e5c60e41a147e7d3970a3f66ed22af24a9cd9..8ed25f9d838e56148a187cddcbe1e06ae7bfa814 100644 (file)
   {# temporarily, an "image gallery" that isn't one really ;) #}
   {% if media %}
     <div class="grid_8 alpha media_image">
-      <h1>
-        {{media.title}}
-      </h1>
       <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
+        &mdash;&nbsp;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 %}
@@ -63,7 +57,6 @@
       {{ 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_content">
       </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/>