Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions apps/pc_backend/i18n/messages.ja.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@
<source>Please input the number of limit that reflects to the diary comment api.</source>
<target>日記コメントAPIの取得件数を入力してください。</target>
</trans-unit>
<trans-unit id="">
<source>Diary comment reply</source>
<target>日記コメント返信機能設定</target>
</trans-unit>
<trans-unit id="">
<source>If this is used, you can reply to the diary comment.</source>
<target>使用するに設定した場合、クリックした日記コメントに返信することができます。</target>
</trans-unit>
</body>
</file>
</xliff>
13 changes: 13 additions & 0 deletions apps/pc_frontend/modules/diaryComment/templates/_list.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
<script type="text/javascript">
$(document).ready(function() {
$('.reply').click(function() {
var element = $('#diary_comment_body');
element.val(element.val() + '>>' + $(this).attr('number') + ' ' + $(this).attr('name') + "\n");
element.focus();
})
})
</script>

<?php use_helper('opDiary') ?>

<?php if ($pager->getNbResults()): ?>
Expand Down Expand Up @@ -40,6 +50,9 @@
<?php if ($diary->member_id === $sf_user->getMemberId() || $comment->member_id === $sf_user->getMemberId()): ?>
<?php echo link_to(__('Delete'), 'diary_comment_delete_confirm', $comment) ?>
<?php endif; ?>
<?php if('1'== Doctrine::getTable('SnsConfig')->get('op_diary_plugin_diary_comment_reply')): ?>
<a class="reply" href="javascript:void(0);" name="<?php echo $comment->Member->name; ?>" number="<?php echo $comment->number; ?>"><?php echo __('Reply') ?></a>
<?php endif; ?>
</p>
</div>
<div class="body">
Expand Down
4 changes: 4 additions & 0 deletions i18n/messages.ja.xml
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,10 @@
<source>over %years% years ago</source>
<target>%years%年以上前</target>
</trans-unit>
<trans-unit id="">
<source>Reply</source>
<target>返信する</target>
</trans-unit>
</body>
</file>
</xliff>
7 changes: 6 additions & 1 deletion lib/form/opDiaryPluginConfigurationForm.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,17 @@ public function configure()
$this->setDefault('diary_comment_api_limit', Doctrine::getTable('SnsConfig')->get('op_diary_plugin_diary_comment_api_limit', '15'));
$this->widgetSchema->setHelp('diary_comment_api_limit', 'Please input the number of limit that reflects to the diary comment api.');

$this->setWidget('diary_comment_reply', new sfWidgetFormSelectRadio(array('choices' => $choices)));
$this->setValidator('diary_comment_reply', new sfValidatorChoice(array('choices' => array_keys($choices))));
$this->setDefault('diary_comment_reply', Doctrine::getTable('SnsConfig')->get('op_diary_plugin_diary_comment_reply', '0'));
$this->widgetSchema->setHelp('diary_comment_reply', 'If this is used, you can reply to the diary comment.');

$this->widgetSchema->setNameFormat('op_diary_plugin[%s]');
}

public function save()
{
$names = array('use_open_diary', 'use_email_post', 'update_activity', 'search_enable', 'search_period_enable', 'search_period', 'diary_api_limit', 'diary_comment_api_limit');
$names = array('use_open_diary', 'use_email_post', 'update_activity', 'search_enable', 'search_period_enable', 'search_period', 'diary_api_limit', 'diary_comment_api_limit', 'diary_comment_reply');

foreach ($names as $name)
{
Expand Down
4 changes: 4 additions & 0 deletions web/css/diary.css
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,7 @@
#diarySearchFormLine p.form {
text-align: right;
}

.title .heading .reply {
float: right;
}