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
1 change: 1 addition & 0 deletions app/config/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
'pasteVisibility' => 'default',
'guestPosts' => '1',
'pasteSearch' => '1',
'showExp' => '0',
'comments' => '1',
'noExpire' => 'all',
'csrf' => '1',
Expand Down
3 changes: 3 additions & 0 deletions app/lang/en/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"save_all" => "Save all",
"posted_at" => "Posted at",
"expires_at" => "Expires at",
"expires_on" => "expires on",
"is_private" => "Is private",
"has_password" => "Has password",
"poster_ip" => "Poster's IP",
Expand Down Expand Up @@ -89,6 +90,8 @@
"expire_1month" => "1 month",
"expire_1year" => "1 year",
"expire_forever" => "Keep forever",
"show_exp" => "Show expiration",
"show_exp_exp" => "Show the expiration date for pastes.",
"expiration" => "Expiration",
"expiration_exp" => "This setting determines the maximum age for pastes created on this site.",
"noexpire_none" => "Everyone must set a finite expiration time",
Expand Down
1 change: 1 addition & 0 deletions app/models/Paste.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class Paste extends Eloquent {
'project',
'timestamp',
'expire',
'showExp',
'title',
'data',
'language',
Expand Down
23 changes: 23 additions & 0 deletions app/views/skins/bootstrap/admin/site.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,29 @@
</div>
</div>

<div class="form-group">
{{
Form::label('show_exp', Lang::get('admin.show_exp'), array(
'class' => 'control-label col-sm-3 col-lg-2'
))
}}

<div class="col-sm-9 col-lg-10">
{{
Form::select('show_exp', array(
'1' => Lang::get('admin.enabled'),
'0' => Lang::get('admin.disabled'),
), $site->general->showExp, array(
'class' => 'form-control'
))
}}

<div class="help-block">
{{ Lang::get('admin.show_exp_exp') }}
</div>
</div>
</div>

<div class="form-group">
{{
Form::label('paste_search', Lang::get('admin.paste_search'), array(
Expand Down
15 changes: 15 additions & 0 deletions app/views/skins/bootstrap/site/paste.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,27 @@

<div class="pre-info pre-footer">
<div class="row">
@if (! $site->general->showExp)
<div class="col-sm-6">
@else
<div class="col-sm-4">
@endif
{? $author = ($paste->author_id > 0) ? link_to("user/u{$paste->author_id}/pastes", $paste->author) : Lang::get('global.anonymous') ?}
{{ sprintf(Lang::get('global.posted_by'), $author, date('d M Y, H:i:s e', $paste->timestamp)) }}
</div>

@if ($site->general->showExp)
<div class="col-sm-4">
{{ Lang::get('admin.expires_on') }}
{{ $paste->expire > 0 ? date('d M Y, H:i:s e', $paste->expire) : '-' }}
</div>
@endif

@if (! $site->general->showExp)
<div class="col-sm-6 text-right">
@else
<div class="col-sm-4 text-right">
@endif
{{ sprintf(Lang::get('global.language'), $paste->language) }}
&bull;
{{ sprintf(Lang::get('global.views'), $paste->hits) }}
Expand Down