Skip to content

Commit

Permalink
Inclui SciELO Data na listagem de coleções
Browse files Browse the repository at this point in the history
O SciELO Data foi incluído na mesma sessão que SciELO Preprints, que foi
renomeada para Servidores e Repositórios. Foram feitos ajustes nos nomes
das classes CSS de forma a manter consistência com as modificações.
  • Loading branch information
Gustavo Fonseca authored and gustavofonseca committed Mar 2, 2021
1 parent 101fe13 commit 91bf370
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 13 deletions.
2 changes: 1 addition & 1 deletion application/language/english/scielo_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
$lang['journals_singular'] = 'journal';
$lang['journals'] = 'journals';
$lang['books'] = 'Books';
$lang['preprints'] = 'Preprints';
$lang['servers_and_repos'] = 'Servers and Repositories';
$lang['journals_list'] = 'Journals';
$lang['development_list'] = 'In development';
$lang['discontinued_list'] = 'Discontinued';
Expand Down
2 changes: 1 addition & 1 deletion application/language/portuguese-brazilian/scielo_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
$lang['journals_singular'] = 'periódico';
$lang['journals'] = 'periódicos';
$lang['books'] = 'Livros';
$lang['preprints'] = 'Preprints';
$lang['servers_and_repos'] = 'Servidores e Repositórios';
$lang['journals_list'] = 'Periódicos';
$lang['development_list'] = 'Em desenvolvimento';
$lang['discontinued_list'] = 'Descontinuadas';
Expand Down
2 changes: 1 addition & 1 deletion application/language/spanish/scielo_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
$lang['journals_singular'] = 'revista';
$lang['journals'] = 'revistas';
$lang['books'] = 'Libros';
$lang['preprints'] = 'Preprints';
$lang['servers_and_repos'] = 'Servidores y Repositorios';
$lang['journals_list'] = 'Revistas';
$lang['development_list'] = 'En desarrollo';
$lang['discontinued_list'] = 'Discontinuadas';
Expand Down
20 changes: 20 additions & 0 deletions application/models/Collections.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ class Collections
*/
private $preprints_list = array();

/**
* List of all the data used in the collections repositories section.
*
* @var array
*/
private $repositories_list = array();

/**
* List of all the data used in the others collections section.
*
Expand Down Expand Up @@ -124,6 +131,17 @@ public function get_preprints_list()
return $this->preprints_list;
}

/**
* Returns the repositories list.
*
* @return array
*/
public function get_repositories_list()
{

return $this->repositories_list;
}

/**
* Returns the journals list.
*
Expand Down Expand Up @@ -219,6 +237,8 @@ private function set_collection_lists()
$this->books_list[] = (object)$collection;
} else if($collection['type'] == 'preprints') {
$this->preprints_list[] = (object)$collection;
} else if($collection['type'] == 'repositories') {
$this->repositories_list[] = (object)$collection;
}
} else {
if ($collection['type'] == 'journals') {
Expand Down
12 changes: 6 additions & 6 deletions application/views/partials/collections.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@
<?php endforeach; ?>

<?php
// Preprints
// Servidores e repositórios
$counter = 0;
foreach ($this->Collections->get_preprints_list() as $key => $preprint) :
foreach (array_merge($this->Collections->get_repositories_list(), $this->Collections->get_preprints_list()) as $key => $server_or_repo) :
?>
<dd class="scielo-preprints scielo-preprints-no-data <?php if($counter == 0):?> first-node-collection <?php endif;?>">
<dd class="scielo-servers-repos scielo-servers-repos-no-data <?php if($counter == 0):?> first-node-collection <?php endif;?>">
<?php if($counter++ == 0):?>
<h3><?= lang('preprints') ?></h3>
<h3><?= lang('servers_and_repos') ?></h3>
<?php endif;?>
<a href="https://<?= $preprint->domain ?>">
<h4><?= $preprint->name[$lang_index] ?></h4>
<a href="https://<?= $server_or_repo->domain ?>">
<h4><?= $server_or_repo->name[$lang_index] ?></h4>
</a>
</dd>
<?php endforeach; ?>
Expand Down
8 changes: 4 additions & 4 deletions static/sass/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ section{
}

&.scielo-books,
&.scielo-preprints,
&.scielo-servers-repos,
&.flag-generic,
&.flag-spa,
&.flag-wid{ // genericos X
Expand All @@ -466,7 +466,7 @@ section{
margin-top:-2px;
}

&.scielo-preprints-no-data,
&.scielo-servers-repos-no-data,
&.scielo-books-no-data{
h4{
margin-top:.8rem;
Expand Down Expand Up @@ -612,7 +612,7 @@ section{
}


&.scielo-preprints-no-data,
&.scielo-servers-repos-no-data,
&.scielo-books-no-data{
&::before{
margin-top: 27px;
Expand Down Expand Up @@ -649,7 +649,7 @@ section{
margin-top: 22px;
}

&.scielo-preprints-no-data,
&.scielo-servers-repos-no-data,
&.scielo-books-no-data{
&::before{
margin-top: 26px;
Expand Down

0 comments on commit 91bf370

Please sign in to comment.