Werdna has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/78478


Change subject: UI work: try to make Flow look vaguely like Brandon's prototype.
......................................................................

UI work: try to make Flow look vaguely like Brandon's prototype.

Change-Id: I4bbc64a9fb12a142a882691ac9a59674e0be9ae0
---
M Flow.i18n.php
M Flow.php
M includes/Block/Summary.php
M includes/Block/TopicList.php
A modules/discussion/base.css
A modules/discussion/images/crinkle_right.png
A modules/discussion/images/icon_discussion_blue.png
A modules/discussion/images/icon_discussion_grey.png
A modules/discussion/images/icon_heart_blue.png
A modules/discussion/images/icon_heart_grey.png
A modules/discussion/images/icon_mail_blue.png
A modules/discussion/images/icon_mail_grey.png
A modules/discussion/images/icon_pencil_blue.png
A modules/discussion/images/icon_pencil_grey.png
A modules/discussion/images/icon_user_blue.png
A modules/discussion/images/icon_user_grey.png
A modules/discussion/images/mini_chevron_right_444444.png
A modules/discussion/images/star_empty.png
A modules/discussion/images/star_empty_blue.png
A modules/discussion/images/star_full.png
A modules/discussion/images/star_full_blue.png
A modules/discussion/images/tag.png
A modules/discussion/images/topic_control_read_down.png
A modules/discussion/images/topic_control_read_right.png
A modules/discussion/images/topic_control_unread_down.png
A modules/discussion/images/topic_control_unread_right.png
M special/SpecialFlow.php
A templates/edit-summary.html.php
M templates/summary.html.php
M templates/topic.html.php
M templates/topiclist.html.php
31 files changed, 1,067 insertions(+), 61 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/78/78478/1

diff --git a/Flow.i18n.php b/Flow.i18n.php
index 17cbfda..01aa79b 100644
--- a/Flow.i18n.php
+++ b/Flow.i18n.php
@@ -9,6 +9,18 @@
  */
 $messages['en'] = array(
        'flow-desc' => 'Workflow Management system',
+       'flow-specialpage' => '$1 – Flow',
+       'flow-edit-summary-link' => 'Edit Summary',
+       'flow-newtopic-title-placeholder' => 'Message Subject',
+       'flow-newtopic-content-placeholder' => 'Message Text. Be nice!',
+       'flow-newtopic-header' => 'Add a new topic',
+       'flow-newtopic-save' => 'Add Topic',
+       'flow-newtopic-caution' => "By clicking the \"Add Message\" button, you 
agree to the Terms of Use,
+and you irrevocably agree to release your contribution under the CC-BY-SA 3.0 
License and the GFDL.
+You agree that a hyperlink or URL is sufficient attribution under the Creative 
Commons license.",
+       'flow-post-deleted' => '[post deleted]',
+       'flow-post-actions' => 'actions',
+       'flow-topic-actions' => 'actions',
 );
 
 /** Message documentation (Message documentation)
diff --git a/Flow.php b/Flow.php
index 6df3ccb..a8c834b 100755
--- a/Flow.php
+++ b/Flow.php
@@ -139,6 +139,9 @@
                'messages' => array(
                ),
        ),
+       'ext.flow.discussion' => $flowResourceTemplate + array(
+               'styles' => 'discussion/base.css',
+       ),
 );
 
 // Configuration
diff --git a/includes/Block/Summary.php b/includes/Block/Summary.php
index 9080b6e..8875916 100644
--- a/includes/Block/Summary.php
+++ b/includes/Block/Summary.php
@@ -79,7 +79,8 @@
        }
 
        public function render( Templating $templating, array $options ) {
-               $templating->render( "flow:summary.html.php", array(
+               $templateName = ($this->action == 'edit-summary') ? 
'edit-summary' : 'summary';
+               $templating->render( "flow:$templateName.html.php", array(
                        'block' => $this,
                        'workflow' => $this->workflow,
                        'summary' => $this->summary,
diff --git a/includes/Block/TopicList.php b/includes/Block/TopicList.php
index db548de..706ed28 100644
--- a/includes/Block/TopicList.php
+++ b/includes/Block/TopicList.php
@@ -58,6 +58,7 @@
        }
 
        public function render( Templating $templating, array $options ) {
+               $templating->getOutput()->addModules( array( 
'ext.flow.discussion' ) );
                $templating->render( "flow:topiclist.html.php", array(
                        'topicList' => $this,
                        'topics' => $this->getTopics(),
diff --git a/modules/discussion/base.css b/modules/discussion/base.css
new file mode 100644
index 0000000..54db694
--- /dev/null
+++ b/modules/discussion/base.css
@@ -0,0 +1,869 @@
+#filters {
+       margin-bottom: 5px;
+       border-bottom: 1px solid #cccccc;
+
+}
+.filtertab {
+       display: inline-block;
+       border-bottom: 3px solid #cccccc;
+       margin-left: -3px;
+       margin-right: 0;
+       margin-bottom: -1px;
+       padding: 5px;
+       padding-left: 10px;
+       padding-right: 10px;
+       color: #cccccc;
+       cursor: pointer;
+}
+.filtertab.active {
+       border-bottom: 3px solid #1b61dd;
+       color: #000000;
+}
+
+
+#boardmessagesystem.stuck, #singletopiccontrols.stuck {
+       position:fixed;
+       top: 0px;
+       background-color: #ffffff;
+       padding-bottom: 10px;
+       border-bottom: none;
+       z-index: 90000;
+       -webkit-box-shadow: 0 5px 5px -6px #000000;
+       -moz-box-shadow: 0 5px 5px -6px #000000;
+    box-shadow: 0 5px 5px -6px #000000;        
+       width: 700px;
+}
+#singletopiccontrols, #boardmessagesystem {
+       padding-top: 10px;
+}
+#boardmessagesystem, #singletopiccontrols {
+       background-color: #ffffff;
+       padding-bottom: 10px;
+       border-bottom: 1px solid #cccccc;
+       z-index: 90000;
+       width: 700px;
+}
+
+h3 {
+       padding: 0px;
+       margin-top: 0px;
+}
+.flowcontrols {
+       position: relative;
+       top: 0px;
+       left: 0px;
+       width: 700px;
+       max-width: 700px;
+       margin-bottom: 10px;
+       margin-left: 20px;
+       z-index: 90000;
+       display:block;
+       padding-top: 10px;
+}
+#workingimage, #noresults {
+       position: relative;
+       width: 700px;
+       max-width: 700px;
+       margin-left: 20px;
+       text-align: center;
+       font-size: 15pt;
+       display: none;
+}
+
+input.flowsearch {
+       width: 480px;
+       height: 33px;
+       margin-top: 0px;
+       /* @embed */
+       background: transparent url('images/search_icon_999999.png') right 
center no-repeat;
+       margin-bottom: 0px;
+}
+.flowsearchbutton {
+       margin-top: 0px !important;
+}
+.flowsecondary {
+       position: absolute;
+       right: 0px;
+}
+.aboutme {
+       width: 540px;
+       padding-right: 10px;
+}
+.flow-container {
+       position: relative;
+       width: 700px;
+       max-width: 700px;
+       margin-left: 20px;
+}
+.flow-topic-full {
+       padding-bottom: 0px;
+       margin-bottom: 10px;
+}
+hr.flow-topic-separator {
+       width: 670px;
+       height: 1px;
+       border: 0;
+       margin-left: 30px;
+       color: #cccccc;
+       background-color: #cccccc;
+       margin-bottom: 10px;
+       margin-top: 10px;
+}
+hr.flow-topic-separator2 {
+    border: 0;
+    height: 1px;
+    background-image: -webkit-linear-gradient(left, rgba(0,0,0,0), 
rgba(0,0,0,0.75), rgba(0,0,0,0)); 
+    background-image:    -moz-linear-gradient(left, rgba(0,0,0,0), 
rgba(0,0,0,0.75), rgba(0,0,0,0)); 
+    background-image:     -ms-linear-gradient(left, rgba(0,0,0,0), 
rgba(0,0,0,0.75), rgba(0,0,0,0)); 
+    background-image:      -o-linear-gradient(left, rgba(0,0,0,0), 
rgba(0,0,0,0.75), rgba(0,0,0,0)); 
+}
+
+.opener {
+       position: relative;
+       left: 0;
+       top: 0;
+       width: 20px;
+       height: 20px;
+       cursor: pointer;
+       /* @embed */
+       background-image: url(images/topic_control_read_down.png);
+}
+
+.mentiondicator {
+       position: relative;
+       float: left;
+       top: 9;
+       left: 11;
+       width: 13px;
+       height: 13px;
+       margin:0;
+       clear: both;
+       /* @embed */
+       background-image: url('images/mention_icon_small_green.png');
+       background-repeat: no-repeat;
+       background-position: center bottom;
+}
+.closedtopic.hasmention .flow-topic-datestamp {
+       margin-left: -13px;
+}
+
+.postmention {
+       position: relative;
+       float: left;
+       top: 10;
+       left: -25;
+       width: 20px;
+       height: 20px;
+       margin:0;
+       clear: both;
+       /* @embed */
+       background-image: url('images/mention_icon_green.png');
+       background-repeat: no-repeat;
+       background-position: center bottom;
+}
+
+.flow-post-container.hasmention .authorname {
+       margin-left: -10px;
+}
+
+.opentopic .mentiondicator {
+       display: none;
+}
+
+div.closedtopic div.opener {
+       /* @embed */
+       background-image: url(images/topic_control_read_right.png);     
+}
+
+.containsunread .opener {
+       /* @embed */
+       background-image: url(images/topic_control_unread_down.png);    
+}
+.containsunread.closedtopic .opener {
+       /* @embed */
+       background-image: url(images/topic_control_unread_right.png);   
+}
+
+
+.flow-topic-controls {
+       position: absolute;
+       width: 20px;
+       height: 20px;
+       right: 0px;
+       top: 0px;
+       clear: none;
+}
+
+.topicicon {
+       width: 20px;
+       height: 20px;
+       /* @embed */
+       background-image: url(images/tag.png);
+       float: left;
+}
+.subscribeicon {
+       /* @embed */
+       background-image: url(images/star_empty.png);
+}
+.subscribedicon {
+       /* @embed */
+       background-image: url(images/star_full.png);
+}
+.subscribeicon:hover {
+       /* @embed */
+       background-image: url(images/star_empty_blue.png);
+}
+.subscribedicon:hover {
+       /* @embed */
+       background-image: url(images/star_full_blue.png);
+}      
+.flow-topic-container {
+       position: relative;
+       left: 30;
+       margin-top: -20;
+       width:670px;
+       max-width: 670px;
+}
+
+.flow-metabar {
+       margin-bottom: 5px;
+       margin-top: 5px;
+}
+
+/** SUMMARY STUFF */
+.topicsummary {
+       border: 1px solid #444444;
+       background-color: #d0d0d0;
+       margin-bottom: 5px;
+}
+.summarymeta {
+       background-color: #444444;
+       padding: 5px;
+       padding-left: 10px;
+       padding-right: 10px;
+       font-size: 10pt !important;
+}
+.summarydate {
+       color: #ffffff !important;
+}
+.summaryauthor {
+       color: #ffffff !important;
+       font-size: 10pt;
+       text-decoration: none;
+}
+.summarytext {
+       padding: 5px;
+       padding-left: 10px;
+       padding-right: 10px;
+       font-style: italic;
+}
+
+.unread {
+       background-color: #00ae8b;
+}
+
+.lockedtopic .replybox {
+       display: none;
+}
+.lockedtopic .editpostlink, .lockedtopic .deletepostlink {
+       display: none;
+}
+
+.collapsedposts {
+       height: 30px;
+       min-height: 20px;
+       cursor: pointer;
+       margin-bottom: 5px;
+       margin-left: -5px;
+       margin-top: -5px;
+       font-weight: bold;
+       color: #666666;
+}
+.cleft {
+       width:20;
+       height:30;
+       /* @embed */
+       background-image: url(images/mini_chevron_right_444444.png);
+       background-repeat: no-repeat;
+       background-position: center center;
+       float: left;
+       left: 0px;
+}
+.crightold {
+
+       width:10;
+       height:30;
+       /* @embed */
+       background-image: url(images/crinkle_right.png);
+       float: right;
+       margin-right: 0px;
+}
+.collapsetext {
+       font-size: 14px;
+       float:left;
+       padding-top: 6px;
+}
+.ccount {
+       position: relative;
+       left: 0px;
+       padding-right: 10px;
+       color: #444444;
+}
+.taglist: {
+       position: relative;
+       margin-left: 400px;
+       color: #444444;
+}
+.flow-topic-datestamp {
+       font-size: 10pt;
+       color: #999999;
+}
+.flow-datestamp {
+       position: absolute;
+       right: 10px;
+       font-size: 10pt;
+       color: #999999;
+}
+.editnotice {
+       font-size: 10pt;
+       color: #999999;
+       float: left;    
+}
+.unreadpost .flow-datestamp, .selfpost .flow-datestamp {
+       color: #ffffff;
+}
+.flow-topic-title {
+       color: #444444;
+       max-width: 600px;
+       overflow: wrap;
+       cursor: pointer;
+}
+.flow-topic-title, .flow-topic-title a, .ownerboard {
+       font-weight: bold;
+       font-size: 13pt;
+}
+
+.lockedtopic .flow-topic-title {
+       /* @embed */
+       background-image: url('images/lock_icon_444444.png');
+       background-repeat: no-repeat;
+       background-position: left center;
+       padding-left: 25px;
+}
+.lockedtopic .flow-topic-title:hover {
+       /* @embed */
+       background-image: url('images/lock_icon_green.png');
+}
+.boardnotice {
+       color: #318c6d;
+       padding-right: 5px;
+}
+
+/* POST STUFF */
+.flow-post-container {
+       border-left: 2px solid #efefef;
+       border-bottom: 2px solid #efefef;
+       padding:0px;
+       margin-bottom: 0px;
+}
+.flow-post-deleted .flow-post-title {
+       color: #cccccc;
+       font-style: oblique;
+}
+.unreadpost {
+       border-left: 2px solid #318c6d;
+       border-bottom: 2px solid #318c6d;
+}
+.selfpost {
+       border-left: 2px solid #0c53d7;
+       border-bottom: 2px solid #0c53d7;
+}
+.flow-post-title {
+       padding-left: 10px;
+       padding-top: 10px;
+       padding-bottom: 10px;
+       background-color: #efefef;
+}
+.unreadpost .flow-post-title {
+       background-color: #318c6d;
+       color: #ffffff;
+}
+.selfpost .flow-post-title {
+       background-color: #0c53d7;
+}
+.unreadpost .flow-post-title a, .selfpost .flow-post-title a {
+       color: #ffffff;
+}
+.flow-post-authorline {
+       height: 20px;
+}
+.authorname {
+       font-size: 13pt;
+       text-decoration: none;
+}
+.lowsig {
+       font-size: 8pt !important;
+       display: none;
+       margin-left: 5px;
+}
+.lowsig a {
+       font-size: 8pt !important;      
+}
+.flow-post-content {
+       padding-top: 10px;
+       padding-left: 10px;
+       padding-right: 10px;
+       padding-bottom: 10px;
+       background-color: #ffffff;
+}
+.flow-post-controls {
+       padding-right: 5px;
+       padding-left: 10px;
+       padding-bottom: 5px;
+       height: 20px;
+       text-align: right;
+       position: relative;
+}
+.postingstatus {
+       display: none;
+       /* @embed */
+       background: transparent url('images/ajax-loader_blue.gif') 10px center 
no-repeat;
+       padding: 10px;
+       padding-left: 36px;
+       background-color: #0c53d7;
+       color: #ffffff;
+}
+
+.editortoolbox {
+       border: 1px solid #d0d0d0;
+       background-color: #ffffff;
+       padding: 5px;
+       float: left;
+       position: relative;
+       z-index: 10000;
+       margin-top: -30px;
+       margin-left: 15px;
+}
+.replyboxextras .editortoolbox {
+       margin-left: 5px;
+}
+
+.editorbutton {
+       cursor: pointer;
+       padding: 5px;
+       margin: 0px;
+       border: 1px solid #ffffff;
+}
+.editorbutton:hover {
+       border: 1px solid #efefef;
+}
+.flow-reply-form {
+       position: relative;
+       border: 2px solid #efefef;
+       border-top: none;
+       background-color: #ffffff;
+       min-height: 2em;
+       max-width: 670px;
+       color: #6D6D6D;
+       z-index: 3000;
+       padding: 0px;
+}
+.replyboxcontrols, .editboxcontrols, .mboxextras {
+       text-align: right;
+}
+.replyboxcontrols button, .editboxcontrols button, .mboxcontrols button {
+       margin-left: 10px;
+}
+.replybox textarea, .editboxmaster textarea {
+       width: 100%;
+       margin: 0;
+       height: 100px;
+       min-height: 100px;      
+       border:none !important;
+}
+.stalewarning {
+       padding: 5px;
+       color: #ffffff;
+       background-color: #cc0000;
+       margin: 5px;
+       display: none;
+}
+.staletopic .stalewarning {
+       display: block;
+}
+
+.mdialog {
+       min-width: 500px;
+       height: auto; 
+       width: auto; 
+       border:2px solid #444444; 
+       padding: 0px;
+       background-color: #ffffff;
+}
+#simplemodal-container a.modalCloseImg {
+       /* @embed */
+       background:url('images/x_icon_444444.png') no-repeat; /* adjust url as 
required */
+       width:12px;
+       height:12px;
+       display:inline;
+       z-index:3200;
+       position:absolute;
+       top: 15px;
+       right: 15px;
+       cursor:pointer;
+}
+.mdialog h3 {
+       padding: 0px;
+       padding-left: 10px;
+       margin: 0px;
+       background-color: #efefef;      
+       border-bottom: 1px solid #d0d0d0;
+}
+.mdialog p { 
+       margin: 10px;
+}
+.mboxextras{ 
+       margin-top: 10px;
+       padding: 10px;
+}
+.mdialog .inputform {
+       max-width: 500px;
+}
+.mdialog input[type="text"] {
+       height: 33px;
+       width: 500px;
+       margin: 10px;
+}
+.mdialog textarea {
+       height: 75px;
+       min-height: 75px;
+       margin: 0;
+       border: 1px solid #cccccc !important;
+       width: 500px;
+}
+.mdialog table.historytable {
+       margin-top: 10px;
+       margin-bottom: 10px;
+}
+.history {
+       display:none;
+}
+.historytable {
+       min-width: 500px;
+}
+.historydate, .historyauthor, .historysummary {
+       font-size: 8pt !important;
+       white-space: nowrap;
+       padding: 5px;
+}
+.historydate {
+       color: #0645AD;
+}
+.historydate:hover {
+       text-decoration: underline;
+}
+.historyauthor a {
+       font-size: 8pt !important;
+}
+.historysummary {
+       color: #999999;
+       font-style: italic;
+}
+tr.historyheader {
+       background-color: #444444;
+       color: #ffffff;
+}
+.historytable th {
+       font-weight: bold;
+       font-size: 10pt;
+       padding: 5px;
+}
+.historytable td {
+       font-size: 10pt;
+}
+.historytable .tleft {
+       text-align:left;
+}
+
+
+.flow-post-content textarea {
+       width: 100%;
+       margin: 0;
+       height: 100px;
+       border:none !important;
+}
+.replybox textarea.closedreply {
+       /* @embed */
+       background: transparent url("images/chat_bubble_999999.png") 5px center 
no-repeat;
+       padding-left: 25px !important;
+       height: 31px;
+       min-height: 31px;
+       max-height: 31px;
+}
+.replybox textarea.closedreply:hover {
+       /* @embed */
+       background: transparent url("images/chat_bubble_green.png") 5px center 
no-repeat;
+}
+
+.replybox .cancellink, .editbox .cancellink, #addtopicform .cancellink, 
#enterusername .cancellink {
+       margin-left: 10px;
+}
+.replybox .disclaimer, .editbox .disclaimer, #addtopicform .disclaimer {
+       margin-top: 5px;
+       font-size: 10pt;
+       color: #999999;
+}
+.editboxextras .disclaimer {
+       padding: 10px;
+}
+.replybox .replyboxextras {
+       border-top: 1px solid #efefef;
+       padding: 10px;
+       background-color: #ffffff;
+       display:none;
+}
+.editboxcontrols {
+       padding: 10px;
+       background-color: #efefef;
+}
+.disclaimer, .disclaimer a {
+       font-size: 8pt !important;
+}
+/* Action boxes */
+.flow-topic-action-box-pokey, .flow-post-action-box-pokey {
+       /* @embed */
+       background-image: url('images/PokeyNorth.png');
+       background-repeat: no-repeat;
+       width: 21px;
+       height: 11px;
+       position: absolute;
+       z-index: 61000;
+       top: 20px;
+       right: 10px;    
+       display:none;
+}
+
+.flow-topic-action-box, .flow-post-action-box {
+       position: absolute;
+       top: 30px;
+       right: 0px;
+       border: 1px solid silver;
+       background-color: #ffffff;
+       min-height: 2em;
+       width:auto;
+       min-width: 100px;
+       white-space: nowrap;
+       color: #6D6D6D;
+       z-index: 60000;
+       padding: 10px;
+       box-shadow: 0px 3px 8px rgba(50, 50, 50, 0.35);
+       display:none;
+       font-size: 8pt !important;
+}
+.flow-topic-actionslink, .flow-post-actions {
+       /* @embed */
+       background-image: url('images/micro_chevron_down_999999.png');
+       background-repeat: no-repeat;
+       background-position: right center;
+       padding-right: 12px;
+}
+.flow-topic-actionslink:hover, .flow-post-actions:hover {
+       /* @embed */
+       background-image: url('images/micro_chevron_down_blue.png');
+}
+.flow-topic-actionslink {
+       position: absolute;
+       right: 5px;
+       font-size: 10pt;
+       color: #999999;
+}
+.flow-post-actions {
+       font-size: 10pt;
+       color: #999999;
+}
+.flow-topic-actionslink:hover, .flow-post-actions:hover {
+       color: #0645ac;
+       text-decoration:none !important;
+}
+.flow-topic-action-box a, .flow-post-action-box a {
+       font-size: 8pt !important;
+}
+.flow-topic-action-box :hover, .flow-post-action-box :hover {
+       text-decoration:none !important;
+}
+.flow-topic-action-box ul, .flow-post-action-box ul {
+       margin: 0px;
+       list-style-type: none;  
+       font-size: 8pt;
+}
+.flow-post-action-box {
+       text-align: left;
+}
+input.addtopicstart {
+       width: 700px;
+       height: 33px;
+       margin-top: 10px;
+       /* @embed */
+       background: transparent url("images/chat_bubble_999999.png") 5px center 
no-repeat;
+       padding-left: 25px !important;  
+}
+input.addtopicstart:hover {
+       /* @embed */
+       background: transparent url("images/chat_bubble_green.png") 5px center 
no-repeat;
+}
+
+#addtopicform input[type="text"] {
+       width: 700px;
+       height: 33px;
+       margin-top: 5px;
+}
+#enterusername input[type="text"] {
+       width: 380px;
+       height: 33px;
+       margin-top: 5px;
+}
+#addtopicform textarea, #enterusername textarea {
+       width: 700px;
+}
+#addtopicform label, #enterusername label {
+       font-weight: bold;
+}
+
+#addtopicform .mw-ui-input[type="text"]
+{
+       border: 1px solid #cccccc;
+       margin-bottom: 0px;
+       box-shadow:none;
+       -webkit-border-bottom-left-radius: 0px; 
+       -webkit-border-bottom-right-radius:  0px;       
+       -moz-border-bottom-left-radius:  0px;   
+       -moz-border-bottom-right-radius:  0px;  
+       -ms-border-bottom-left-radius:  0px;    
+       -ms-border-bottom-right-radius:  0px;   
+       -o-border-bottom-left-radius:  0px;     
+       -o-border-bottom-right-radius:  0px;    
+       border-bottom-left-radius:  0px;        
+       border-bottom-right-radius:  0px;       
+
+}
+#addtopicform textarea.mw-ui-input {
+       margin-top: 0px;
+       border-top:none;
+       box-shadow:none;
+       height: 150px;
+       -webkit-border-top-left-radius:  0px;   
+       -webkit-border-top-right-radius:  0px;  
+       -moz-border-top-left-radius:  0px;      
+       -moz-border-top-right-radius:  0px;     
+       -ms-border-top-left-radius:  0px;       
+       -ms-border-top-right-radius:  0px;      
+       -o-border-top-left-radius:  0px;        
+       -o-border-top-right-radius:  0px;       
+       border-top-left-radius:  0px;   
+       border-top-right-radius:  0px;  
+}
+#addtopicform textarea:focus,
+#addtopicform input[type="text"]:focus {
+  -moz-box-shadow:inset 7px 0px 0px #5088f7;
+  -webkit-box-shadow:inset 7px 0px 0px #5088f7;
+  box-shadow:inset 7px 0px 0px #5088f7;
+}
+#addtopicform textarea.mw-ui-error,
+#addtopicform input[type="text"].mw-ui-error
+ {
+  -moz-box-shadow:inset 7px 0px 0px #cf1c1f;
+  -webkit-box-shadow:inset 7px 0px 0px #cf1c1f;
+  box-shadow:inset 7px 0px 0px #cf1c1f;
+}
+#setuserform {
+       text-align: left;
+}
+
+#simplemodal-overlay {background-color:#000;}
+
+/* Overlay */
+#addtopicform, #enterusername { background-color:#ffffff; }
+
+/* Container */
+#enterusername {
+       height:360px; 
+       width:600px; 
+       border:4px solid #444; 
+       padding:20px;
+}
+.editboxmaster {
+       padding: 0px !important;
+}
+.sidelinks {
+       position: absolute;
+       right: 0px;
+       top: 15px;
+       width: auto;
+       min-width: 160px;
+       padding: 10px;
+       background-color: #efefef;
+       border: 1px solid #efefef;
+}
+
+.sidelinks a {
+       padding-left: 20px;
+       color: #444444;
+}
+.sidelinks a:hover {
+       color: #0645ac;
+       text-decoration: none;
+}
+.sidelinks a.profilelink {
+       /* @embed */
+       background-image: url(images/icon_user_grey.png);
+       background-repeat: no-repeat;
+       background-position: left center;
+}
+.sidelinks a.archivedtalklink {
+       /* @embed */
+       background-image: url(images/icon_discussion_grey.png);
+       background-repeat: no-repeat;
+       background-position: left center;
+}
+.sidelinks a.contributionslink {
+       /* @embed */
+       background-image: url(images/icon_pencil_grey.png);
+       background-repeat: no-repeat;
+       background-position: left center;
+}
+.sidelinks a.emailuserlink {
+       /* @embed */
+       background-image: url(images/icon_mail_grey.png);
+       background-repeat: no-repeat;
+       background-position: left center;
+}
+.sidelinks a.gratitudelink {
+       /* @embed */
+       background-image: url(images/icon_heart_grey.png);
+       background-repeat: no-repeat;
+       background-position: left center;
+}
+.sidelinks a.profilelink:hover {
+       /* @embed */
+       background-image: url(images/icon_user_blue.png);
+}
+.sidelinks a.archivedtalklink:hover {
+       /* @embed */
+       background-image: url(images/icon_discussion_blue.png);
+}
+.sidelinks a.contributionslink:hover {
+       /* @embed */
+       background-image: url(images/icon_pencil_blue.png);
+}
+.sidelinks a.emailuserlink:hover {
+       /* @embed */
+       background-image: url(images/icon_mail_blue.png);
+}
+.sidelinks a.gratitudelink:hover {
+       /* @embed */
+       background-image: url(images/icon_heart_blue.png);
+}
+.flow-utctime {
+       cursor: pointer;
+}
+
diff --git a/modules/discussion/images/crinkle_right.png 
b/modules/discussion/images/crinkle_right.png
new file mode 100644
index 0000000..4715bca
--- /dev/null
+++ b/modules/discussion/images/crinkle_right.png
Binary files differ
diff --git a/modules/discussion/images/icon_discussion_blue.png 
b/modules/discussion/images/icon_discussion_blue.png
new file mode 100644
index 0000000..6e27199
--- /dev/null
+++ b/modules/discussion/images/icon_discussion_blue.png
Binary files differ
diff --git a/modules/discussion/images/icon_discussion_grey.png 
b/modules/discussion/images/icon_discussion_grey.png
new file mode 100644
index 0000000..18e9952
--- /dev/null
+++ b/modules/discussion/images/icon_discussion_grey.png
Binary files differ
diff --git a/modules/discussion/images/icon_heart_blue.png 
b/modules/discussion/images/icon_heart_blue.png
new file mode 100644
index 0000000..a494679
--- /dev/null
+++ b/modules/discussion/images/icon_heart_blue.png
Binary files differ
diff --git a/modules/discussion/images/icon_heart_grey.png 
b/modules/discussion/images/icon_heart_grey.png
new file mode 100644
index 0000000..6736971
--- /dev/null
+++ b/modules/discussion/images/icon_heart_grey.png
Binary files differ
diff --git a/modules/discussion/images/icon_mail_blue.png 
b/modules/discussion/images/icon_mail_blue.png
new file mode 100644
index 0000000..929d4d5
--- /dev/null
+++ b/modules/discussion/images/icon_mail_blue.png
Binary files differ
diff --git a/modules/discussion/images/icon_mail_grey.png 
b/modules/discussion/images/icon_mail_grey.png
new file mode 100644
index 0000000..4e7941d
--- /dev/null
+++ b/modules/discussion/images/icon_mail_grey.png
Binary files differ
diff --git a/modules/discussion/images/icon_pencil_blue.png 
b/modules/discussion/images/icon_pencil_blue.png
new file mode 100644
index 0000000..4bf1eaf
--- /dev/null
+++ b/modules/discussion/images/icon_pencil_blue.png
Binary files differ
diff --git a/modules/discussion/images/icon_pencil_grey.png 
b/modules/discussion/images/icon_pencil_grey.png
new file mode 100644
index 0000000..7352edc
--- /dev/null
+++ b/modules/discussion/images/icon_pencil_grey.png
Binary files differ
diff --git a/modules/discussion/images/icon_user_blue.png 
b/modules/discussion/images/icon_user_blue.png
new file mode 100644
index 0000000..62a358f
--- /dev/null
+++ b/modules/discussion/images/icon_user_blue.png
Binary files differ
diff --git a/modules/discussion/images/icon_user_grey.png 
b/modules/discussion/images/icon_user_grey.png
new file mode 100644
index 0000000..74d9c5c
--- /dev/null
+++ b/modules/discussion/images/icon_user_grey.png
Binary files differ
diff --git a/modules/discussion/images/mini_chevron_right_444444.png 
b/modules/discussion/images/mini_chevron_right_444444.png
new file mode 100644
index 0000000..50ad817
--- /dev/null
+++ b/modules/discussion/images/mini_chevron_right_444444.png
Binary files differ
diff --git a/modules/discussion/images/star_empty.png 
b/modules/discussion/images/star_empty.png
new file mode 100644
index 0000000..fdc9ae6
--- /dev/null
+++ b/modules/discussion/images/star_empty.png
Binary files differ
diff --git a/modules/discussion/images/star_empty_blue.png 
b/modules/discussion/images/star_empty_blue.png
new file mode 100644
index 0000000..1e7e47f
--- /dev/null
+++ b/modules/discussion/images/star_empty_blue.png
Binary files differ
diff --git a/modules/discussion/images/star_full.png 
b/modules/discussion/images/star_full.png
new file mode 100644
index 0000000..d353192
--- /dev/null
+++ b/modules/discussion/images/star_full.png
Binary files differ
diff --git a/modules/discussion/images/star_full_blue.png 
b/modules/discussion/images/star_full_blue.png
new file mode 100644
index 0000000..fd53faa
--- /dev/null
+++ b/modules/discussion/images/star_full_blue.png
Binary files differ
diff --git a/modules/discussion/images/tag.png 
b/modules/discussion/images/tag.png
new file mode 100644
index 0000000..5df2fd2
--- /dev/null
+++ b/modules/discussion/images/tag.png
Binary files differ
diff --git a/modules/discussion/images/topic_control_read_down.png 
b/modules/discussion/images/topic_control_read_down.png
new file mode 100644
index 0000000..32fd0b4
--- /dev/null
+++ b/modules/discussion/images/topic_control_read_down.png
Binary files differ
diff --git a/modules/discussion/images/topic_control_read_right.png 
b/modules/discussion/images/topic_control_read_right.png
new file mode 100644
index 0000000..99dbd89
--- /dev/null
+++ b/modules/discussion/images/topic_control_read_right.png
Binary files differ
diff --git a/modules/discussion/images/topic_control_unread_down.png 
b/modules/discussion/images/topic_control_unread_down.png
new file mode 100644
index 0000000..65edee5
--- /dev/null
+++ b/modules/discussion/images/topic_control_unread_down.png
Binary files differ
diff --git a/modules/discussion/images/topic_control_unread_right.png 
b/modules/discussion/images/topic_control_unread_right.png
new file mode 100644
index 0000000..31374d4
--- /dev/null
+++ b/modules/discussion/images/topic_control_unread_right.png
Binary files differ
diff --git a/special/SpecialFlow.php b/special/SpecialFlow.php
index 90b74d2..22879e2 100644
--- a/special/SpecialFlow.php
+++ b/special/SpecialFlow.php
@@ -24,7 +24,6 @@
 
        public function execute( $subPage ) {
                $this->setHeaders();
-               $this->getOutput()->setPageTitle( $this->msg( 
'flow-specialpage' )->text() );
                $this->getOutput()->addModules( array('ext.flow.base') );
                
                if ( empty( $subPage ) ) {
@@ -38,6 +37,8 @@
                $action = $request->getVal( 'action', 'view' );
                $workflowId = $request->getVal( 'workflow' );
                $user = $this->getUser();
+
+               $this->getOutput()->setPageTitle( $this->msg( 
'flow-specialpage', $title->getPrefixedText() )->text() );
 
                $definitionRequest = $request->getVal( 'definition', null );
                if ( $definitionRequest !== null ) {
@@ -75,9 +76,11 @@
                }
 
                $templating = $this->container['templating'];
+               $this->getOutput()->addHTML( "<div class='flow-container'>" );
                foreach ( $blocks as $block ) {
                        $block->render( $templating, $request->getArray( 
$block->getName(), array() ) );
                }
+               $this->getOutput()->addHTML( "</div>" );
        }
 
        protected function loadContainer() {
diff --git a/templates/edit-summary.html.php b/templates/edit-summary.html.php
new file mode 100644
index 0000000..e996930
--- /dev/null
+++ b/templates/edit-summary.html.php
@@ -0,0 +1,29 @@
+<?php
+
+// owning workflow
+echo Html::openElement( 'form', array(
+       'method' => 'POST',
+       'action' => $this->generateUrl( $workflow, 'edit-summary' ),
+) );
+$editToken = $user->getEditToken( 'flow' );
+echo Html::element( 'input', array( 'type' => 'hidden', 'name' => 
'wpEditToken', 'value' => $editToken) );
+if ( $block->hasErrors( 'prev_revision' ) ) {
+       echo '<p>' . $block->getError( 'prev_revision' )->escaped() . '</p>';
+}
+if ( $summary ) {
+       echo Html::element( 'input', array(
+               'type' => 'hidden',
+               'name' => $block->getName()."[prev_revision]",
+               'value' => $summary->getRevisionId()->getHex(),
+       ) );
+}
+if ( $block->hasErrors( 'content' ) ) {
+       echo '<p>' . $block->getError( 'content' )->escaped() . '</p>';
+}
+echo Html::textarea( $block->getName() . '[content]', $summary ? 
$summary->getContent() : '' );
+echo Html::element( 'input', array(
+       'type' => 'submit',
+       'value' => wfMessage( 'flow-edit-summary' )->plain(),
+) );
+echo '</form>';
+
diff --git a/templates/summary.html.php b/templates/summary.html.php
index 536db6c..1e7fa98 100644
--- a/templates/summary.html.php
+++ b/templates/summary.html.php
@@ -1,30 +1,10 @@
 <?php
 
-// owning workflow
-echo Html::openElement( 'form', array(
-       'method' => 'POST',
-       'action' => $this->generateUrl( $workflow, 'edit-summary' ),
-) );
-$editToken = $user->getEditToken( 'flow' );
-echo Html::element( 'input', array( 'type' => 'hidden', 'name' => 
'wpEditToken', 'value' => $editToken) );
-if ( $block->hasErrors( 'prev_revision' ) ) {
-       echo '<p>' . $block->getError( 'prev_revision' )->escaped() . '</p>';
-}
-if ( $summary ) {
-       echo Html::element( 'input', array(
-               'type' => 'hidden',
-               'name' => $block->getName()."[prev_revision]",
-               'value' => $summary->getRevisionId()->getHex(),
-       ) );
-}
-echo '<h3>' . wfMessage( 'flow-summary' )->escaped() . '</h3>';
 if ( $block->hasErrors( 'content' ) ) {
        echo '<p>' . $block->getError( 'content' )->escaped() . '</p>';
 }
-echo Html::textarea( $block->getName() . '[content]', $summary ? 
$summary->getContent() : '' );
-echo Html::element( 'input', array(
-       'type' => 'submit',
-       'value' => wfMessage( 'flow-edit-summary' )->plain(),
-) );
-echo '</form>';
+echo htmlspecialchars( $summary->getContent() );
 
+$editLink = $this->generateUrl( $workflow->getId(), 'edit-summary' );
+?>
+<div class="flow-summary-edit-link"><a href="<?php echo 
htmlspecialchars($editLink);?>"><?php echo wfMessage( 'flow-edit-summary-link' 
)->escaped()?></a></div>
\ No newline at end of file
diff --git a/templates/topic.html.php b/templates/topic.html.php
index a0f83b1..f726647 100644
--- a/templates/topic.html.php
+++ b/templates/topic.html.php
@@ -9,63 +9,82 @@
 $postAction = function( $action, array $data = array() ) use( $self, $block, 
$root, $editToken ) {
        // actions that change things must be post requests
        // also, CSRF?
-       echo '<li>' . Html::openElement( 'form', array(
+       $output = '';
+       $output .= Html::openElement( 'form', array(
                'method' => 'POST',
                'action' => $self->generateUrl( $root->getPostId(), $action )
        ) );
-       echo Html::element( 'input', array( 'type' => 'hidden', 'name' => 
'wpEditToken', 'value' => $editToken) );
+       $output .= Html::element( 'input', array( 'type' => 'hidden', 'name' => 
'wpEditToken', 'value' => $editToken) );
        foreach ( $data as $name => $value ) {
-               echo Html::element( 'input', array(
+               $output .= Html::element( 'input', array(
                        'type' => 'hidden',
                        'name' => $block->getName() . "[$name]",
                        'value' => $value,
                ) );
        }
-       echo Html::element( 'input', array(
+       $output .= Html::element( 'input', array(
                'type' => 'submit',
                // flow-post-action-delete-post
                // flow-post-action-history
                'value' => wfMessage( "flow-post-action-$action" )->plain(),
-       ) ) . '</form></li>';
+       ) ) . '</form>';
+
+       return $output;
 };
 
 $renderPost = function( $post ) use( $self, $block, $root, $postAction, 
&$renderPost, $editToken ) {
-       echo '<div style="padding-left: 20px">';
-       if ( $post->isFlagged( 'deleted' ) ) {
-               echo wfMessage( 'flow-post-deleted' )
-                       . '<ul>';
-               $postAction( 'restore-post', array( 'postId' => 
$post->getPostId()->getHex() ) );
-               echo '<li>' . Html::element( 'a', array(
-                       'href' => $self->generateUrl( $root->getPostId(), 
'post-history', array(
-                               $block->getName() . '[postId]' => 
$post->getPostId()->getHex(),
-                       ) ),
-               ), wfMessage( 'flow-post-action-history' )->plain() ) . '</li>';
+       echo Html::openElement( 'div', array(
+               'class' => 'flow-post-container',
+       ) );
 
-               echo '</ul>';
-       } else {
-               echo wfMessage( 'flow-user' ) . Html::element( 'span', null, 
$post->getUserText() )
-                       . wfMessage( 'flow-post-id' ) . 
$post->getPostId()->getHex()
-                       . wfMessage( 'flow-content' ) . $post->getContent()
-                       . '<ul>';
-               $postAction( 'delete-post', array( 'postId' => 
$post->getPostId()->getHex() ) );
-               echo '<li>' . Html::element( 'a', array(
+       $class = 'flow-post';
+       $actions = array();
+       $replyForm = '';
+       if ( $post->isFlagged( 'deleted' ) ) {
+               $class .= ' flow-post-deleted';
+       }
+
+       echo Html::openElement( 'div', array(
+               'class' => $class,
+               'data-post-id' => $post->getPostId()->getHex(),
+               'id' => 'flow-post-' . $post->getPostId()->getHex(),
+       ) );
+
+       if ( $post->isFlagged( 'deleted' ) ) {
+               $content = wfMessage( 'flow-post-deleted' );
+               $user = wfMessage( 'flow-post-deleted' );
+
+               // TODO make conditional on rights
+               $actions['restore'] = $postAction( 'restore-post', array( 
'postId' => $post->getPostId()->getHex() ) );
+
+               $actions['history'] = Html::element( 'a', array(
                        'href' => $self->generateUrl( $root->getPostId(), 
'post-history', array(
                                $block->getName() . '[postId]' => 
$post->getPostId()->getHex(),
                        ) ),
-               ), wfMessage( 'flow-post-action-history' )->plain() ) . '<li>';
-               echo '</ul>'
-                       . Html::openElement( 'form', array(
+               ), wfMessage( 'flow-post-action-history' )->plain() );
+       } else {
+               $user = Html::element( 'span', null, $post->getUserText() );
+               $content = $post->getContent();
+               $actions['delete'] = $postAction( 'delete-post', array( 
'postId' => $post->getPostId()->getHex() ) );
+               $actions['history'] = Html::element( 'a', array(
+                       'href' => $self->generateUrl( $root->getPostId(), 
'post-history', array(
+                               $block->getName() . '[postId]' => 
$post->getPostId()->getHex(),
+                       ) ),
+               ), wfMessage( 'flow-post-action-history' )->plain() );
+               $replyForm = Html::openElement( 'form', array(
                                'method' => 'POST',
                                // root post id is same as topic workflow id
                                'action' => $self->generateUrl( 
$root->getPostId(), 'reply' ),
+                               'class' => 'flow-reply-form',
                        ) );
                        echo Html::element( 'input', array( 'type' => 'hidden', 
'name' => 'wpEditToken', 'value' => $editToken) );
+
                if ( $block->getHexRepliedTo() === $post->getPostId()->getHex() 
) {
                        foreach ( $block->getErrors() as $error ) {
-                               echo $error->text() . '<br>'; // the pain ...
+                               $replyForm .= $error->text() . '<br>'; // the 
pain ...
                        }
                }
-               echo Html::element( 'input', array(
+               $replyForm .= Html::element( 'input', array(
                                'type' => 'hidden',
                                'name' => $block->getName() . '[replyTo]',
                                'value' => $post->getPostId()->getHex(),
@@ -77,13 +96,93 @@
                        ) )
                        . '</form>';
        }
+?>
+<div class="flow-post-title">
+       <div class="flow-post-authorline">
+<?php
+echo $user;
+?>
+               <span class="flow-datestamp">
+                       <span class="flow-agotime" style="display: 
inline">&lt;timestamp&gt;</span>
+                       <span class="flow-utctime" style="display: 
none">&lt;timestamp&gt;</span>
+               </span>
+       </div>
+</div>
+
+<div class="flow-post-content">
+<?php
+echo $content
+?>
+</div>
+<div class="flow-post-controls">
+       <a class="flow-post-actions">
+               <?php echo wfMessage('flow-post-actions')->escaped(); ?>
+               <div class="flow-post-actionbox-pokey">&nbsp;</div>
+               <div class="flow-post-actionbox">
+                       <ul>
+<?php
+foreach( $actions as $key => $action ) {
+       echo '<li class="flow-action-'.$key.'">' . $action . '</li>';
+}
+?>
+                       </ul>
+               </div>
+       </a>
+</div>
+<?php
+
+       echo '</div>';
+
+       echo $replyForm;
+
+       echo Html::openElement( 'div', array(
+               'class' => 'flow-post-replies',
+       ) );
        foreach( $post->getChildren() as $child ) {
                $renderPost( $child );
        }
        echo '</div>';
+       echo '</div>';
 };
 
-echo Html::element( 'h4', array(), $root->getContent() );
+$title = $root->getContent();
+
+echo Html::element( 'hr', array( 'class' => 'flow-topic-separator' ) );
+
+echo Html::openElement( 'div', array(
+       'class' => 'flow-topic-container flow-topic-full',
+       'id' => 'flow-topic-' . $topic->getId()->getHex(),
+       'data-topic-id' => $topic->getId()->getHex(),
+) );
+?>
+<div class="flow-titlebar">
+       <div class="flow-topic-title">
+               <div class="flow-realtitle">
+<?php echo htmlspecialchars( $title ); ?>
+               </div>
+       </div>
+       <div class="flow-topiccontrols">
+       </div>
+</div>
+<div class="flow-metabar">
+       <span class="flow-topic-datestamp">
+               <span class="flow-agotime" style="display: 
inline">&lt;timestamp&gt;</span>
+               <span class="flow-utctime" style="display: 
none">&lt;timestamp&gt;</span>
+       </span>
+       <a class="flow-topic-actionslink">
+               <?php echo wfMessage( 'flow-topic-actions' )->escaped() ?>
+               <div class="flow-topic-actionbox-pokey">&nbsp;</div>
+               <div class="flow-topic-actionbox">
+                       <ul>
+                               <!-- Actions for entire topic. Currently none 
-->
+                       </ul>
+               </div>
+       </a>
+</div>
+
+<?php
 foreach( $root->getChildren() as $child ) {
        $renderPost( $child );
 }
+?>
+</div>
\ No newline at end of file
diff --git a/templates/topiclist.html.php b/templates/topiclist.html.php
index c720489..7f2afeb 100644
--- a/templates/topiclist.html.php
+++ b/templates/topiclist.html.php
@@ -3,25 +3,34 @@
 $editToken = $user->getEditToken( 'flow' );
 echo Html::openElement( 'form', array(
        'method' => 'POST',
-       'action' => $this->generateUrl( $topicList->getWorkflow(), 'new-topic' )
+       'action' => $this->generateUrl( $topicList->getWorkflow(), 'new-topic' 
),
+       'class' => 'flow-newtopic-form',
 ) );
 echo Html::element( 'input', array( 'type' => 'hidden', 'name' => 
'wpEditToken', 'value' => $editToken) );
 
-echo '<h3>' . wfMessage( 'flow-topic-title' )->escaped() . '</h3>';
+echo '<h3>' . wfMessage( 'flow-newtopic-header' )->escaped() . '</h3>';
 if ( $topicList->hasErrors( 'topic' ) ) {
        echo '<p>' . $topicList->getError( 'topic' )->escaped() . '</p>';
 }
-echo Html::textarea( $topicList->getName() . '[topic]' );
+echo Html::textarea( $topicList->getName() . '[topic]', '', array(
+       'placeholder' => wfMessage( 'flow-newtopic-title-placeholder' )->text(),
+       'rows' => 1,
+) );
 
-echo '<h3>' . wfMessage( 'flow-topic-content' )->escaped() . '</h3>';
 if ( $topicList->hasErrors( 'content' ) ) {
        echo '<p>' . $topicList->getError( 'content' )->escaped() . '</p>';
 }
-echo Html::textarea( $topicList->getName() . '[content]' );
+echo Html::textarea( $topicList->getName() . '[content]', '', array(
+       'placeholder' => wfMessage( 'flow-newtopic-content-placeholder' 
)->text(),
+       'rows' => '10',
+) );
 echo Html::element( 'input', array(
        'type' => 'submit',
-       'value' => wfMessage( 'flow-new-message' )->plain()
+       'value' => wfMessage( 'flow-newtopic-save' )->text(),
 ) );
+echo Html::element( 'div', array(
+       'class' => 'flow-newtopic-caution',
+), wfMessage( 'flow-newtopic-caution' )->parse() );
 echo '</form>';
 
 foreach ( $topics as $topic ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/78478
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4bbc64a9fb12a142a882691ac9a59674e0be9ae0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Werdna <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to