Skip to content

Commit 556afed

Browse files
author
Shawn McCool
committed
Merge branch 'master' of github.com:LaravelIO/laravel-io
2 parents b49255b + 3165ba0 commit 556afed

File tree

4 files changed

+36
-6
lines changed

4 files changed

+36
-6
lines changed

app/domain/Lio/Comments/CommentPresenter.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<?php namespace Lio\Comments;
22

33
use McCool\LaravelAutoPresenter\BasePresenter;
4-
use App;
5-
6-
use Str;
4+
use App, Input, Str, Request;
75

86
class CommentPresenter extends BasePresenter
97
{
@@ -18,12 +16,17 @@ public function forumThreadUrl()
1816

1917
public function commentUrl()
2018
{
19+
$pagination = null;
2120
$slug = $this->resource->parent->slug;
2221

2322
if ( ! $slug) return '';
2423

24+
if( Input::has('page')) {
25+
$pagination = '?page=' . Input::get('page');
26+
}
27+
2528
$url = action('ForumController@getThread', [$slug->slug]);
26-
return $url . "#comment-{$this->id}";
29+
return $url . $pagination . "#comment-{$this->id}";
2730
}
2831

2932
public function child_count_label()

app/views/forum/editthread.blade.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1+
@extends('layouts._two_columns_left_sidebar')
2+
3+
@section('sidebar')
4+
@include('forum._sidebar')
5+
@stop
6+
7+
@section('content')
8+
<div class="row forum">
9+
<div class="small-12 columns form">
110
{{ Form::model($thread->resource) }}
211

312
<fieldset>
4-
<legend>Create Thread</legend>
13+
<legend>Edit Thread</legend>
514

615
<div class="row">
716
<div class="">
@@ -44,6 +53,8 @@
4453

4554
{{ Form::close() }}
4655

56+
@stop
57+
4758
@include('layouts._markdown_editor')
4859

4960
@section('scripts')

app/views/forum/thread.blade.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,9 @@
3939

4040
@include('layouts._markdown_editor')
4141
@include('layouts._code_prettify')
42+
43+
44+
@section('scripts')
45+
@parent
46+
<script src="{{ asset('javascripts/forums.js') }}"></script>
47+
@stop

public/javascripts/forums.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,14 @@ function limitTagCheckboxes()
66
});
77
}
88

9-
limitTagCheckboxes();
9+
function moveSidebar()
10+
{
11+
$( "window" ).bind( "resize", function() {
12+
if (document.width < '800') {
13+
$('.sidebar').insertAfter('section.content');
14+
}
15+
});
16+
}
17+
18+
limitTagCheckboxes();
19+
moveSidebar();

0 commit comments

Comments
 (0)