Project

General

Profile

Actions

Enhancement(機能追加・改善) #2657

open

携帯版でコミュニティ検索ページに「コミュニティ説明文」を追加する

Added by Yuma Sakata about 13 years ago. Updated almost 5 years ago.

Status:
New(新規)
Priority:
Normal(通常)
Assignee:
-
Target version:
Start date:
2011-12-02
Due date:
% Done:

0%

Estimated time:

Description

Overview (現象)

携帯版でコミュニティ検索対象に「コミュニティ説明」を追加する

Environment (再現バージョン)

OpenPNE 3.6.0

Way to repro (再現手順)

1. コミュニティ検索ページ(/community/search)にアクセスする
2. コミュニティ名のみでコミュニティ説明文が表示されない

Way to fix (修正内容)

コミュニティ検索ページに「コミュニティ説明文」を追加してみてはいかがでしょうか?

備考

PC版コミュニティ検索ページでは「コミュニティ説明文」が表示されます。


Files

スクリーンショット.png (30.3 KB) スクリーンショット.png Yuya Watanabe, 2011-12-02 21:24
Actions #1

Updated by Yuya Watanabe about 13 years ago

とりあえず改善案を示しておきます.
下記コードはコミュニティ名の次の行に説明文を追加する実装となっています.

diff --git a/apps/mobile_frontend/modules/community/templates/searchSuccess.php b/apps/mobile_frontend/modules/community/templates/searchSuccess.php
index 89407a2..6b8880e 100644
--- a/apps/mobile_frontend/modules/community/templates/searchSuccess.php
+++ b/apps/mobile_frontend/modules/community/templates/searchSuccess.php
@@ -9,7 +9,13 @@
 $list = array();
 foreach ($pager->getResults() as $community)
 {
-  $list[] = link_to(sprintf('%s(%d)', $community->getName(), $community->countCommunityMembers()), '@community_home?id='.$community->getId());
+  $str = link_to(sprintf('%s(%d)', $community->getName(), $community->countCommunityMembers()), '@community_home?id='.$community->getId());
+  $description = $community->getConfig('description');
+  if ($description)
+  {
+    $str .= "<br>".$description;
+  }
+  $list[] = $str;
 }
 $option = array(
   'border' => true,

!http://redmine.openpne.jp/attachments/380/スクリーンショット.png!

Actions #2

Updated by kaoru n almost 5 years ago

  • Target version set to OpenPNE 3.10.x
Actions

Also available in: Atom PDF