forked from eahlys/EdPaste
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathview.blade.php
144 lines (136 loc) · 5.79 KB
/
view.blade.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
@extends('default')
@section('pagetitle') {{ $title }} - {{ config('app.name', 'EdPaste') }} @endsection
@section('navbar')
<li class="nav-item"><a href="/" class="nav-link">{{ __('edpaste.menu.home') }}</a></li>
@if (cas()->isAuthenticated())
<li class="nav-item"><a href="/users/dashboard" class="nav-link">{{ __('edpaste.menu.dashboard') }}</a></li>
{{--
<li class="nav-item"><a href="/users/account" class="nav-link">My Account</a></li>
--}}
<li class="nav-item"><a href=" /logout" class="nav-link">{{ __('edpaste.menu.logout') }} <i>({{ cas()->getCurrentUser() }})</i></a></li>
@else
{{--
<li class="nav-item"><a href="/login" class="nav-link">Login</a></li>
<li class="nav-item"><a href="/register" class="nav-link">Register</a></li>
--}}
@endif
@endsection
@section('style')
<link rel="stylesheet" href="/highlight_styles/tomorrow.css">
<style>
@if ($syntaxHl == true)
pre {
overflow: auto;
word-wrap: normal;
background:none;
padding:0px;
font-size: 75%;
word-break: normal;
}
pre code {
white-space: pre;
}
.hljs-line-numbers {
text-align: right;
border-right: 1px solid #ccc;
color: #999;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
@else
pre {
color: #000;
word-break: normal;
}
@endif
</style>
@endsection
@section('script')
@if ($syntaxHl == true)
<script src="highlight.pack.js"></script>
<script src="highlightjs-line-numbers.min.js"></script>
<script>
hljs.initHighlightingOnLoad();
hljs.initLineNumbersOnLoad();
</script>
@endif
@endsection
@section('content')
<div class="container">
@if ($expiration == "Expired")
<div class="alert alert-info" role="alert">
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
<i>{{ __('edpaste.paste.msg.expired.viewable') }}</i>
</div>
@elseif ($expiration == "Burn after reading (next time)")
<div class="alert alert-warning" role="alert">
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
<i>{{ __('edpaste.paste.msg.burnafter.viewable') }}</i>
</div>
@elseif ($expiration == "Burn after reading")
<div class="alert alert-danger" role="alert">
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
<i>@lang('edpaste.paste.msg.burnafter.last.view')</i>
</div>
@endif
<div class="row">
<div class="col-sm-11">
<h3 style="margin-top:0px; word-wrap: break-word;">{{ $title }}</h3>
</div>
{{-- Ici le petit panel de gestion --}}
@if ($sameUser == true)
<div class="col-sm-1 hidden-xs">
<button class="btn btn-danger btn-sm pull-right" type="button" data-toggle="modal" data-target="#delete" aria-expanded="false" aria-controls="collapse}"><i class="fa fa-trash-o"></i></button>
</div>
<div class="modal fade" id="delete" tabindex="-1" role="dialog" aria-labelledby="preview" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title" id="preview" style="word-wrap: break-word;">@lang('edpaste.paste.confirm.delete.title', ['pastename' => $title])</h4>
</div>
<div class="modal-body">@lang('edpaste.paste.confirm.delete')</div>
<div class="modal-footer">
<a class="btn btn-danger btn-sm" href="/users/delete/{{ $link }}" role="button">{{ __('edpaste.button.yes') }}</a>
<button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">{{ __('edpaste.button.no') }}</button>
</div>
</div>
</div>
</div>
@endif
</div>
<div class="row">
<div class="col-xs-12">
<ul class="list-inline" style="color:#999FA4;">
<script>
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
</script>
<li><i class="fa fa-user" data-toggle="tooltip" data-placement="bottom" title="{{ __('edpaste.paste.username') }}"></i> <i class="username">{{ $username }}</i></li>
<li><i class="fa fa-calendar" data-toggle="tooltip" data-placement="bottom" title="{{ __('edpaste.paste.creation') }}"></i> <i class="date" data-toggle="tooltip" data-placement="bottom" title="{{ $fulldate }}">{{ $date }}</i></li>
<li><i class="fa fa-eye" data-toggle="tooltip" data-placement="bottom" title="{{ __('edpaste.paste.view_count') }}"></i> <i>{{ trans_choice('edpaste.paste.views', $views, ['count' => $views]) }}</i></li>
{{-- Expiration cachée si xs --}}
<li @if ($expiration == "Never") class="hidden-xs" @endif><i class="fa fa-clock-o" data-toggle="tooltip" data-placement="bottom" title="{{ __('edpaste.paste.expiration') }}"></i> <i>@if ($expiration == "Never") {{ __('edpaste.paste.option.expiration.never') }} @else {{ $expiration }} @endif</i></li>
{{-- Privacy cachée si xs --}}
<li @if ($privacy == "Public") class="hidden-xs" @endif><i class="fa fa-lock" data-toggle="tooltip" data-placement="bottom" title="{{ __('edpaste.paste.privacy') }}"></i> <i>{{ $privacy }}</i></li>
</ul>
</div>
</div>
{{-- N'est formaté que si le SH est activé --}}
<div class="row" @if ($syntaxHl == true) style="margin-bottom:20px;" @endif>
<div class="col-sm-12">
<label for="paste"><i>@if ($syntaxHl == true) {{ __('edpaste.paste.syntax-highlighted') }} @else {{ __('edpaste.paste.plain-text') }} @endif</i></label>
@if ($privacy != "Password-protected") <i class="pull-right"><a href="/raw/{{ $link }}">{{ __('edpaste.paste.raw') }}</a> @endif </i>
@if ($sameUser) <i class="pull-right" style="margin-right: 10px;"><a href="/edit/{{ $link }}">{{ __('edpaste.paste.edit') }}</a> @endif </i>
<pre id="paste"><code class="code">@if ($syntaxHl == false)<i>@endif{{ $content }} @if ($syntaxHl == false)</i>@endif</code></pre>
</div>
</div>
</div>
@endsection