From 03ff4baa06dfb0dd2682128a7fa2fa719783eee5 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sun, 10 Sep 2017 16:01:48 -0700 Subject: [PATCH 1/2] Replace strings with constants --- controller/index_controller.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/controller/index_controller.php b/controller/index_controller.php index 41c01f13..e18591fc 100644 --- a/controller/index_controller.php +++ b/controller/index_controller.php @@ -31,21 +31,21 @@ public function index() } // Generate latest ideas - $ideas = $this->ideas->get_ideas(self::NUM_IDEAS, 'date', 'DESC'); + $ideas = $this->ideas->get_ideas(self::NUM_IDEAS, ideas::SORT_DATE, 'DESC'); $this->assign_template_block_vars('latest_ideas', $ideas); // Generate top ideas - $ideas = $this->ideas->get_ideas(self::NUM_IDEAS, 'top', 'DESC'); + $ideas = $this->ideas->get_ideas(self::NUM_IDEAS, ideas::SORT_TOP, 'DESC'); $this->assign_template_block_vars('top_ideas', $ideas); // Generate recently implemented - $ideas = $this->ideas->get_ideas(self::NUM_IDEAS, 'date', 'DESC', ideas::$statuses['IMPLEMENTED']); + $ideas = $this->ideas->get_ideas(self::NUM_IDEAS, ideas::SORT_DATE, 'DESC', ideas::$statuses['IMPLEMENTED']); $this->assign_template_block_vars('implemented_ideas', $ideas); $this->template->assign_vars(array( - 'U_VIEW_TOP' => $this->link_helper->get_list_link('top'), - 'U_VIEW_LATEST' => $this->link_helper->get_list_link('new'), - 'U_VIEW_IMPLEMENTED'=> $this->link_helper->get_list_link('implemented'), + 'U_VIEW_TOP' => $this->link_helper->get_list_link(ideas::SORT_TOP), + 'U_VIEW_LATEST' => $this->link_helper->get_list_link(ideas::SORT_NEW), + 'U_VIEW_IMPLEMENTED'=> $this->link_helper->get_list_link(ideas::SORT_IMPLEMENTED), 'U_POST_ACTION' => $this->helper->route('phpbb_ideas_post_controller'), )); From e1be351d76156a822b978b72ead93b8e5c0946ac Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sun, 10 Sep 2017 16:02:23 -0700 Subject: [PATCH 2/2] Redesign main ideas page --- language/en/common.php | 1 - styles/prosilver/template/index_body.html | 30 ++++++++++++++--------- styles/prosilver/theme/ideas.css | 21 +++++++++++++++- 3 files changed, 38 insertions(+), 14 deletions(-) diff --git a/language/en/common.php b/language/en/common.php index 41f47b16..07257f5c 100644 --- a/language/en/common.php +++ b/language/en/common.php @@ -92,7 +92,6 @@ 'UPDATED_VOTE' => 'Successfully updated vote!', - 'VIEW_ALL' => 'View All', 'VIEW_IDEA' => 'View Idea', 'VIEW_IMPLEMENTED' => 'View all implemented ideas', 'VIEW_LATEST' => 'View all open ideas', diff --git a/styles/prosilver/template/index_body.html b/styles/prosilver/template/index_body.html index 733aa0fa..a3926fae 100644 --- a/styles/prosilver/template/index_body.html +++ b/styles/prosilver/template/index_body.html @@ -6,12 +6,17 @@

{{ lang('IDEAS_TITLE') }}

{% include 'action_bar_top.html' %} +{# TOP IDEAS #} +

{{ lang('TOP_IDEAS') }}

+{% if top_ideas %} + {{ lang('VIEW_TOP') }} +{% endif %}
  • -
    {{ lang('TOP_IDEAS') }}
    +
    {{ lang('IDEAS') }}
    {{ lang('RATING') }}
  • @@ -20,16 +25,18 @@

    {{ lang('IDEAS_TITLE') }}

    {% include 'index_list.html' %}
-{% if top_ideas %} - {{ lang('VIEW_ALL') }}… -{% endif %} +{# LATEST IDEAS #} +

{{ lang('LATEST_IDEAS') }}

+{% if latest_ideas %} + {{ lang('VIEW_LATEST') }} +{% endif %}
  • -
    {{ lang('LATEST_IDEAS') }}
    +
    {{ lang('IDEAS') }}
    {{ lang('RATING') }}
  • @@ -38,16 +45,18 @@

    {{ lang('IDEAS_TITLE') }}

    {% include 'index_list.html' %}
-{% if latest_ideas %} - {{ lang('VIEW_ALL') }}… -{% endif %} +{# IMPLEMENTED IDEAS #} +

{{ lang('IMPLEMENTED_IDEAS') }}

+{% if implemented_ideas %} + {{ lang('VIEW_IMPLEMENTED') }} +{% endif %}
  • -
    {{ lang('IMPLEMENTED_IDEAS') }}
    +
    {{ lang('IDEAS') }}
    {{ lang('RATING') }}
  • @@ -56,9 +65,6 @@

    {{ lang('IDEAS_TITLE') }}

    {% include 'index_list.html' %}
-{% if implemented_ideas %} - {{ lang('VIEW_ALL') }}… -{% endif %}

diff --git a/styles/prosilver/theme/ideas.css b/styles/prosilver/theme/ideas.css index 36bc1f61..73649bef 100644 --- a/styles/prosilver/theme/ideas.css +++ b/styles/prosilver/theme/ideas.css @@ -67,11 +67,30 @@ dd.topics { } /* Ideas Lists Styles */ -.view-all, +.view-all { + color: #536482; + float: right; + margin: 0.8em 0 0.2em; +} + .view-all:hover { color: #536482; } +.push-left { + float: left; +} + +@media (min-width: 701px) and (max-width: 950px) { + ul.topiclist dt { + margin-right: -250px; + } + + ul.topiclist dt .list-inner { + margin-right: 250px; + } +} + /* Idea Body Styles */ .votes, .successvoted {