OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
142
app/Domain/Api/Templates/apiKey.blade.php
Normal file
142
app/Domain/Api/Templates/apiKey.blade.php
Normal file
@@ -0,0 +1,142 @@
|
||||
@extends($layout)
|
||||
|
||||
@section('content')
|
||||
|
||||
<div style="min-width:700px;">
|
||||
|
||||
<h4 class="widgettitle title-light"><i class="fa fa-key"></i> {!! __('headlines.api_key') !!}</h4>
|
||||
|
||||
{!! $tpl->displayNotification() !!}
|
||||
|
||||
<form action="{{ BASE_URL }}/api/apiKey/{{ (int) $_GET['id'] }}" method="post" class="stdform formModal" >
|
||||
<input type="hidden" name="{{ session('formTokenName') }}" value="{{ session('formTokenValue') }}" />
|
||||
<input type="hidden" name="save" value="1" />
|
||||
|
||||
<div class="row" >
|
||||
<div class="col-md-6">
|
||||
|
||||
<h4 class="widgettitle title-light">{!! __('label.basic_information') !!}</h4>
|
||||
|
||||
<label>{!! __('label.key') !!}</label><div class="clearfix"></div>
|
||||
lt_{{ substr($values['user'], 0, 5) }}***<br /><br />
|
||||
|
||||
<label for="firstname">{!! __('label.key_name') !!}</label><div class="clearfix"></div>
|
||||
<x-global::forms.text-input
|
||||
name="firstname" id="firstname"
|
||||
value="{{ $values['firstname'] }}" /><br />
|
||||
|
||||
|
||||
<label for="role">{!! __('label.role') !!}</label><div class="clearfix"></div>
|
||||
<select name="role" id="role">
|
||||
|
||||
@foreach ($roles as $key => $role)
|
||||
<option value="{{ $key }}"
|
||||
@if ($key == $values['role'])
|
||||
selected="selected"
|
||||
@endif
|
||||
>
|
||||
{!! __('label.roles.' . $role) !!}
|
||||
</option>
|
||||
@endforeach
|
||||
|
||||
</select> <br />
|
||||
|
||||
<label for="status">{!! __('label.status') !!}</label><div class="clearfix"></div>
|
||||
<select name="status" id="status">
|
||||
<option value="a"
|
||||
@if (strtolower($values['status']) == 'a')
|
||||
selected="selected"
|
||||
@endif
|
||||
>
|
||||
{!! __('label.active') !!}
|
||||
</option>
|
||||
|
||||
<option value=""
|
||||
@if (strtolower($values['status']) == '')
|
||||
selected="selected"
|
||||
@endif
|
||||
>
|
||||
{!! __('label.deactivated') !!}
|
||||
</option>
|
||||
|
||||
</select>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<p class="stdformbutton">
|
||||
<x-global::forms.button tag="input" inputType="submit" contentRole="primary" :labelText="__('buttons.save')" name="save" id="save" />
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<h4 class="widgettitle title-light">{!! __('label.project_access') !!}</h4>
|
||||
|
||||
<div class="scrollableItemList">
|
||||
@php
|
||||
$currentClient = '';
|
||||
$i = 0;
|
||||
$containerOpen = false;
|
||||
@endphp
|
||||
@foreach ($allProjects as $row)
|
||||
@if ($currentClient != $row['clientName'])
|
||||
@if ($i > 0 && $containerOpen)
|
||||
</div>
|
||||
@php $containerOpen = false; @endphp
|
||||
@endif
|
||||
<h3 id="accordion_link_{{ $i }}">
|
||||
<a href="#" onclick="accordionToggle({{ $i }});" id="accordion_toggle_{{ $i }}"><i class="fa fa-angle-down"></i> {{ $tpl->escape($row['clientName']) }}</a>
|
||||
</h3>
|
||||
<div id="accordion_{{ $i }}" class="simpleAccordionContainer">
|
||||
@php
|
||||
$currentClient = $row['clientName'];
|
||||
$containerOpen = true;
|
||||
@endphp
|
||||
@endif
|
||||
|
||||
<div class="item">
|
||||
<input type="checkbox" name="projects[]" id="project_{{ $row['id'] }}" value="{{ $row['id'] }}"
|
||||
@if (is_array($relations) === true && in_array($row['id'], $relations) === true)
|
||||
checked="checked"
|
||||
@endif
|
||||
/><label for="project_{{ $row['id'] }}">{{ $tpl->escape($row['name']) }}</label>
|
||||
<div class="clearall"></div>
|
||||
</div>
|
||||
@php $i++; @endphp
|
||||
@endforeach
|
||||
@if ($containerOpen)
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@once
|
||||
@push('scripts')
|
||||
<script>
|
||||
jQuery(".noClickProp.dropdown-menu").on("click", function(e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
function accordionToggle(id) {
|
||||
let currentLink = jQuery("#accordion_toggle_"+id).find("i.fa");
|
||||
if (currentLink.hasClass("fa-angle-right")){
|
||||
currentLink.removeClass("fa-angle-right");
|
||||
currentLink.addClass("fa-angle-down");
|
||||
jQuery('#accordion_'+id).slideDown("fast");
|
||||
} else {
|
||||
currentLink.removeClass("fa-angle-down");
|
||||
currentLink.addClass("fa-angle-right");
|
||||
jQuery('#accordion_'+id).slideUp("fast");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
@endonce
|
||||
|
||||
@endsection
|
||||
30
app/Domain/Api/Templates/delKey.blade.php
Normal file
30
app/Domain/Api/Templates/delKey.blade.php
Normal file
@@ -0,0 +1,30 @@
|
||||
@extends($layout)
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="pageheader">
|
||||
<div class="pageicon"><i class="fa-solid fa-key"></i></div>
|
||||
<div class="pagetitle">
|
||||
<h5>{!! __('label.administration') !!}</h5>
|
||||
<h1>{!! __('headlines.delete_key') !!}</h1>
|
||||
</div>
|
||||
</div><!--pageheader-->
|
||||
|
||||
<div class="maincontent">
|
||||
<div class="maincontentinner">
|
||||
|
||||
{!! $tpl->displayNotification() !!}
|
||||
|
||||
<h5 class="subtitle">{!! __('subtitles.delete_key') !!}</h5>
|
||||
|
||||
<form method="post">
|
||||
<input type="hidden" name="{{ session('formTokenName') }}" value="{{ session('formTokenValue') }}" />
|
||||
<p>{!! __('text.confirm_key_deletion') !!}</p><br />
|
||||
<x-global::forms.button tag="input" inputType="submit" contentRole="primary" :labelText="__('buttons.yes_delete')" name="del" />
|
||||
<x-global::forms.button tag="a" link="{{ BASE_URL }}/setting/editCompanySettings/#apiKeys" contentRole="tertiary">{!! __('buttons.back') !!}</x-global::forms.button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
147
app/Domain/Api/Templates/newAPIKey.blade.php
Normal file
147
app/Domain/Api/Templates/newAPIKey.blade.php
Normal file
@@ -0,0 +1,147 @@
|
||||
@extends($layout)
|
||||
|
||||
@section('content')
|
||||
|
||||
@php
|
||||
$apiKeyValues = $apiKeyValues ?? false;
|
||||
@endphp
|
||||
|
||||
<div style="min-width:700px;">
|
||||
|
||||
<h4 class="widgettitle title-light"><i class="fa fa-key"></i> {!! __('headlines.new_api_key') !!}</h4>
|
||||
|
||||
{!! $tpl->displayNotification() !!}
|
||||
@if ($apiKeyValues !== false && isset($apiKeyValues['id']))
|
||||
<p>Your API Key was successfully created. Please copy the key below. This is your only chance to copy it.</p>
|
||||
<x-global::forms.text-input id="apiKey" value="lt_{{ $apiKeyValues['user'] }}_{{ $apiKeyValues['passwordClean'] }}" style="width:100%;" />
|
||||
<x-global::forms.button contentRole="primary" onclick="leantime.snippets.copyUrl('apiKey');">{!! __('links.copy_key') !!}</x-global::forms.button>
|
||||
@else
|
||||
<form action="{{ BASE_URL }}/api/newApiKey" method="post" class="stdform formModal" >
|
||||
|
||||
<input type="hidden" name="save" value="1" />
|
||||
|
||||
<div class="row" >
|
||||
<div class="col-md-6">
|
||||
|
||||
<h4 class="widgettitle title-light">{!! __('label.basic_information') !!}</h4>
|
||||
|
||||
<label for="firstname">{!! __('label.key_name') !!}</label><div class="clearfix"></div>
|
||||
<x-global::forms.text-input
|
||||
name="firstname" id="firstname"
|
||||
value="" /><br />
|
||||
|
||||
|
||||
<label for="role">{!! __('label.role') !!}</label><div class="clearfix"></div>
|
||||
<select name="role" id="role">
|
||||
|
||||
@foreach ($roles as $key => $role)
|
||||
<option value="{{ $key }}"
|
||||
@if ($key == $values['role'])
|
||||
selected="selected"
|
||||
@endif
|
||||
>
|
||||
{!! __('label.roles.' . $role) !!}
|
||||
</option>
|
||||
@endforeach
|
||||
|
||||
</select> <br />
|
||||
|
||||
<label for="status">{!! __('label.status') !!}</label><div class="clearfix"></div>
|
||||
<select name="status" id="status">
|
||||
<option value="a"
|
||||
@if (strtolower($values['status']) == 'a')
|
||||
selected="selected"
|
||||
@endif
|
||||
>
|
||||
{!! __('label.active') !!}
|
||||
</option>
|
||||
|
||||
<option value=""
|
||||
@if (strtolower($values['status']) == '')
|
||||
selected="selected"
|
||||
@endif
|
||||
>
|
||||
{!! __('label.deactivated') !!}
|
||||
</option>
|
||||
|
||||
</select>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<p class="stdformbutton">
|
||||
<x-global::forms.button tag="input" inputType="submit" contentRole="primary" :labelText="__('buttons.save')" name="save" id="save" />
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<h4 class="widgettitle title-light">{!! __('label.project_access') !!}</h4>
|
||||
|
||||
<div class="scrollableItemList">
|
||||
@php
|
||||
$currentClient = '';
|
||||
$i = 0;
|
||||
$containerOpen = false;
|
||||
@endphp
|
||||
@foreach ($allProjects as $row)
|
||||
@if ($currentClient != $row['clientName'])
|
||||
@if ($i > 0 && $containerOpen)
|
||||
</div>
|
||||
@php $containerOpen = false; @endphp
|
||||
@endif
|
||||
<h3 id="accordion_link_{{ $i }}">
|
||||
<a href="#" onclick="accordionToggle({{ $i }});" id="accordion_toggle_{{ $i }}"><i class="fa fa-angle-down"></i> {{ $tpl->escape($row['clientName']) }}</a>
|
||||
</h3>
|
||||
<div id="accordion_{{ $i }}" class="simpleAccordionContainer">
|
||||
@php
|
||||
$currentClient = $row['clientName'];
|
||||
$containerOpen = true;
|
||||
@endphp
|
||||
@endif
|
||||
|
||||
<div class="item">
|
||||
<input type="checkbox" name="projects[]" id="project_{{ $row['id'] }}" value="{{ $row['id'] }}"
|
||||
@if (is_array($relations) === true && in_array($row['id'], $relations) === true)
|
||||
checked="checked"
|
||||
@endif
|
||||
/><label for="project_{{ $row['id'] }}">{{ $tpl->escape($row['name']) }}</label>
|
||||
<div class="clearall"></div>
|
||||
</div>
|
||||
@php $i++; @endphp
|
||||
@endforeach
|
||||
@if ($containerOpen)
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@once
|
||||
@push('scripts')
|
||||
<script>
|
||||
jQuery(".noClickProp.dropdown-menu").on("click", function(e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
function accordionToggle(id) {
|
||||
let currentLink = jQuery("#accordion_toggle_"+id).find("i.fa");
|
||||
if (currentLink.hasClass("fa-angle-right")){
|
||||
currentLink.removeClass("fa-angle-right");
|
||||
currentLink.addClass("fa-angle-down");
|
||||
jQuery('#accordion_'+id).slideDown("fast");
|
||||
} else {
|
||||
currentLink.removeClass("fa-angle-down");
|
||||
currentLink.addClass("fa-angle-right");
|
||||
jQuery('#accordion_'+id).slideUp("fast");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
@endonce
|
||||
|
||||
@endsection
|
||||
Reference in New Issue
Block a user