Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove trailing spaces .

  • Loading branch information...
commit 8688b60b80da3ba71d6bd8a0f5a02815a2adb9e5 1 parent a101534
@vikas-srivastava authored
Showing with 298 additions and 299 deletions.
  1. +1 −1  .travis.yml
  2. +7 −7 LICENSE
  3. +15 −15 README.md
  4. +1 −1  _config.php
  5. +2 −2 code/control/ExtensionAdmin.php
  6. +2 −2 code/control/ExtensionAuthor.php
  7. +4 −4 code/control/ExtensionCategory.php
  8. +12 −12 code/control/ExtensionData.php
  9. +7 −7 code/control/ExtensionKeywords.php
  10. +12 −12 code/control/ExtensionSnapshot.php
  11. +2 −2 code/control/ExtensionVersion.php
  12. +23 −23 code/control/JsonHandler.php
  13. +14 −14 code/page_type/ExtensionHolder.php
  14. +3 −3 code/page_type/Module.php
  15. +11 −11 code/page_type/ModuleHolder.php
  16. +3 −3 code/page_type/Theme.php
  17. +8 −8 code/page_type/ThemeHolder.php
  18. +3 −3 code/page_type/Widget.php
  19. +9 −9 code/page_type/WidgetHolder.php
  20. +5 −5 code/task/CreatePackageJsonTask.php
  21. +5 −5 code/task/JsonUpdateTask.php
  22. +4 −4 composer.json
  23. +4 −4 docs/en/developers/data-flow.md
  24. +2 −2 docs/en/getting-started/getting-started.md
  25. +6 −6 docs/en/topics/add-search-pages.md
  26. +4 −4 docs/en/topics/detail-module-page.md
  27. +1 −1  docs/en/topics/submit-extension.md
  28. +3 −3 docs/en/topics/update-extension.md
  29. +5 −5 templates/Email/ExtensionApproved.ss
  30. +4 −4 templates/Email/ExtensionSubmitted.ss
  31. +2 −2 templates/Includes/ExtensionSearchResult.ss
  32. +1 −1  templates/Layout/ExtensionHolder.ss
  33. +3 −3 templates/Layout/ModuleHolder.ss
  34. +28 −28 templates/Layout/Module_show.ss
  35. +4 −4 templates/Layout/ThemeHolder.ss
  36. +30 −30 templates/Layout/Theme_show.ss
  37. +2 −3 templates/Layout/WidgetHolder.ss
  38. +30 −30 templates/Layout/Widget_show.ss
  39. +13 −13 tests/MockComposerClasses.php
  40. +1 −1  tests/control/ExtensionAuthorTest.php
  41. +2 −2 tests/control/ExtensionSnapshotTest.php
View
2  .travis.yml
@@ -22,4 +22,4 @@ before_script:
- ./sake dev/build "flush=1"
- - cd ~/builds/ss3
script:
- - phpunit -c phpunit.xml.dist
+ - phpunit -c phpunit.xml.dist
View
14 LICENSE
@@ -4,14 +4,14 @@ All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- * Neither the name of SilverStripe nor the names of its contributors may be used to endorse or promote products derived from this software
+ * Neither the name of SilverStripe nor the names of its contributors may be used to endorse or promote products derived from this software
without specific prior written permission.
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
View
30 README.md
@@ -2,14 +2,14 @@
## Overview
-Allows logged-in members to submit modules, themes and widgets on
+Allows logged-in members to submit modules, themes and widgets on
extension.silverstripe.org (proposed website for silverstripe extensions)
[![Build Status](https://secure.travis-ci.org/vikas-srivastava/extensionmanager.png?branch=master)](http://travis-ci.org/vikas-srivastava/extensionmanager)
-## Maintainer Contact
-
- * vikas srivastava
+## Maintainer Contact
+
+ * vikas srivastava
* NickName: openbees
* Email: viky2130@gmail.com)
@@ -19,21 +19,21 @@ extension.silverstripe.org (proposed website for silverstripe extensions)
* [composer](https://github.com/composer/composer)
## Documentation
-
+
* http://openbees.blogspot.in/
- * https://github.com/vikas-srivastava/extensionmanager/blob/master/docs/en/index.md
+ * https://github.com/vikas-srivastava/extensionmanager/blob/master/docs/en/index.md
+
+## Demo Website
+
+ * http://extension.openbees.org/
-## Demo Website
-
- * http://extension.openbees.org/
-
## Installation Instructions
-
+
* git clone git@github.com:vikas-srivastava/extensionmanager.git extensionmanager
- * cd extensionmanager
+ * cd extensionmanager
* curl -s http://getcomposer.org/installer | php
* composer.phar install
-
-## Usage Overview
- * https://github.com/silverstripe/gsoc-wiki/wiki/GSOC-2012-Project:-Improve-silverstripe.org-Modules-and-Widgets-page
+## Usage Overview
+
+ * https://github.com/silverstripe/gsoc-wiki/wiki/GSOC-2012-Project:-Improve-silverstripe.org-Modules-and-Widgets-page
View
2  _config.php
@@ -5,7 +5,7 @@
*/
require_once __DIR__ . '/vendor/autoload.php';
-//todo add better search
+//todo add better search
FulltextSearchable::enable();
/**
View
4 code/control/ExtensionAdmin.php
@@ -5,7 +5,7 @@
* @package extensionmanager
*/
class ExtensionAdmin extends ModelAdmin {
-
+
static $menu_title = "Extensions";
static $url_segment = "extensions";
@@ -14,6 +14,6 @@ class ExtensionAdmin extends ModelAdmin {
"ExtensionVersion",
"ExtensionCategory",
"ExtensionKeywords",
- "Member",
+ "Member",
);
}
View
4 code/control/ExtensionAuthor.php
@@ -37,9 +37,9 @@ public static function storeAuthorsInfo($authorsRawData,$extensionId) {
$totalAuthors = count($authorsRawData);
$extensionAuthorsId = array();
-
+
foreach($authorsRawData as $author) {
-
+
if(((array_key_exists('email', $author)))){
if(ExtensionAuthor::get()->filter("Email" , $author['email'])->first()) {
$extensionAuthor = ExtensionAuthor::get()->filter("Email" , $author['email'])->first();
View
8 code/control/ExtensionCategory.php
@@ -1,19 +1,19 @@
<?php
/**
- * Class containing methods for fetching and storing
+ * Class containing methods for fetching and storing
* extension Category information.
*
* @package extensionmanager
*/
class ExtensionCategory extends DataObject {
- static $db = array(
+ static $db = array(
'CategoryName' => 'Varchar(100)',
);
static $has_many = array(
'Extensions' => 'ExtensionData',
- );
+ );
static $searchable_fields = array(
'CategoryName' => array(
@@ -44,6 +44,6 @@ public static function getExtensionCategory($categoryID) {
$category = ExtensionCategory::get()->byID($categoryID);
if($category) {
return $category->CategoryName;
- }
+ }
}
}
View
24 code/control/ExtensionData.php
@@ -1,13 +1,13 @@
<?php
/**
- * Acts as base class for stroing and handling
+ * Acts as base class for stroing and handling
* Extensions(Module/Widget/Theme) Data .
*
* @package extensionmanager
*/
class ExtensionData extends DataObject {
- static $db = array(
+ static $db = array(
'Url' => 'Varchar(100)',
'Accepted' => 'Boolean',
'Title' => 'VarChar(100)',
@@ -42,7 +42,7 @@ class ExtensionData extends DataObject {
'IncludePath' => 'VarChar(500)',
'Bin' => 'VarChar(500)',
'MinimumStability' => 'VarChar(500)',
- );
+ );
static $searchable_fields = array(
'Name' => array(
@@ -158,15 +158,15 @@ private function sendMailtoAuthors($mailData) {
$email->populateTemplate($mailData);
$email->send();
}
-}
+}
class ExtensionData_Controller extends ContentController {
-
+
public $type, $disqus;
static $allowed_actions = array(
'index',
- 'show',
+ 'show',
);
public function init() {
@@ -183,8 +183,8 @@ public function init() {
*/
public function getExtensionData() {
$Params = $this->getURLParams();
-
- if(is_numeric($Params['ID']) && $ExtensionData = ExtensionData::get()->byID((int)$Params['ID'])) {
+
+ if(is_numeric($Params['ID']) && $ExtensionData = ExtensionData::get()->byID((int)$Params['ID'])) {
if(Permission::check("ADMIN") || ($ExtensionData->Type == $this->type && $ExtensionData->Accepted == "1" )) {
return $ExtensionData;
}
@@ -192,13 +192,13 @@ public function getExtensionData() {
}
/**
- * Show module data
+ * Show module data
*
* @return array
*/
- function show() {
+ function show() {
- if($ExtensionData = $this->getExtensionData($this->type)) {
+ if($ExtensionData = $this->getExtensionData($this->type)) {
$Data = array(
'MetaTitle' => $ExtensionData->Name,
'ExtensionData' => $ExtensionData,
@@ -216,5 +216,5 @@ function show() {
else{
return $this->httpError(404, "Sorry that $this->type could not be found");
}
- }
+ }
}
View
14 code/control/ExtensionKeywords.php
@@ -1,9 +1,9 @@
<?php
/**
- * Base class for handling extension tags
- *
+ * Base class for handling extension tags
+ *
* @package extensionmanager
- */
+ */
class ExtensionKeywords extends DataObject {
@@ -37,15 +37,15 @@ class ExtensionKeywords extends DataObject {
/**
* Store Keywords in seprate dataobject
*
- * @param array $authorsRawData, int $extensionId
+ * @param array $authorsRawData, int $extensionId
*/
public static function saveKeywords($rawKeywordData, $extensionId) {
$totalKeywords = count($rawKeywordData);
- for ($i = 0; $i < $totalKeywords; $i++) {
-
+ for ($i = 0; $i < $totalKeywords; $i++) {
+
if($keyword = ExtensionKeywords::get()->filter("KeywordName" , $rawKeywordData[$i])->first()) {
- $keyword->Extension()->add($extensionId);
+ $keyword->Extension()->add($extensionId);
} else {
$keyword = new ExtensionKeywords();
$keyword->KeywordName = $rawKeywordData[$i] ;
View
24 code/control/ExtensionSnapshot.php
@@ -1,22 +1,22 @@
<?php
/**
- * Factory class for handling extension snapshot
+ * Factory class for handling extension snapshot
* Related tasks
- *
+ *
* @package extensionmanager
- */
+ */
class ExtensionSnapshot extends Controller {
/**
- * Save Snapshots of extension in assets folder
+ * Save Snapshots of extension in assets folder
*
- * @param string $thumbnailUrl, $extensionName
- * @return int
+ * @param string $thumbnailUrl, $extensionName
+ * @return int
*/
public static function saveSnapshot($thumbnailUrl, $extensionName) {
-
- $folderToSave = 'assets/Uploads/Snapshots/';
+
+ $folderToSave = 'assets/Uploads/Snapshots/';
$folderObject = Folder::get()->filter("Filename" , $folderToSave)->first();
@@ -27,9 +27,9 @@ public static function saveSnapshot($thumbnailUrl, $extensionName) {
$fileExtension = preg_replace('/^.*\.([^.]+)$/D', '$1', $thumbnailUrl);
- $thumbnailBaseName = str_replace('/', '-', $extensionName);
+ $thumbnailBaseName = str_replace('/', '-', $extensionName);
- $thumbnailName = $thumbnailBaseName.'-thumbnail.'.$fileExtension;
+ $thumbnailName = $thumbnailBaseName.'-thumbnail.'.$fileExtension;
$ch = curl_init();
$timeout = 30;
@@ -49,8 +49,8 @@ public static function saveSnapshot($thumbnailUrl, $extensionName) {
if($folderObject ) {
$thumbnailFile = fopen(BASE_PATH.DIRECTORY_SEPARATOR.$folderToSave.$thumbnailName, 'w');
- fwrite($thumbnailFile, $imageContent);
- fclose($thumbnailFile);
+ fwrite($thumbnailFile, $imageContent);
+ fclose($thumbnailFile);
} else {
throw new InvalidArgumentException("Could not create $folderToSave , Please create it mannually ");
}
View
4 code/control/ExtensionVersion.php
@@ -1,13 +1,13 @@
<?php
/**
- * Acts as base class for stroing and handling
+ * Acts as base class for stroing and handling
* Extensions(Module/Widget/Theme) Versions data.
*
* @package extensionmanager
*/
class ExtensionVersion extends DataObject {
- static $db = array(
+ static $db = array(
'SourceType' => 'Varchar(300)',
'SourceUrl' => 'Varchar(300)',
'SourceReference' => 'Varchar(300)',
View
46 code/control/JsonHandler.php
@@ -1,7 +1,7 @@
<?php
/**
* All task related to json file.
- *
+ *
* Usage:
* <code>
* $json = new JsonReader();
@@ -20,7 +20,7 @@
use Composer\Json\JsonFile;
class JsonHandler extends Controller {
-
+
public $url;
public $latestReleasePackage;
public $packages;
@@ -33,16 +33,16 @@ public function __construct($url) {
$this->url = $url;
$config = Factory::createConfig();
$this->repo = new VcsRepository(array('url' => $url,''), new NullIO(), $config);
-
+
}
/**
- * Convert a module url into json content
+ * Convert a module url into json content
*
* @param string $url
* @return array $data
*/
- public function cloneJson() {
+ public function cloneJson() {
$jsonData = array();
try{
$this->packages = $this->repo->getPackages();
@@ -84,11 +84,11 @@ public function cloneJson() {
$jsonData['AllRelease'] = $this->packages;
$jsonData['LatestRelease'] = $this->latestReleasePackage;
- return $jsonData;
+ return $jsonData;
}
/**
- * Save json content in database
+ * Save json content in database
*
* @return boolean
*/
@@ -97,10 +97,10 @@ function saveJson() {
$ExtensionData->SubmittedByID = Member::currentUserID();
$result = $this->dataFields($ExtensionData);
return $result ;
- }
+ }
/**
- * update json content in database
+ * update json content in database
*
* @return boolean
*/
@@ -113,14 +113,14 @@ function updateJson() {
return $result ;
} else {
return ;
- }
+ }
}
/**
- * Save each property of json content
- * in corresponidng field of database
+ * Save each property of json content
+ * in corresponidng field of database
*
- * @param object $ExtensionData
+ * @param object $ExtensionData
* @return boolean
*/
function dataFields($ExtensionData) {
@@ -290,13 +290,13 @@ function dataFields($ExtensionData) {
}
/**
- * Save Version related data of Extension
+ * Save Version related data of Extension
*
- * @param int $id
+ * @param int $id
* @return boolean
*/
public function saveVersionData($id) {
-
+
foreach ($this->packages as $package) {
$version = new ExtensionVersion();
$version->ExtensionDataID = $id;
@@ -307,9 +307,9 @@ public function saveVersionData($id) {
}
/**
- * Delete old version of extension
+ * Delete old version of extension
*
- * @param int $id
+ * @param int $id
* @return boolean
*/
public function deleteVersionData($id){
@@ -317,13 +317,13 @@ public function deleteVersionData($id){
}
/**
- * Save each version related property of json content
+ * Save each version related property of json content
*
- * @param object $version, object $Data
+ * @param object $version, object $Data
* @return boolean
*/
public function versionDataField($version,$data) {
-
+
if($data->getSourceType()) {
$version->SourceType = $data->getSourceType();
}
@@ -331,7 +331,7 @@ public function versionDataField($version,$data) {
if($data->getSourceUrl()) {
$version->SourceUrl = $data->getSourceUrl();
}
-
+
if($data->getSourceReference()) {
$version->SourceReference = $data->getSourceReference();
}
@@ -363,7 +363,7 @@ public function versionDataField($version,$data) {
if($data->getReleaseDate()) {
$version->ReleaseDate = $data->getReleaseDate()->format('Y-m-d H:i:s');
}
-
+
if($data->getRequires()) {
$requires = $this->latestReleasePackage->getRequires();
View
28 code/page_type/ExtensionHolder.php
@@ -1,8 +1,8 @@
<?php
/**
- * This class will serve as base class for
+ * This class will serve as base class for
* all the ExtensionHolder classes (module/widget/theme)
- * contains extension submission forms and their handler.
+ * contains extension submission forms and their handler.
*
* @package extensionmanager
*/
@@ -13,7 +13,7 @@ class ExtensionHolder_Controller extends Page_Controller {
public $addContent, $afterEditContent,$latestReleasePackage;
public $extensionName, $mailData, $extensionType;
-
+
/**
* Setting up the form.
*
@@ -22,9 +22,9 @@ class ExtensionHolder_Controller extends Page_Controller {
public function AddForm($extensionType) {
if(!Member::currentUser()) return Security::permissionFailure();
-
+
$fields = new FieldList(
- new TextField ('Url', "Read-Only Url of your $extensionType Repository")
+ new TextField ('Url', "Read-Only Url of your $extensionType Repository")
);
$actions = new FieldList(
new FormAction('submitUrl', "Submit $extensionType")
@@ -47,11 +47,11 @@ public function submitUrl($data, $form) {
} elseif (substr($url,0, 4) == "git@") {
$form->sessionMessage(_t('ExtensionHolder.BADURL',"'SSH' URL is not allowed, Please enter valid 'HTTP' or 'GIT Read-only' URL"), 'bad');
return $this->redirectBack();
- }
+ }
$json = new JsonHandler($url);
$jsonData = $json->cloneJson();
-
+
if(!array_key_exists('ErrorMsg', $jsonData)) {
$this->latestReleasePackage = $jsonData['LatestRelease'];
if($this->isNewExtension($url)) {
@@ -62,7 +62,7 @@ public function submitUrl($data, $form) {
if($saveVersion){
$this->extensionType = ExtensionData::get()->byID($id)->Type;
$this->extensionName = ExtensionData::get()->byID($id)->Name;
-
+
$this->mailData = array(
'ExtensionType' => $this->extensionType,
'ExtensionName' => $this->extensionName,
@@ -75,7 +75,7 @@ public function submitUrl($data, $form) {
$this->sendMailtoAdmin();
- $form->sessionMessage(_t('ExtensionHolder.THANKSFORSUBMITTING','Thank you for submitting "'.$this->extensionName.'" '.$this->extensionType),'good');
+ $form->sessionMessage(_t('ExtensionHolder.THANKSFORSUBMITTING','Thank you for submitting "'.$this->extensionName.'" '.$this->extensionType),'good');
return $this->redirectBack();
}
} else {
@@ -121,13 +121,13 @@ public function submitUrl($data, $form) {
} else {
$form->sessionMessage(_t('ExtensionHolder.NOJSON',"We had problems parsing your composer.json file, the parser reports: {$jsonData['ErrorMsg']} Please read our extension Submission Guide for more details and submit url again"), 'bad');
return $this->redirectBack();
- }
+ }
}
/**
- * Check if submitted module is new or old
+ * Check if submitted module is new or old
*
- * @param string $url
+ * @param string $url
* @return boolean
*/
private function isNewExtension($url) {
@@ -188,9 +188,9 @@ public function doSearch($data, $form) {
$results = $context->getResults($data)->filter(array(
'Type' => $this->extensionType,
'Accepted' => '1'
- ));
+ ));
return $this->customise(array(
- 'FormSubmitted' => $isFormSubmitted,
+ 'FormSubmitted' => $isFormSubmitted,
'ExtensionSearchResults' => $results,
'SearchTitle' => _t('SearchForm.SearchResults', 'Search Results')
));
View
6 code/page_type/Module.php
@@ -1,4 +1,4 @@
-<?php
+<?php
/**
* Acts as base class for Detailed Module Pages .
*
@@ -15,7 +15,7 @@ public function init() {
$this->type = 'Module';
}
- public function index() {
+ public function index() {
$this->redirect('modules/');
- }
+ }
}
View
22 code/page_type/ModuleHolder.php
@@ -1,12 +1,12 @@
<?php
/**
* Model for the module search page.
- *
+ *
* @package extensionmanager
*/
class ModuleHolder extends ExtensionHolder{
-
+
static $db = array(
'AddContent' => 'HTMLText',
);
@@ -15,22 +15,22 @@ class ModuleHolder extends ExtensionHolder{
array('Title' => "Modules")
);
- //copied from addons module
+ //copied from addons module
static $defaults = array(
'AddContent' => "
<h3>How do I submit a module to the SilverStripe directory?</h3>
<p>Complete and submit the form below. </p>
- <h3>What happens after I submit my module?</h3>
+ <h3>What happens after I submit my module?</h3>
- <p>Our module reviewers at SilverStripe are notified, and they will review your submission and contact you if they have questions. Please note that we are verifying that your module will install, but we won't do a full code review.</p>
+ <p>Our module reviewers at SilverStripe are notified, and they will review your submission and contact you if they have questions. Please note that we are verifying that your module will install, but we won't do a full code review.</p>
<p>You'll be notified when your module has been listed on the site. We try and approve new submissions quickly but please know that it typically takes at least 4 weeks for your module to appear on the SilverStripe website. If you have questions, please contact <a href=\"mailto:modules@silverstripe.org\">modules@silverstripe.org</a>.</p>
- <h3>What if I need to make changes to my module?</h3>
+ <h3>What if I need to make changes to my module?</h3>
<p>Once your module is listed on the SilverStripe website, you can edit it via the same submission form </p>",
-
+
);
function getCMSFields() {
@@ -51,7 +51,7 @@ public function init() {
parent::init();
$this->extensionType = 'Module';
}
-
+
/**
* Setting up the form for module submission.
*
@@ -65,14 +65,14 @@ function ModuleSubmissionForm() {
}
/**
- * Show module list on page
+ * Show module list on page
*
* @return Array .
*/
- function moduleList() {
+ function moduleList() {
$modules = ExtensionData::get()->filter(array('Type' => 'Module', 'Accepted' => '1'))->sort('Name');
return $modules;
- }
+ }
/**
* Show Module Search form.
View
6 code/page_type/Theme.php
@@ -1,4 +1,4 @@
-<?php
+<?php
/**
* Acts as base class for Detailed Theme Pages .
@@ -16,7 +16,7 @@ public function init() {
$this->type = 'Theme';
}
- public function index() {
+ public function index() {
$this->redirect('themes/');
- }
+ }
}
View
16 code/page_type/ThemeHolder.php
@@ -13,22 +13,22 @@ class ThemeHolder extends ExtensionHolder {
array('Title' => "Themes")
);
- //copied from addons module
+ //copied from addons module
static $defaults = array(
'AddContent' => "
<h3>How do I submit a Theme to the SilverStripe directory?</h3>
<p>Complete and submit the form below. </p>
- <h3>What happens after I submit my Theme?</h3>
+ <h3>What happens after I submit my Theme?</h3>
- <p>Our Theme reviewers at SilverStripe are notified, and they will review your submission and contact you if they have questions. Please note that we are verifying that your Theme will install, but we won't do a full code review.</p>
+ <p>Our Theme reviewers at SilverStripe are notified, and they will review your submission and contact you if they have questions. Please note that we are verifying that your Theme will install, but we won't do a full code review.</p>
<p>You'll be notified when your Theme has been listed on the site. We try and approve new submissions quickly but please know that it typically takes at least 4 weeks for your Theme to appear on the SilverStripe website. If you have questions, please contact <a href=\"mailto:Themes@silverstripe.org\">Themes@silverstripe.org</a>.</p>
- <h3>What if I need to make changes to my Theme?</h3>
+ <h3>What if I need to make changes to my Theme?</h3>
<p>Once your Theme is listed on the SilverStripe website, you can edit it via the same submission form </p>",
-
+
);
function getCMSFields() {
@@ -44,7 +44,7 @@ function getCMSFields() {
* @package extensionmanager
*/
class ThemeHolder_Controller extends ExtensionHolder_Controller {
-
+
static $urlhandlers = array(
'addnew' => 'addnew',
);
@@ -67,11 +67,11 @@ function ThemeSubmissionForm() {
}
/**
- * Show module list on page
+ * Show module list on page
*
* @return Array .
*/
- function themeList() {
+ function themeList() {
$themes = ExtensionData::get()->filter(array('Type' => 'Theme','Accepted' => '1'))->sort('Name');
return $themes;
}
View
6 code/page_type/Widget.php
@@ -1,4 +1,4 @@
-<?php
+<?php
/**
* Acts as base class for Detailed Widget Pages .
@@ -16,7 +16,7 @@ public function init() {
$this->type = 'Widget';
}
- public function index() {
- $this->redirect('widgets/');
+ public function index() {
+ $this->redirect('widgets/');
}
}
View
18 code/page_type/WidgetHolder.php
@@ -1,7 +1,7 @@
<?php
/**
* Model for the widget search page.
- *
+ *
* @package extensionmanager
*/
class WidgetHolder extends ExtensionHolder {
@@ -13,22 +13,22 @@ class WidgetHolder extends ExtensionHolder {
array('Title' => "Widgets")
);
- //copied from addons module
+ //copied from addons module
static $defaults = array(
'AddContent' => "
<h3>How do I submit a Widget to the SilverStripe directory?</h3>
<p>Complete and submit the form below. </p>
- <h3>What happens after I submit my Widget?</h3>
+ <h3>What happens after I submit my Widget?</h3>
- <p>Our Widget reviewers at SilverStripe are notified, and they will review your submission and contact you if they have questions. Please note that we are verifying that your Widget will install, but we won't do a full code review.</p>
+ <p>Our Widget reviewers at SilverStripe are notified, and they will review your submission and contact you if they have questions. Please note that we are verifying that your Widget will install, but we won't do a full code review.</p>
<p>You'll be notified when your Widget has been listed on the site. We try and approve new submissions quickly but please know that it typically takes at least 4 weeks for your Widget to appear on the SilverStripe website. If you have questions, please contact <a href=\"mailto:Widgets@silverstripe.org\">Widgets@silverstripe.org</a>.</p>
- <h3>What if I need to make changes to my Widget?</h3>
+ <h3>What if I need to make changes to my Widget?</h3>
<p>Once your Widget is listed on the SilverStripe website, you can edit it via the same submission form </p>",
-
+
);
function getCMSFields() {
@@ -47,7 +47,7 @@ class WidgetHolder_Controller extends ExtensionHolder_Controller {
static $urlhandlers = array(
'addnew' => 'addnew',
- );
+ );
public function init() {
parent::init();
@@ -67,11 +67,11 @@ function WidgetSubmissionForm() {
}
/**
- * Show widget list on page
+ * Show widget list on page
*
* @return Array .
*/
- function widgetList() {
+ function widgetList() {
$modules = ExtensionData::get()->filter(array('Type' => 'Widget','Accepted' => '1'))->sort('Name');
return $modules;
}
View
10 code/task/CreatePackageJsonTask.php
@@ -1,6 +1,6 @@
<?php
/**
- * Task for creating new package.json after every 15 Minutes.
+ * Task for creating new package.json after every 15 Minutes.
*
* @package extensionmanager
*/
@@ -8,7 +8,7 @@
use Composer\package\Dumper\ArrayDumper;
class CreatePackageJsonTask extends QuarterHourlyTask {
-
+
/**
* Check that the user has appropriate permissions to execute this task
*/
@@ -48,18 +48,18 @@ function CreatePackageJson() {
if(!empty($repo['packages'])) {
$packagesJsonData = Convert::array2json($repo);
$packageJsonFile = fopen(BASE_PATH.DIRECTORY_SEPARATOR.$filename, 'w');
- fwrite($packageJsonFile, $packagesJsonData);
+ fwrite($packageJsonFile, $packagesJsonData);
fclose($packageJsonFile);
echo "<br /><br /><strong> package.json file created successfully...</strong><br />";
} else {
throw new InvalidArgumentException('package.json file could not be created');
}
}
- }
+ }
}
/**
- * For Manually Updating packages.json file.
+ * For Manually Updating packages.json file.
*
* @package extensionmanager
*/
View
10 code/task/JsonUpdateTask.php
@@ -1,11 +1,11 @@
<?php
/**
- * For Updating composer.Json data of extensions.
+ * For Updating composer.Json data of extensions.
*
* @package extensionmanager
*/
class JsonUpdateTask extends DailyTask {
-
+
/**
* Check that the user has appropriate permissions to execute this task
*/
@@ -49,14 +49,14 @@ function updateJson() {
}
}
echo "<br><br><strong>{$count} Repositories processed...</strong><br>";
- } else {
+ } else {
throw new InvalidArgumentException('No Extension found...');
}
- }
+ }
}
/**
- * For Manually Updating composer.Json data of extensions.
+ * For Manually Updating composer.Json data of extensions.
*
* @package extensionmanager
*/
View
8 composer.json
@@ -1,4 +1,4 @@
-{
+{
"minimum-stability": "dev",
"name": "silverstripe/extensionmanager",
"description": "The SilverStripe.org Extension Manager Module (unstable version)",
@@ -12,15 +12,15 @@
"email": "viky2130@gmail.com"
}
],
-
+
"require": {
"php": ">=5.3.3",
"composer/composer": "dev-master",
"composer/installers": "*"
},
-
+
"extra":
{
"snapshot" : "http://openbees.org/images/extenisonmanager.png"
}
-}
+}
View
8 docs/en/developers/data-flow.md
@@ -1,4 +1,4 @@
-# Data Flow Between Classes
+# Data Flow Between Classes
Data flow between classes can be explained by the following block-diagram of classes.
@@ -8,7 +8,7 @@
Step 1 - User submits Url in [Form](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/page_type/ExtensionHolder.php#L22) of their Module Repository using [ModuleHolder](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/page_type/ModuleHolder.php) Page which is extended from [ExtensionHolder](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/page_type/ExtensionHolder.php) Page class.
- Step 2 - Form action first confirms if module is new or author is updating his module then it creates object of [JsonHandler](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/control/JsonHandler.php) class and calls [cloneJson](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/control/JsonHandler.php#L32) function with submitted url as parameter.
+ Step 2 - Form action first confirms if module is new or author is updating his module then it creates object of [JsonHandler](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/control/JsonHandler.php) class and calls [cloneJson](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/control/JsonHandler.php#L32) function with submitted url as parameter.
Step 3 & 4 - cloneJson function in JsonHandler class passes submitted url to Composer system which returns data of all versions as an object.
@@ -18,10 +18,10 @@
Step 7 - saveJson function first stores all the data in respective fields of [ExtensionData](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/control/ExtensionData.php) class and checks if all the required fields are available in composer.json file of submitted module.
- Step 9,10,11,12,13 - saveJson function then stores data in [related tables](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/control/ExtensionData.php#L89) of ExtensionData class like [versions](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/control/ExtensionVersion.php) , [keywords](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/control/ExtensionKeywords.php), [authors info](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/control/ExtensionAuthorController.php), [snapshot](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/control/ExtensionSnapshot.php), of module.
+ Step 9,10,11,12,13 - saveJson function then stores data in [related tables](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/control/ExtensionData.php#L89) of ExtensionData class like [versions](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/control/ExtensionVersion.php) , [keywords](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/control/ExtensionKeywords.php), [authors info](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/control/ExtensionAuthorController.php), [snapshot](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/control/ExtensionSnapshot.php), of module.
Step 14,15,16 - After successfull submission it sends mail about new submission to module moderators and displays submitted/updated message to user.
-## Fetch Data
+## Fetch Data
Step A & B - [show()](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/control/ExtensionData.php#L197) function in ExtensionData class which is responible for providing data to [Module_show](https://github.com/vikas-srivastava/extensionmanager/blob/master/templates/Layout/Module_show.ss),[theme_show](https://github.com/vikas-srivastava/extensionmanager/blob/master/templates/Layout/Theme_show.ss), [widget_show](https://github.com/vikas-srivastava/extensionmanager/blob/master/templates/Layout/Widget_show.ss) templates. By using some [Url Rules](https://github.com/vikas-srivastava/extensionmanager/blob/master/_config.php#L16) show() function provides data to these templates on load of [Module](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/page_type/Module.php),[Theme](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/page_type/Theme.php),[Widgets](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/page_type/Widget.php) classes.
View
4 docs/en/getting-started/getting-started.md
@@ -1,4 +1,4 @@
-# Getting started with SilverStripe's Extension Manager Module
+# Getting started with SilverStripe's Extension Manager Module
## Requirements
@@ -15,7 +15,7 @@ To install this module:
3. Go to root of module ``cd path/to/extensionmanager``.
-4. Install composer binary with ``curl -s http://getcomposer.org/installer | php`` [see here for global installation](https://github.com/composer/composer#composer---package-management-for-php).
+4. Install composer binary with ``curl -s http://getcomposer.org/installer | php`` [see here for global installation](https://github.com/composer/composer#composer---package-management-for-php).
5. Run following command for installing dependencies of this module ``php composer.phar install``.
View
12 docs/en/topics/add-search-pages.md
@@ -1,17 +1,17 @@
-# Add Search Pages
+# Add Search Pages
-We will create 1 page for each extension type (Module/Widget/Theme). These pages will act as search pages. Search form contains Name, Category, Keywords and SilverStripe Compatibilty filters. Some other blocks on this page contains are 'New Extensions', 'Search Reasult', 'Disqus Comments', 'Submit New Module/Widget/Theme' [see wireframes](https://docs.google.com/open?id=0B8utgor20eMdQ0pkcEt1RWhnUDQ).
+We will create 1 page for each extension type (Module/Widget/Theme). These pages will act as search pages. Search form contains Name, Category, Keywords and SilverStripe Compatibilty filters. Some other blocks on this page contains are 'New Extensions', 'Search Reasult', 'Disqus Comments', 'Submit New Module/Widget/Theme' [see wireframes](https://docs.google.com/open?id=0B8utgor20eMdQ0pkcEt1RWhnUDQ).
-## Add Modules page:
+## Add Modules page:
-Go to CMS and publish draft Extension pages (Modules/Themes/Widgets), created during installation of extensionmanager module.
+Go to CMS and publish draft Extension pages (Modules/Themes/Widgets), created during installation of extensionmanager module.
-![Select Page type](https://github.com/vikas-srivastava/extensionmanager/raw/master/docs/img/publish-extension-page.png)
+![Select Page type](https://github.com/vikas-srivastava/extensionmanager/raw/master/docs/img/publish-extension-page.png)
Now search pages of Module/Theme/Widgets are ready for use.
![Module Search Page ](https://github.com/vikas-srivastava/extensionmanager/raw/master/docs/img/module-search-page.png)
-
+
![Theme Search Page](https://github.com/vikas-srivastava/extensionmanager/raw/master/docs/img/theme-search-page.png)
![Widgets Search Page](https://github.com/vikas-srivastava/extensionmanager/raw/master/docs/img/widget-search-page.png)
View
8 docs/en/topics/detail-module-page.md
@@ -1,4 +1,4 @@
-# Detail Extension Page
+# Detail Extension Page
After approving Extension we can get a detail page for extension. For creating detail page we are using coustom controller for each extension type ( [Module](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/page_type/Module.php) / [widget](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/page_type/Widget.php) / [Theme](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/page_type/Theme.php)).
@@ -8,7 +8,7 @@ Using listed module link we can go to detail page.
![Detail Module page](https://github.com/vikas-srivastava/extensionmanager/raw/master/docs/img/detail-module-page.png)
-### Subversion Data
+### Subversion Data
Using composer we can get detail of subversion and there gisturl.
@@ -24,11 +24,11 @@ Disqus comments System.
Right now we have similar kind of data on themes/widgets pages but later we will modify them according to their design.
-Theme Page:
+Theme Page:
![Detail Module page](https://github.com/vikas-srivastava/extensionmanager/raw/master/docs/img/theme-page.png)
-Widget Page:
+Widget Page:
![Detail Module page](https://github.com/vikas-srivastava/extensionmanager/raw/master/docs/img/widget-page.png)
View
2  docs/en/topics/submit-extension.md
@@ -16,7 +16,7 @@ But recently submitted module is not appearing because its yet not accepted.
![Module listing](https://github.com/vikas-srivastava/extensionmanager/raw/master/docs/img/not-listing-newly-submitted-module.png)
-But Admin have rights to access these pages even before approval
+But Admin have rights to access these pages even before approval
![unApproved Module](https://github.com/vikas-srivastava/extensionmanager/raw/master/docs/img/unapproved-module.png)
View
6 docs/en/topics/update-extension.md
@@ -1,16 +1,16 @@
-# Update Extension
+# Update Extension
Update of extension can be done in either of two methods.
## 1. Using Extension Submission Form
- By submitting url of repository again in respective extension submission form. Module will detect [automatically](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/page_type/ExtensionHolder.php#L85) whether it is new module or old one. If module is already submitted form handler will run update function for old extensions.
+ By submitting url of repository again in respective extension submission form. Module will detect [automatically](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/page_type/ExtensionHolder.php#L85) whether it is new module or old one. If module is already submitted form handler will run update function for old extensions.
![Extension submission form](https://github.com/vikas-srivastava/extensionmanager/raw/master/docs/img/module-update-form.png)
![Extension submission form](https://github.com/vikas-srivastava/extensionmanager/raw/master/docs/img/update-by-form.png)
-## 2. By Running scheduled task.
+## 2. By Running scheduled task.
We have created one scheduled task class [JsonUpdateTask](https://github.com/vikas-srivastava/extensionmanager/blob/master/code/task/JsonUpdateTask.php#L1) which can be run manually or by using cron job.
View
10 templates/Email/ExtensionApproved.ss
@@ -1,9 +1,9 @@
-<html>
+<html>
<body>
-
+
<p style="font-size:1.4em;color:#666;" > Hello !</p>
-
- <p style="font-size:1.4em;color:#222;" > We are pleased to inform you that your $ExtensionType submitted by $SubmittedBy has been approved by $ExtensionType moderators. Please check your $ExtensionType detail page <a href="$ExtensionPageUrl">Here</a></P>. Feel free to send us <a href="mailto:$From">Mail</a> if something is wrong with your $ExtensionType Page.
-
+
+ <p style="font-size:1.4em;color:#222;" > We are pleased to inform you that your $ExtensionType submitted by $SubmittedBy has been approved by $ExtensionType moderators. Please check your $ExtensionType detail page <a href="$ExtensionPageUrl">Here</a></P>. Feel free to send us <a href="mailto:$From">Mail</a> if something is wrong with your $ExtensionType Page.
+
</body>
</html>
View
8 templates/Email/ExtensionSubmitted.ss
@@ -1,9 +1,9 @@
-<html>
+<html>
<body>
-
+
<p style="font-size:1.4em;color:#666;" >$Subject by <a href="mailto:$SubmittedByEmail">$SubmittedByName:</a></p>
-
+
<p style="font-size:1.4em;color:#222;" > Please review this $ExtensionType <a href="$ReviewAtUrl">Here</a>, Also check Deatil Page of $ExtensionName <a href="$DetailPageLink">Here</a></P>
-
+
</body>
</html>
View
4 templates/Includes/ExtensionSearchResult.ss
@@ -1,5 +1,5 @@
<div id="Content" class="searchResults typography">
-
+
<h1>$SearchTitle</h1>
<% if Query %>
<p class="searchQuery"><strong>You searched for &quot;{$Query}&quot;</strong></p>
@@ -40,7 +40,7 @@
<% if ExtensionSearchResults.NotLastPage %>
<a class="next" href="$ExtensionSearchResults.NextLink" title="View the next page">&rarr;</a>
<% end_if %>
- </div>
+ </div>
<p>Page $ExtensionSearchResults.CurrentPage of $ExtensionSearchResults.TotalPages</p>
</div>
<% end_if %>
View
2  templates/Layout/ExtensionHolder.ss
@@ -1,5 +1,5 @@
<div class="typography">
-
+
<div id="content">
$Content
$AddForm
View
6 templates/Layout/ModuleHolder.ss
@@ -1,8 +1,8 @@
-<div class="content-container">
+<div class="content-container">
<article>
<div class="content">$Content</div>
</article>
-
+
<div style= "float:Left; width:70%;">
<% if moduleSearch %>
<h1>Search Module</h1>
@@ -12,7 +12,7 @@
<div style = "float:Right;">
<div style= "float:Right;margin-top:50px;margin-bottom:30px;">
- <% with ModuleSubmissionForm %> $Content <br> $Form <% end_with %>
+ <% with ModuleSubmissionForm %> $Content <br> $Form <% end_with %>
</div>
<div>
View
56 templates/Layout/Module_show.ss
@@ -3,18 +3,18 @@ Right Now all module/widget/themes are look similar. But they will change later
according to diffrent design and data
-->
-<div class="content-container">
+<div class="content-container">
<div class="content">$Content</div>
-
- <% if ExtensionData %>
+
+ <% if ExtensionData %>
<ul >
- <% loop ExtensionData %>
+ <% loop ExtensionData %>
<% if $Accepted != 1 %>
<h1>This Module is yet not Approved by Module Moderators</h1>
<% end_if %>
-
+
<h1>$Name</h1>
<h3> Vendor Name : $VendorName </h3>
@@ -22,7 +22,7 @@ according to diffrent design and data
<% if $Description %>
<li>
Description : $Description
- </li>
+ </li>
<% end_if %>
<% if $Version %>
@@ -49,9 +49,9 @@ according to diffrent design and data
<li>
Category : $Category
</li>
- <% end_if %>
+ <% end_if %>
- <h3><a href="$DownloadLink.DistUrl"> Download Latest Version</a></h3>
+ <h3><a href="$DownloadLink.DistUrl"> Download Latest Version</a></h3>
<% loop ExtensionData %>
@@ -72,17 +72,17 @@ according to diffrent design and data
<li>
<a href="$SupportSource">Support Source</a>
</li>
- <% end_if %>
+ <% end_if %>
<% if $SupportForum %>
<li>
- <a href="$SupportForum">Support Forum</a>
+ <a href="$SupportForum">Support Forum</a>
</li>
<% end_if %>
<% if $SupportWiki %>
<li>
- <a href="$SupportWiki">Support Wiki</a>
+ <a href="$SupportWiki">Support Wiki</a>
</li>
<% end_if %>
@@ -99,16 +99,16 @@ according to diffrent design and data
<% if $Keywords %>
<h3>Keywords</h3>
<% loop Keywords %>
- $KeywordName
- <% end_loop %>
+ $KeywordName
+ <% end_loop %>
<% end_if %>
-
+
<% if $SubmittedBy %>
<h3>Submitted By</h3>
<li>
Submitted By : $SubmittedBy
</li>
- <% end_if %>
+ <% end_if %>
<% if $AuthorsDetail %>
<h2>Authors Detail</h2>
@@ -119,51 +119,51 @@ according to diffrent design and data
<li>
Author Name : $Name
</li>
- <% end_if %>
+ <% end_if %>
<% if $Email %>
<li>
Author Email : $Email
</li>
- <% end_if %>
+ <% end_if %>
<% if $HomePage %>
<li>
- Author HomePage :
+ Author HomePage :
<a href="$AuthorHomePage "> $HomePage </a>
<li>
<% end_if %>
<% if $Role %>
<li>
- Author Email : $Role
+ Author Email : $Role
</li>
- <% end_if %>
+ <% end_if %>
</ul>
</p>
- <% end_loop %>
- <% end_if %>
+ <% end_loop %>
+ <% end_if %>
<% if VersionData %>
<h2>Subversion Detail</h2>
<% loop VersionData %>
- <p>
- <h3>$PrettyVersion </h3>
+ <p>
+ <h3>$PrettyVersion </h3>
<a href="$DistUrl"> Download $DistType</a><br>
- <a href="$SourceUrl"> Source Url</a><br><br>
+ <a href="$SourceUrl"> Source Url</a><br><br>
</p>
<% end_loop %>
<% end_if %>
<!-- Resize according to theme -->
<% if $SnapShot %>
- <img src="$SnapShot.Url" border="2" style="border:2px solid black;max-width:40%;"alt="$SnapShot.Name"/>
+ <img src="$SnapShot.Url" border="2" style="border:2px solid black;max-width:40%;"alt="$SnapShot.Name"/>
<% end_if %>
-
+
<div style = "margin-top:30px;">
<% if $Disqus %>
$Disqus
<% end_if %>
</div>
-
+
</div>
View
8 templates/Layout/ThemeHolder.ss
@@ -1,13 +1,13 @@
-<div class="content-container">
+<div class="content-container">
<article>
<div class="content">$Content</div>
</article>
-
+
<div style= "float:Left; width:70%;">
-
+
<h1>Search Theme</h1>
<% include ExtensionSearchForm %>
-
+
</div>
<div style = "float:Right;">
View
60 templates/Layout/Theme_show.ss
@@ -3,13 +3,13 @@ Right Now all module/widget/themes are look similar. But they will change later
according to diffrent design and data
-->
-<div class="content-container">
+<div class="content-container">
<div class="content">$Content</div>
-
- <% if ExtensionData %>
+
+ <% if ExtensionData %>
<ul >
- <% loop ExtensionData %>
+ <% loop ExtensionData %>
<% if $Accepted != 1 %>
<h1>This Theme is yet not Approved by Theme Moderators</h1>
@@ -22,7 +22,7 @@ according to diffrent design and data
<% if $Description %>
<li>
Description : $Description
- </li>
+ </li>
<% end_if %>
<% if $Version %>
@@ -49,13 +49,13 @@ according to diffrent design and data
<li>
Category : $Category
</li>
- <% end_if %>
+ <% end_if %>
- <h3><a href="$DownloadLink.DistUrl"> Download Latest Version</a></h3>
+ <h3><a href="$DownloadLink.DistUrl"> Download Latest Version</a></h3>
<% loop ExtensionData %>
-
+
<h2>Support </h2>
<% if $SupportEmail %>
<li>
@@ -73,17 +73,17 @@ according to diffrent design and data
<li>
<a href="$SupportSource">Support Source</a>
</li>
- <% end_if %>
+ <% end_if %>
<% if $SupportForum %>
<li>
- <a href="$SupportForum">Support Forum</a>
+ <a href="$SupportForum">Support Forum</a>
</li>
<% end_if %>
<% if $SupportWiki %>
<li>
- <a href="$SupportWiki">Support Wiki</a>
+ <a href="$SupportWiki">Support Wiki</a>
</li>
<% end_if %>
@@ -100,16 +100,16 @@ according to diffrent design and data
<% if $Keywords %>
<h3>Keywords</h3>
<% loop Keywords %>
- $KeywordName
- <% end_loop %>
+ $KeywordName
+ <% end_loop %>
<% end_if %>
-
+
<% if $SubmittedBy %>
<h3>Submitted By</h3>
<li>
Submitted By : $SubmittedBy
</li>
- <% end_if %>
+ <% end_if %>
<% if $AuthorsDetail %>
<h2>Authors Detail</h2>
@@ -120,51 +120,51 @@ according to diffrent design and data
<li>
Author Name : $Name
</li>
- <% end_if %>
+ <% end_if %>
<% if $Email %>
<li>
Author Email : $Email
</li>
- <% end_if %>
+ <% end_if %>
<% if $HomePage %>
<li>
- Author HomePage :
+ Author HomePage :
<a href="$AuthorHomePage "> $HomePage </a>
<li>
<% end_if %>
<% if $Role %>
<li>
- Author Email : $Role
+ Author Email : $Role
</li>
- <% end_if %>
+ <% end_if %>
</ul>
</p>
- <% end_loop %>
- <% end_if %>
+ <% end_loop %>
+ <% end_if %>
<% if VersionData %>
<h2>Subversion Detail</h2>
<% loop VersionData %>
- <p>
- <h3>$PrettyVersion </h3>
+ <p>
+ <h3>$PrettyVersion </h3>
<a href="$DistUrl"> Download $DistType</a><br>
- <a href="$SourceUrl"> Source Url</a><br><br>
+ <a href="$SourceUrl"> Source Url</a><br><br>
</p>
<% end_loop %>
- <% end_if %>
-
+ <% end_if %>
+
<!-- Resize according to theme -->
<% if $SnapShot %>
- <img src="$SnapShot.Url" border="2" style="border:2px solid black;max-width:40%;"alt="$SnapShot.Name"/>
+ <img src="$SnapShot.Url" border="2" style="border:2px solid black;max-width:40%;"alt="$SnapShot.Name"/>
<% end_if %>
-
+
<div style = "margin-top:30px;">
<% if $Disqus %>
$Disqus
<% end_if %>
</div>
-
+
</div>
View
5 templates/Layout/WidgetHolder.ss
@@ -1,8 +1,8 @@
-<div class="content-container">
+<div class="content-container">
<article>
<div class="content">$Content</div>
</article>
-
+
<div style= "float:Left; width:70%;">
<% if widgetSearch %>
<h1>Search Widget</h1>
@@ -45,5 +45,4 @@
<% include ExtensionSearchResult %>
<% end_if %>
</div>
-
</div>
View
60 templates/Layout/Widget_show.ss
@@ -3,13 +3,13 @@ Right Now all module/widget/themes are look similar. But they will change later
according to diffrent design and data
-->
-<div class="content-container">
+<div class="content-container">
<div class="content">$Content</div>
-
- <% if ExtensionData %>
+
+ <% if ExtensionData %>
<ul >
- <% loop ExtensionData %>
+ <% loop ExtensionData %>
<% if $Accepted != 1 %>
<h1>This Widget is yet not Approved by Widget Moderators</h1>
@@ -22,7 +22,7 @@ according to diffrent design and data
<% if $Description %>
<li>
Description : $Description
- </li>
+ </li>
<% end_if %>
<% if $Version %>
@@ -49,13 +49,13 @@ according to diffrent design and data
<li>
Category : $Category
</li>
- <% end_if %>
+ <% end_if %>
- <h3><a href="$DownloadLink.DistUrl"> Download Latest Version</a></h3>
+ <h3><a href="$DownloadLink.DistUrl"> Download Latest Version</a></h3>
<% loop ExtensionData %>
-
+
<h2>Support </h2>
<% if $SupportEmail %>
<li>
@@ -73,17 +73,17 @@ according to diffrent design and data
<li>
<a href="$SupportSource">Support Source</a>
</li>
- <% end_if %>
+ <% end_if %>
<% if $SupportForum %>
<li>
- <a href="$SupportForum">Support Forum</a>
+ <a href="$SupportForum">Support Forum</a>
</li>
<% end_if %>
<% if $SupportWiki %>
<li>
- <a href="$SupportWiki">Support Wiki</a>
+ <a href="$SupportWiki">Support Wiki</a>
</li>
<% end_if %>
@@ -100,16 +100,16 @@ according to diffrent design and data
<% if $Keywords %>
<h3>Keywords</h3>
<% loop Keywords %>
- $KeywordName
- <% end_loop %>
+ $KeywordName
+ <% end_loop %>
<% end_if %>
-
+
<% if $SubmittedBy %>
<h3>Submitted By</h3>
<li>
Submitted By : $SubmittedBy
</li>
- <% end_if %>
+ <% end_if %>
<% if $AuthorsDetail %>
<h2>Authors Detail</h2>
@@ -120,51 +120,51 @@ according to diffrent design and data
<li>
Author Name : $Name
</li>
- <% end_if %>
+ <% end_if %>
<% if $Email %>
<li>
Author Email : $Email
</li>
- <% end_if %>
+ <% end_if %>
<% if $HomePage %>
<li>
- Author HomePage :
+ Author HomePage :
<a href="$AuthorHomePage "> $HomePage </a>
<li>
<% end_if %>
<% if $Role %>
<li>
- Author Email : $Role
+ Author Email : $Role
</li>
- <% end_if %>
+ <% end_if %>
</ul>
</p>
- <% end_loop %>
- <% end_if %>
+ <% end_loop %>
+ <% end_if %>
<% if VersionData %>
<h2>Subversion Detail</h2>
<% loop VersionData %>
- <p>
- <h3>$PrettyVersion </h3>
+ <p>
+ <h3>$PrettyVersion </h3>
<a href="$DistUrl"> Download $DistType</a><br>
- <a href="$SourceUrl"> Source Url</a><br><br>
+ <a href="$SourceUrl"> Source Url</a><br><br>
</p>
<% end_loop %>
- <% end_if %>
-
+ <% end_if %>
+
<!-- Resize according to theme -->
<% if $SnapShot %>
- <img src="$SnapShot.Url" border="2" style="border:2px solid black;max-width:40%;"alt="$SnapShot.Name"/>
+ <img src="$SnapShot.Url" border="2" style="border:2px solid black;max-width:40%;"alt="$SnapShot.Name"/>
<% end_if %>
-
+
<div style = "margin-top:30px;">
<% if $Disqus %>
$Disqus
<% end_if %>
</div>
-
+
</div>
View
26 tests/MockComposerClasses.php
@@ -7,18 +7,18 @@
*/
class MockVcsRepositoryWithNameAbsent {
-
+
function getPackages() {
$packages = new MockMemoryPackageWithNameAbsent();
return array($packages);
}
- function findPackage() {
+ function findPackage() {
}
}
class MockMemoryPackageWithNameAbsent {
-
+
function getPrettyName() {
}
@@ -27,18 +27,18 @@ function getPrettyVersion() {
}
class MockVcsRepositoryWithWrongNameFormat {
-
+
function getPackages() {
$packages = new MockMemoryPackageWithWrongNameFormat();
return array($packages);
}
- function findPackage() {
+ function findPackage() {
}
}
class MockMemoryPackageWithWrongNameFormat {
-
+
function getPrettyName() {
return 'silverstripe\@#cms';
}
@@ -48,18 +48,18 @@ function getPrettyVersion() {
}
class MockVcsRepositoryWithCapitalLattersInName {
-
+
function getPackages() {
$packages = new MockMemoryPackageWithCapitalLattersInName();
return array($packages);
}
- function findPackage() {
+ function findPackage() {
}
}
class MockMemoryPackageWithCapitalLattersInName {
-
+
function getPrettyName() {
return 'SilverStripe/Cms';
}
@@ -69,7 +69,7 @@ function getPrettyVersion() {
}
class MockVCSRepositoryWithRealValues {
-
+
function getPackages() {
$package0 = new MockMemoryPackageTagVersion();
$package1 = new MockMemoryPackageMasterBranch();
@@ -80,13 +80,13 @@ function findPackage($name, $version) {
foreach ($this->getPackages() as $package) {
if ($name === $package->getName() && $version === $package->getVersion()) {
return $package;
- }
+ }
}
}
}
class MockMemoryPackageTagVersion {
-
+
function getPrettyName() {
return 'silverstripe/cms';
}
@@ -101,7 +101,7 @@ function getVersion() {
}
class MockMemoryPackageMasterBranch {
-
+
function getPrettyName() {
return 'silverstripe/cms';
}
View
2  tests/control/ExtensionAuthorTest.php
@@ -45,6 +45,6 @@ function testStoreAuthorsInfoException() {
$obj = $this->objFromFixture('ExtensionData', 'testmodule');
$extensionId = $obj->ID;
$ExtensionAuthorController = new ExtensionAuthorController();
- $memberId = $ExtensionAuthorController->storeAuthorsInfo($authorsRawData,$extensionId);
+ $memberId = $ExtensionAuthorController->storeAuthorsInfo($authorsRawData,$extensionId);
}
}
View
4 tests/control/ExtensionSnapshotTest.php
@@ -8,7 +8,7 @@ class ExtensionSnapshotTest extends SapphireTest {
static $fixture_file = 'extensionmanager/tests/ExtensionManagerTest.yml';
function testSaveSnapshot() {
-
+
$obj = $this->objFromFixture('ExtensionData', 'testmodule');
$realUrl = 'http://openbees.org/images/Demo.jpg';
@@ -28,4 +28,4 @@ function testSaveSnapshotException() {
ExtensionSnapshot::saveSnapshot($fakeUrl, $obj->Name);
}
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.