[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Creating basic editing interface for CollaborationHubContent.

2016-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Creating basic editing interface for CollaborationHubContent.
..


Creating basic editing interface for CollaborationHubContent.

Change-Id: Ia2d3a18272bf20d691e0038daabe4c6d44ef802f
---
M CollaborationKit.hooks.php
M extension.json
M i18n/en.json
M i18n/qqq.json
A includes/CollaborationHubContentEditor.php
M includes/content/CollaborationHubContent.php
M includes/content/CollaborationHubContentHandler.php
M includes/content/CollaborationHubTOC.php
8 files changed, 451 insertions(+), 27 deletions(-)

Approvals:
  Harej: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/CollaborationKit.hooks.php b/CollaborationKit.hooks.php
index e2d439e..fc28f01 100644
--- a/CollaborationKit.hooks.php
+++ b/CollaborationKit.hooks.php
@@ -13,7 +13,7 @@
$title = $sktemplate->getTitle();
$request = $sktemplate->getRequest();
if ( isset( $links['views']['edit'] ) ) {
-   if ( $title->hasContentModel( 
'CollaborationListContent' ) ) {
+   if ( $title->hasContentModel( 
'CollaborationListContent' ) || $title->hasContentModel( 
'CollaborationHubContent' ) ) {
// Edit as JSON
$active = in_array( $request->getVal( 'action' 
), [ 'edit', 'submit' ] )
&& $request->getVal( 'format' ) === 
'application/json';
@@ -29,7 +29,8 @@
// Make it not be selected when editing 
json.
$links['views']['edit']['class'] = 
false;
}
-   } elseif ( $title->hasContentModel( 
'CollaborationHubContent' ) ) {
+   }
+   if ( $title->hasContentModel( 'CollaborationHubContent' 
) ) {
// Add feature
$links['actions']['addnewfeature'] = [
'class' => '',
diff --git a/extension.json b/extension.json
index f8145af..61cce63 100644
--- a/extension.json
+++ b/extension.json
@@ -20,13 +20,14 @@
"CollaborationKitHooks": "CollaborationKit.hooks.php",
"CollaborationHubContent": 
"includes/content/CollaborationHubContent.php",
"CollaborationHubContentHandler": 
"includes/content/CollaborationHubContentHandler.php",
+   "CollaborationHubContentEditor": 
"includes/CollaborationHubContentEditor.php",
"CollaborationHubTOC": 
"includes/content/CollaborationHubTOC.php",
"CollaborationKitIcon": 
"includes/content/CollaborationKitIcon.php",
"CollaborationListContent": 
"includes/content/CollaborationListContent.php",
"CollaborationListContentHandler": 
"includes/content/CollaborationListContentHandler.php",
+   "CollaborationListContentEditor": 
"includes/CollaborationListContentEditor.php",
"SpecialCreateCollaborationHub": 
"includes/SpecialCreateCollaborationHub.php",
"SpecialCreateHubFeature": 
"includes/SpecialCreateHubFeature.php",
-   "CollaborationListContentEditor": 
"includes/CollaborationListContentEditor.php",
"ResourceLoaderListStyleModule": 
"includes/ResourceLoaderListStyleModule.php"
},
"ContentHandlers": {
@@ -63,7 +64,8 @@
"CollaborationListContent::onArticleViewHeader"
],
"CustomEditor": [
-   "CollaborationListContent::onCustomEditor"
+   "CollaborationListContent::onCustomEditor",
+   "CollaborationHubContent::onCustomEditor"
],
"OutputPageBeforeHTML": [
"CollaborationKitHooks::onOutputPageBeforeHTML"
diff --git a/i18n/en.json b/i18n/en.json
index 6813fa5..15c9af9 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -62,6 +62,12 @@
"collaborationkit-list-newitem-description": "Description (optional)",
"collaborationkit-listedit-description": "Description",
"collaborationkit-listedit-list": "List items",
+   "collaborationkit-hubedit-displayname": "Name to display",
+   "collaborationkit-hubedit-introduction": "Introduction",
+   "collaborationkit-hubedit-footer": "Footer",
+   "collaborationkit-hubedit-image": "Hub image",
+   "collaborationkit-hubedit-colour": "Color",
+   "collaborationkit-hubedit-content": "Features",
"collaborationkit-editjsontab": "Edit as JSON",
"collaborationkit-hub-announcements-initial": "A new collaboration hub 
has been set up!",
"collaborationkit-hub-members-description": "Our members are below. 
Those who have not edited in over a month are moved to the inactive 

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Creating basic editing interface for CollaborationHubContent.

2016-10-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Creating basic editing interface for CollaborationHubContent.
..


Creating basic editing interface for CollaborationHubContent.

There is still more work to be done. Also, the editing interface uses OOjs UI 
because I will be added some extra features using OOjs UI so it makes more 
sense to have the form use it.

Bug: T141037
Change-Id: I25a2a13fdd3675b28da43259f543d4edecbb8d4e
---
M CollaborationKit.hooks.php
M extension.json
M i18n/en.json
M i18n/qqq.json
A includes/CollaborationHubContentEditor.php
M includes/content/CollaborationHubContent.php
M includes/content/CollaborationHubContentHandler.php
7 files changed, 447 insertions(+), 25 deletions(-)

Approvals:
  Isarra: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/CollaborationKit.hooks.php b/CollaborationKit.hooks.php
index e2d439e..fc28f01 100644
--- a/CollaborationKit.hooks.php
+++ b/CollaborationKit.hooks.php
@@ -13,7 +13,7 @@
$title = $sktemplate->getTitle();
$request = $sktemplate->getRequest();
if ( isset( $links['views']['edit'] ) ) {
-   if ( $title->hasContentModel( 
'CollaborationListContent' ) ) {
+   if ( $title->hasContentModel( 
'CollaborationListContent' ) || $title->hasContentModel( 
'CollaborationHubContent' ) ) {
// Edit as JSON
$active = in_array( $request->getVal( 'action' 
), [ 'edit', 'submit' ] )
&& $request->getVal( 'format' ) === 
'application/json';
@@ -29,7 +29,8 @@
// Make it not be selected when editing 
json.
$links['views']['edit']['class'] = 
false;
}
-   } elseif ( $title->hasContentModel( 
'CollaborationHubContent' ) ) {
+   }
+   if ( $title->hasContentModel( 'CollaborationHubContent' 
) ) {
// Add feature
$links['actions']['addnewfeature'] = [
'class' => '',
diff --git a/extension.json b/extension.json
index 335ff7e..ebc1cac 100644
--- a/extension.json
+++ b/extension.json
@@ -20,13 +20,14 @@
"CollaborationKitHooks": "CollaborationKit.hooks.php",
"CollaborationHubContent": 
"includes/content/CollaborationHubContent.php",
"CollaborationHubContentHandler": 
"includes/content/CollaborationHubContentHandler.php",
+   "CollaborationHubContentEditor": 
"includes/CollaborationHubContentEditor.php",
"CollaborationHubTOC": 
"includes/content/CollaborationHubTOC.php",
"CollaborationKitIcon": 
"includes/content/CollaborationKitIcon.php",
"CollaborationListContent": 
"includes/content/CollaborationListContent.php",
"CollaborationListContentHandler": 
"includes/content/CollaborationListContentHandler.php",
+   "CollaborationListContentEditor": 
"includes/CollaborationListContentEditor.php",
"SpecialCreateCollaborationHub": 
"includes/SpecialCreateCollaborationHub.php",
"SpecialCreateHubFeature": 
"includes/SpecialCreateHubFeature.php",
-   "CollaborationListContentEditor": 
"includes/CollaborationListContentEditor.php",
"ResourceLoaderListStyleModule": 
"includes/ResourceLoaderListStyleModule.php"
},
"ContentHandlers": {
@@ -63,7 +64,8 @@
"CollaborationListContent::onArticleViewHeader"
],
"CustomEditor": [
-   "CollaborationListContent::onCustomEditor"
+   "CollaborationListContent::onCustomEditor",
+   "CollaborationHubContent::onCustomEditor"
],
"OutputPageBeforeHTML": [
"CollaborationKitHooks::onOutputPageBeforeHTML"
diff --git a/i18n/en.json b/i18n/en.json
index 806b387..2e9f509 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -61,6 +61,12 @@
"collaborationkit-list-newitem-description": "Description (optional)",
"collaborationkit-listedit-description": "Description",
"collaborationkit-listedit-list": "List items",
+   "collaborationkit-hubedit-displayname": "Name to display",
+   "collaborationkit-hubedit-introduction": "Introduction",
+   "collaborationkit-hubedit-footer": "Footer",
+   "collaborationkit-hubedit-image": "Hub image",
+   "collaborationkit-hubedit-colour": "Color",
+   "collaborationkit-hubedit-content": "Features",
"collaborationkit-editjsontab": "Edit as JSON",
"collaborationkit-hub-announcements-initial": "A new collaboration hub 
has been set 

[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Creating basic editing interface for CollaborationHubContent.

2016-10-16 Thread Harej (Code Review)
Harej has uploaded a new change for review.

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

Change subject: Creating basic editing interface for CollaborationHubContent.
..

Creating basic editing interface for CollaborationHubContent.

There is still more work to be done. Also, the editing interface uses OOjs UI 
because I will be added some extra features using OOjs UI so it makes more 
sense to have the form use it.

Bug: T141037
Change-Id: I25a2a13fdd3675b28da43259f543d4edecbb8d4e
---
M .gitignore
M .gitreview
M .jscsrc
M CollaborationKit.alias.php
M CollaborationKit.hooks.php
M CollaborationKit.i18n.magic.php
M Gruntfile.js
M composer.json
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/ApiEditCollaborationHub.php
A includes/CollaborationHubContentEditor.php
M includes/CollaborationListContentEditor.php
M includes/ResourceLoaderListStyleModule.php
M includes/SpecialCreateCollaborationHub.php
M includes/SpecialCreateHubFeature.php
M includes/content/CollaborationHubContent.php
M includes/content/CollaborationHubContentHandler.php
M includes/content/CollaborationHubContentSchema.php
M includes/content/CollaborationHubDiffEngine.php
M includes/content/CollaborationHubTOC.php
M includes/content/CollaborationKitIcon.php
M includes/content/CollaborationListContent.php
M includes/content/CollaborationListContentHandler.php
M includes/content/CollaborationListContentSchema.php
M modules/ext.CollaborationKit.hub.styles.less
M modules/ext.CollaborationKit.hub.subpage.styles.less
M modules/ext.CollaborationKit.list.edit.js
M modules/ext.CollaborationKit.list.styles.less
M modules/ext.CollaborationKit.mixins.less
M modules/images/blot.svg
M modules/images/icons/LICENSE
M modules/images/icons/addimage.svg
M modules/images/icons/addmapmarker.svg
M modules/images/icons/addquote.svg
M modules/images/icons/bell.svg
M modules/images/icons/book.svg
M modules/images/icons/circleline.svg
M modules/images/icons/circlestar.svg
M modules/images/icons/circletriangle.svg
M modules/images/icons/circlex.svg
M modules/images/icons/clock.svg
M modules/images/icons/community.svg
M modules/images/icons/contents.svg
M modules/images/icons/die.svg
M modules/images/icons/discussion.svg
M modules/images/icons/download.svg
M modules/images/icons/edit.svg
M modules/images/icons/editprotected.svg
M modules/images/icons/eye.svg
M modules/images/icons/flag.svg
M modules/images/icons/funnel.svg
M modules/images/icons/gallery.svg
M modules/images/icons/gear.svg
M modules/images/icons/heart.svg
M modules/images/icons/icons-full.svg
M modules/images/icons/image.svg
M modules/images/icons/journal.svg
M modules/images/icons/key.svg
M modules/images/icons/link.svg
M modules/images/icons/lock.svg
M modules/images/icons/mail.svg
M modules/images/icons/map.svg
M modules/images/icons/mapmarker.svg
M modules/images/icons/menu.svg
M modules/images/icons/message.svg
M modules/images/icons/messagenew.svg
M modules/images/icons/messagescary.svg
M modules/images/icons/move.svg
M modules/images/icons/newspaper.svg
M modules/images/icons/nowiki.svg
M modules/images/icons/ol.svg
M modules/images/icons/page.svg
M modules/images/icons/pagechecked.svg
M modules/images/icons/pageribbon.svg
M modules/images/icons/pagesearch.svg
M modules/images/icons/paperclip.svg
M modules/images/icons/print.svg
M modules/images/icons/puzzlepiece.svg
M modules/images/icons/quotes.svg
M modules/images/icons/ribbon.svg
M modules/images/icons/rocket.svg
M modules/images/icons/search.svg
M modules/images/icons/star.svg
M modules/images/icons/starmenu.svg
M modules/images/icons/sun.svg
M modules/images/icons/translate.svg
M modules/images/icons/trash.svg
M modules/images/icons/ul.svg
M modules/images/icons/user.svg
M package.json
M phpcs.xml
M tests/phpunit/CollaborationHubContentHandlerTest.php
M tests/phpunit/CollaborationHubContentTest.php
95 files changed, 404 insertions(+), 12 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/84/316284/1

diff --git a/.gitignore b/.gitignore
old mode 100644
new mode 100755
diff --git a/.gitreview b/.gitreview
old mode 100644
new mode 100755
diff --git a/.jscsrc b/.jscsrc
old mode 100644
new mode 100755
diff --git a/CollaborationKit.alias.php b/CollaborationKit.alias.php
old mode 100644
new mode 100755
diff --git a/CollaborationKit.hooks.php b/CollaborationKit.hooks.php
old mode 100644
new mode 100755
index e2d439e..fc28f01
--- a/CollaborationKit.hooks.php
+++ b/CollaborationKit.hooks.php
@@ -13,7 +13,7 @@
$title = $sktemplate->getTitle();
$request = $sktemplate->getRequest();
if ( isset( $links['views']['edit'] ) ) {
-   if ( $title->hasContentModel( 
'CollaborationListContent' ) ) {
+   if ( $title->hasContentModel( 
'CollaborationListContent' ) || $title->hasContentModel( 
'CollaborationHubContent' ) ) {