add issue state selector

This commit is contained in:
Marco Cavalli 2023-10-12 15:13:41 +02:00
parent 54ba249f52
commit 01bbae8d54
2 changed files with 9 additions and 1 deletions

View File

@ -119,7 +119,7 @@ class GiteaApiController extends Controller
}
$from = $req->input('from_year') . '-' . $req->input('from_month') . '-01';
$to = $req->input('to_year') . '-' . $req->input('to_month') . '-31';
$this->export_issues($from, $to, ['state' => 'closed']);
$this->export_issues($from, $to, ['state' => $req->input('issues_type')]);
return view('backend', [
'token' => getenv('GITEA_TOKEN')
]);

View File

@ -12,6 +12,14 @@
<form name="search-form" action="{{ url('export') }}" method="POST">
<input type="hidden" name="token" value="{{ $token }}">
<div class="row">
<div class="col-xs-12 mb-3">
<label for="issues_type" class="form-label">{{__('Select issues:')}}</label>
<select class="form-control" name="issues_type" id="issues_type">
<option value="closed">{{__('Closed')}}</option>
<option value="open">{{__('Open')}}</option>
<option value="all">{{__('All')}}</option>
</select>
</div>
<div class="col-md-6">
<p>{{__('From:')}}</p>
<div class="mb-3">