Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Commit

Permalink
Rectify the indentation and remove @Package doc from normalizers
Browse files Browse the repository at this point in the history
  • Loading branch information
sandipbhuyan committed Jul 12, 2018
1 parent a57e1b8 commit d98ec34
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 45 deletions.
Expand Up @@ -2,16 +2,11 @@

namespace Librecores\ProjectRepoBundle\Controller;

use Librecores\ProjectRepoBundle\Entity\Project;
use Librecores\ProjectRepoBundle\Entity\ProjectClassification;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Librecores\ProjectRepoBundle\Entity\Organization;
use Librecores\ProjectRepoBundle\Entity\User;
use Librecores\ProjectRepoBundle\Form\Type\SearchQueryType;
use Librecores\ProjectRepoBundle\Form\Model\SearchQuery;

class DefaultController extends Controller
{
Expand Down Expand Up @@ -99,7 +94,7 @@ public function searchAction(Request $req)
$searchType = $req->get('type');
$searchQuery = $req->get('query');

// If searchType is null
// Search Project by default
$searchType = ($searchType === null ? 'projects' : $searchType);

return $this->render(
Expand Down
Expand Up @@ -63,53 +63,54 @@
{# User Template #}
<script type="text/html" id="user-template">
{% verbatim %}
<h2><a href="/{{ username }}">{{{ _highlightResult.username.value }}}</a></h2>
<div>{{{ _highlightResult.name.value }}}</div>
<div><i>
joined on {{{ createdAt.date }}}
</i></div>
<hr/>
<h2><a href="/{{ username }}">{{{ _highlightResult.username.value }}}</a></h2>
<div>{{{ _highlightResult.name.value }}}</div>
<div><i>
joined on {{{ createdAt.date }}}
</i></div>
<hr/>
{% endverbatim %}
</script>

{# Organization Template #}
<script type="text/html" id="organization-template">
{% verbatim %}
<h2><a href="/{{ name }}">{{{ _highlightResult.displayName.value }}}</a></h2>
<div>{{{ _highlightResult.name.value }}}</div>
<hr/>
<h2><a href="/{{ name }}">{{{ _highlightResult.displayName.value }}}</a></h2>
<div>{{{ _highlightResult.name.value }}}</div>
<hr/>
{% endverbatim %}
</script>

{# Project Template #}
<script type="text/html" id="projects-template">
{% verbatim %}
<h2><a href="/{{ parentUserName }}/{{ name }}">{{{ _highlightResult.parentUserName.value }}}/{{{ _highlightResult.name.value }}}</a></h2>
<div>{{{ _highlightResult.tagName.value }}}</div>
<div class="classification-container">
{{#_highlightResult.classifications}}
<a href="/search?query={{ value }}&type=projects" class="classifiation-tag">{{{ value }}}</a>
{{/_highlightResult.classifications}}
</div>
<div><i>
added on {{{ creationDetails }}}
</i></div>
<div class="librecores-project-list-metadata">
<span class="metric metric-lang">
<i class="fa fa-code"></i>
<span class="sr-only">Major language: </span>
{{{ _highlightResult.mostUsedLanguage.value }}}
</span>
<span class="updated">
<h2><a href="/{{ parentUserName }}/{{ name }}">{{{ _highlightResult.parentUserName.value }}}
{{{ _highlightResult.name.value }}}</a></h2>
<div>{{{ _highlightResult.tagName.value }}}</div>
<div class="classification-container">
{{#_highlightResult.classifications}}
<a href="/search?query={{ value }}&type=projects" class="classifiation-tag">{{{ value }}}</a>
{{/_highlightResult.classifications}}
</div>
<div>
<i>added on {{{ creationDetails }}}</i>
</div>
<div class="librecores-project-list-metadata">
<span class="metric metric-lang">
<i class="fa fa-code"></i>
<span class="sr-only">Major language: </span>
{{{ _highlightResult.mostUsedLanguage.value }}}
</span>
<span class="updated">
<i class="fa fa-history"></i> Updated {{{ activityDetails }}}
</span>
</div>
<hr/>
</span>
</div>
<hr/>
{% endverbatim %}
</script>
{% endblock %}
{% endblock %}

{% block javascripts %}
{% block javascripts %}
{{ parent() }}
{% javascripts
'assets/js/instantsearch.js'
Expand All @@ -120,8 +121,6 @@
{% endblock %}

{% block pagejs %}
{# do not use autofocus attribute to work around FF bug 712130 (FOUC) #}

$(function() {
searchFunctions();
options = {
Expand Down
Expand Up @@ -10,8 +10,6 @@
* This class normalizes the Organizations for getting indexed in algolia
*
* @author Sandip Kumar Bhuyan <sandipbhuyan@gmail.com>
*
* @package Librecores\ProjectRepoBundle\Serializer\Normalizer
*/
class OrganizationNormalizer implements NormalizerInterface
{
Expand Down
Expand Up @@ -10,8 +10,6 @@
* This class normalizes the Projects for getting indexed in algolia
*
* @author Sandip Kumar Bhuyan <sandipbhuyan@gmail.com>
*
* @package Librecores\ProjectRepoBundle\Serializer\Normalizer
*/
class ProjectNormalizer implements NormalizerInterface
{
Expand Down
Expand Up @@ -10,8 +10,6 @@
* This class normalize the users for getting indexed in algolia.
*
* @author Sandip Kumar Bhuyan <sandipbhuyan@gmail.com>
*
* @package Librecores\ProjectRepoBundle\Serializer\Normalizer
*/
class UserNormalizer implements NormalizerInterface
{
Expand Down

0 comments on commit d98ec34

Please sign in to comment.