You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2016/07/13 19:30:01 UTC

[04/18] allura git commit: [#8088] Visual changes to discussion tool. added a header toolbar design

[#8088] Visual changes to discussion tool. added a header toolbar design


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/7c2b05a9
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/7c2b05a9
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/7c2b05a9

Branch: refs/heads/master
Commit: 7c2b05a9446a8f7ab1386545567ecd4ad460e79a
Parents: ac793fe
Author: Rohan Verma <ro...@gmail.com>
Authored: Sat Jun 4 06:59:47 2016 +0530
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Wed Jul 13 15:03:28 2016 -0400

----------------------------------------------------------------------
 Allura/allura/nf/allura/css/site_style.css      | 75 +++++++++++++++-----
 .../allura/templates/widgets/moderate_post.html | 10 ++-
 .../allura/templates/widgets/post_widget.html   | 53 ++++++--------
 3 files changed, 85 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/7c2b05a9/Allura/allura/nf/allura/css/site_style.css
----------------------------------------------------------------------
diff --git a/Allura/allura/nf/allura/css/site_style.css b/Allura/allura/nf/allura/css/site_style.css
index 8cb3805..3af702b 100644
--- a/Allura/allura/nf/allura/css/site_style.css
+++ b/Allura/allura/nf/allura/css/site_style.css
@@ -2401,13 +2401,6 @@ div.attachment_thumb .file_type span {
 
 /* Discussion */
 #comment .row {
-  border: 3px solid #d7d7d7;
-  -moz-border-radius: 5px;
-  -webkit-border-radius: 5px;
-  -o-border-radius: 5px;
-  -ms-border-radius: 5px;
-  -khtml-border-radius: 5px;
-  border-radius: 5px;
   position: relative;
   float: right;
   clear: right;
@@ -2452,7 +2445,10 @@ div.attachment_thumb .file_type span {
 }
 
 #comment .grid-14 { overflow: visible; }
-#comment .display_post { margin-right: 5px; }
+#comment .display_post {
+    margin-right: 5px;
+    padding: 5px;
+}
 
 #comment ul {
   list-style: none;
@@ -2485,19 +2481,10 @@ div.attachment_thumb .file_type span {
 
 #comment ul .row {
   margin: 0;
-  min-height: 140px;
   padding-top: 1em;
 }
 
 #comment ul ul .row {
-  border: 3px solid #ebebeb;
-  border-top: none;
-  border-radius: 0;
-  -moz-border-radius: 0;
-  -webkit-border-radius: 0;
-  border-bottom-left-radius: 0;
-  -webkit-border-bottom-left-radius: 5px;
-  -moz-border-radius-bottomleft: 5px;
   position: relative;
 }
 
@@ -3462,6 +3449,60 @@ fieldset.preferences legend {
   float: left;
 }
 
+.bubble{
+    border-radius: 3px;
+    display: inline-block;
+    vertical-align: top;
+    box-sizing: border-box;
+    border: 1px solid #e5e5e5;
+}
+
+.bubble .header{
+    border-radius-top: 5px;
+    background-color: #e5e5e5;
+    padding: 10px;
+}
+
+.bubble .header .btn{
+    float: none;
+    margin: 0px;
+}
+
+.header form{
+    display:inline;
+}
+
+.header .tools{
+    display: inline;
+    float: right;
+}
+
+.header a .little_link {
+
+}
+
+.bubble::before {
+    width: 0;
+    height: 0;
+    border-style: solid;
+    border-width: 8px 8px 8px 0;
+    border-color: transparent #F7F7F7 transparent transparent;
+    content:'\A';
+    position:absolute;
+    left: 83px;
+    top: 25px;
+    border-right-color: #e5e5e5;
+}
+
+.discussion-post .row .emboss{
+    //un-emboss image for discussions
+
+    box-shadow: rgba(0, 0, 0, 0.0) 0 1px 5px 0;
+    -webkit-box-shadow: rgba(0, 0, 0, 0.0) 0 1px 5px 0;
+
+    border-radius: 10%;
+}
+
 @media print{
   body{ 
   	background-color: #FFFFFF; 

http://git-wip-us.apache.org/repos/asf/allura/blob/7c2b05a9/Allura/allura/templates/widgets/moderate_post.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/widgets/moderate_post.html b/Allura/allura/templates/widgets/moderate_post.html
index d111e23..4c3f277 100644
--- a/Allura/allura/templates/widgets/moderate_post.html
+++ b/Allura/allura/templates/widgets/moderate_post.html
@@ -19,21 +19,19 @@
 {% import 'allura:templates/jinja_master/lib.html' as lib with context %}
 <form method="POST" action="{{action}}">
     <input type="hidden" name="delete" value="True"/>
-    <a href="" class="moderate_post little_link"><span>Delete</span></a>
+    <a href="" class="moderate_post little_link icon btn ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"><span><i class="fa fa-trash-o fa-lg"></i></span></a>
     {{lib.csrf_token()}}
 </form>
-<br/>
 {%if status == 'pending'%}
     <form method="POST" class="moderate_approve" action="{{action}}">
         <input type="hidden" name="approve" value="True"/>
-        <a href="" class="moderate_post little_link"><span>Approve</span></a>
+        <a href="" class="moderate_post little_link icon btn ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"><span><i class="fa fa-check" aria-hidden="true"></i>
+ Approve</span></a>
         {{lib.csrf_token()}}
     </form>
-    <br/>
 {%endif%}
     <form method="POST" class="moderate_spam" action="{{action}}">
         <input type="hidden" name="spam" value="True"/>
-        <a href="" class="moderate_post little_link"><span>Spam</span></a>
+        <a href="" class="moderate_post little_link icon btn ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"><span><i class="fa fa-exclamation" aria-hidden="true"></i> Spam</span></a>
         {{lib.csrf_token()}}
-    </form>
 <br/>

http://git-wip-us.apache.org/repos/asf/allura/blob/7c2b05a9/Allura/allura/templates/widgets/post_widget.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/widgets/post_widget.html b/Allura/allura/templates/widgets/post_widget.html
index 8c614d4..a5fd418 100644
--- a/Allura/allura/templates/widgets/post_widget.html
+++ b/Allura/allura/templates/widgets/post_widget.html
@@ -47,24 +47,38 @@
       <div class="grid-2 tcenter gravatar">
        <p class="gravatar">
         {% set size = value.parent and 32 or 48 %}
-        {{lib.gravatar(value.author(), size=size)}}<br>
-        <small>
-            {{lib.user_link(value.author())}}
-        </small>
-        <br>
-        <small>{{lib.abbr_date(value.timestamp)}}</small>
+        {{lib.gravatar(value.author(), size=size)}}
        </p>
       </div>
       {% set pending = value.status == 'pending' %}
       {% set moderator = h.has_access(value, 'moderator')() %}
-      <div class="grid-14 post-content" style="width: {{indent == 0 and 525 or (indent <= 40 and 515-indent*10 or 65)}}px">
-        <div class="display_post{% if pending and moderator %} moderate{% endif %}">
+      <div class="grid-16 post-content bubble" style="width: {{indent == 0 and 652 or (indent <= 40 and 642-indent*10 or 65)}}px">
+          <div class="header">
+            {{lib.user_link(value.author())}} - <i style="color: #777">{{lib.abbr_date(value.timestamp)}}</i>
+
+            <div class="tools">
+            <a class="icon reply_post btn" href="#" style="" title="Reply" role="button"><span class="ui-button-text"><i class="fa fa-reply"></i></span></a>
+
+            <a href="{{shortlink_url}}" class="icon btn ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"{%if value.status == 'pending'%} style="display:none"{%endif%}>
+              <span><i class="fa fa-link" aria-hidden="true"></i></span></a>
+
+            {% if h.has_access(value, 'moderate')()%}
+                <a href="#" class="icon btn ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only edit_post little_link"><span><i class="fa fa-pencil" aria-hidden="true"></i></span></a>
+            {% endif %}
+
+                {% if h.has_access(value.thread, 'moderate')() %}
+                    {{widgets.moderate_post.display(value=value, action=value.url()+'moderate', status = value.status)}}
+                {%endif%}
+            </div>
+          </div>
+          <div class="display_post{% if pending and moderator %} moderate{% endif %}">
           {% if pending and not moderator %}
             <b>Post awaiting moderation.</b>
           {% else %}
             {% if show_subject %}
                 <b>{{value.subject or '(no subject)'}}<br/></b>
             {% endif %}
+
             {{g.markdown.cached_convert(value, 'text')|safe}}&nbsp;
             {{lib.related_artifacts(value)}}
             {% if value.edit_count %}
@@ -111,28 +125,7 @@
         </div>
         {% endif %}
         </div>
-        <div class="options grid-3">
-        {% if h.has_access(value.thread, 'post')() %}
-          {{ g.icons['reply'].render(
-              show_title=True,
-              extra_css='reply_post btn',
-              style='display:none;' if value.status == 'pending' else '') }}
-        {% endif %}
-        <div style="clear:both">
-            <div class="little_link">
-                <a href="{{shortlink_url}}" class="little_link shortlink"{%if value.status == 'pending'%} style="display:none"{%endif%}><span>Link</span></a><br/>
-                {% if h.has_access(value, 'moderate')()%}
-                    <a href="#" class="edit_post little_link"><span>Edit</span></a><br/>
-                {% endif %}
-            </div>
-            {% if h.has_access(value.thread, 'moderate')() %}
-            {{widgets.moderate_post.display(value=value, action=value.url()+'moderate', status = value.status)}}
-            {%endif%}
-          {% if h.has_access(value.thread, 'post')() %}
-            <a href="#" class="add_attachment little_link"><span>Attach</span></a>
-          {% endif %}
-        </div>
-      </div>
+
       <div class="shortlink_popup modal" style="display: none">
         {{ g.icons['close'].render(extra_css='close') }}
         If you would like to refer to this comment somewhere else in this project, copy and paste the following link: