mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-14 16:13:54 +00:00
Cleaned up tag views [skip ci]
This commit is contained in:
@@ -1,20 +1,6 @@
|
||||
/* globals zoomLevel, token, google, latitude, longitude, doPlaceMarker */
|
||||
$(function () {
|
||||
"use strict";
|
||||
/*
|
||||
Hide and show the tag index help.
|
||||
*/
|
||||
$('#tagHelp').on('show.bs.collapse', function () {
|
||||
// set hideTagHelp = false
|
||||
$.post('/tags/hideTagHelp/false', {_token: token});
|
||||
$('#tagHelpButton').text('Hide help');
|
||||
|
||||
}).on('hide.bs.collapse', function () {
|
||||
// set hideTagHelp = true
|
||||
$.post('/tags/hideTagHelp/true', {_token: token});
|
||||
$('#tagHelpButton').text('Show help');
|
||||
|
||||
});
|
||||
|
||||
$('#clearLocation').click(clearLocation);
|
||||
|
||||
|
@@ -45,7 +45,7 @@
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<button type="submit" class="btn pull-right btn-success">
|
||||
<i class="fa fa-plus-circle"></i> Update tag
|
||||
Update tag
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -53,7 +53,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
{{ Form.close|raw }}
|
||||
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script type="text/javascript">
|
||||
|
@@ -8,43 +8,37 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border"><i class="fa fa-fw fa-tags"></i> Tags</div>
|
||||
<div class="box-body">
|
||||
<div id="tagHelp" class="collapse
|
||||
{% if not helpHidden %}
|
||||
in
|
||||
{% endif %}
|
||||
">
|
||||
<p>
|
||||
Usually tags are singular words, designed to quickly band items together
|
||||
using things like <span class="label label-info">expensive</span>,
|
||||
<span class="label label-info">bill</span> or
|
||||
<span class="label label-info">for-party</span>. In Firefly III, tags can have more properties
|
||||
such as a date, description and location. This allows you to join transactions together in a more meaningful
|
||||
way. For example, you could make a tag called <span class="label label-success">Christmas dinner with friends</span>
|
||||
and add information about the restaurant. Such tags are "singular", you would only use them for a single occasion,
|
||||
perhaps with multiple transactions.
|
||||
</p>
|
||||
<p>
|
||||
Tags group transactions together, which makes it possible to store reimbursements
|
||||
(in case you front money for others) and other "balancing acts" where expenses
|
||||
are summed up (the payments on your new TV) or where expenses and deposits
|
||||
are cancelling each other out (buying something with saved money). It's all up to you.
|
||||
Using tags the old-fashioned way is of course always possible.
|
||||
</p>
|
||||
<p>
|
||||
Create a tag to get started or enter tags when creating new transactions.
|
||||
</p>
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Tags</h3>
|
||||
<!-- ACTIONS MENU -->
|
||||
<div class="box-tools pull-right">
|
||||
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p>
|
||||
<a data-toggle="collapse" id="tagHelpButton" href="#tagHelp" aria-expanded="false" aria-controls="tagHelp">
|
||||
{% if not helpHidden %}
|
||||
Hide help
|
||||
{% else %}
|
||||
Show help
|
||||
{% endif %}
|
||||
</a>
|
||||
Usually tags are singular words, designed to quickly band items together
|
||||
using things like <span class="label label-info">expensive</span>,
|
||||
<span class="label label-info">bill</span> or
|
||||
<span class="label label-info">for-party</span>. In Firefly III, tags can have more properties
|
||||
such as a date, description and location. This allows you to join transactions together in a more meaningful
|
||||
way. For example, you could make a tag called <span class="label label-success">Christmas dinner with friends</span>
|
||||
and add information about the restaurant. Such tags are "singular", you would only use them for a single occasion,
|
||||
perhaps with multiple transactions.
|
||||
</p>
|
||||
<p>
|
||||
Tags group transactions together, which makes it possible to store reimbursements
|
||||
(in case you front money for others) and other "balancing acts" where expenses
|
||||
are summed up (the payments on your new TV) or where expenses and deposits
|
||||
are cancelling each other out (buying something with saved money). It's all up to you.
|
||||
Using tags the old-fashioned way is of course always possible.
|
||||
</p>
|
||||
<p>
|
||||
Create a tag to get started or enter tags when creating new transactions.
|
||||
</p>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<a href="{{route('tags.create')}}" title="New tag" class="btn btn-info pull-right">Create new tag</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -53,7 +47,13 @@
|
||||
{% for type in types %}
|
||||
<div class="col-lg-4">
|
||||
<div class="box">
|
||||
<div class="box-header with-border"><i class="fa fa-fw fa-tag"></i> {{ ('tag_title_'~type)|_ }}</div>
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ ('tag_title_'~type)|_ }}</h3>
|
||||
<!-- ACTIONS MENU -->
|
||||
<div class="box-tools pull-right">
|
||||
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{% for year,months in collection[type] %}
|
||||
<h4>{{ year }}</h4>
|
||||
@@ -87,11 +87,6 @@
|
||||
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<a href="{{route('tags.create')}}" title="New tag" class="btn btn-info"><i class="fa fa-fw fa-plus"></i> Create new tag</a>
|
||||
</p>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script type="text/javascript" src="js/tags.js"></script>
|
||||
|
@@ -6,67 +6,85 @@
|
||||
|
||||
{% block content %}
|
||||
<!-- show this block only when the tag has some meta-data -->
|
||||
{% if tag.latitude and tag.longitude and tag.zoomLevel %}
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<i class="fa fa-fw {{subTitleIcon}} fa-fw"></i> {{ tag.tag }}
|
||||
{% if tag.date %}
|
||||
on {{tag.date.format('jS F Y')}}
|
||||
{% endif %}
|
||||
<!-- ACTIONS MENU -->
|
||||
<div class="pull-right">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
|
||||
{{ 'actions'|_ }}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" role="menu">
|
||||
<li><a href="{{route('tags.edit',tag.id)}}"><i class="fa fa-pencil fa-fw"></i> Edit tag</a></li>
|
||||
<li><a href="{{route('tags.delete',tag.id)}}"><i class="fa fa-trash fa-fw"></i> Delete tag</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{% if tag.description %}
|
||||
<p class="text-info">
|
||||
{{tag.description}}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if tag.latitude and tag.longitude and tag.zoomLevel %}
|
||||
<p>
|
||||
<img src="https://maps.googleapis.com/maps/api/staticmap?center={{tag.latitude}},{{tag.longitude}}&zoom={{tag.zoomLevel}}&size=600x300">
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<!-- if no such thing, show another block maybe? -->
|
||||
<div class="row">
|
||||
<div class="col-lg-612 col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<i class="fa fa-repeat fa-fw"></i> {{ 'transactions'|_ }}
|
||||
<!-- here is the edit menu when there is no meta-data -->
|
||||
{% if not (tag.latitude and tag.longitude and tag.zoomLevel) %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Meta data</h3>
|
||||
|
||||
<!-- ACTIONS MENU -->
|
||||
<div class="pull-right">
|
||||
<div class="box-tools pull-right">
|
||||
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
|
||||
{{ 'actions'|_ }}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" role="menu">
|
||||
<button class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><i class="fa fa-ellipsis-v"></i></button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="{{route('tags.edit',tag.id)}}"><i class="fa fa-pencil fa-fw"></i> Edit tag</a></li>
|
||||
<li><a href="{{route('tags.delete',tag.id)}}"><i class="fa fa-trash fa-fw"></i> Delete tag</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
{% if tag.description %}
|
||||
<p class="text-info">
|
||||
{{tag.description}}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% if tag.date %}
|
||||
<p>Date: {{tag.date.formatLocalized(monthAndDayFormat)}}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Location</h3>
|
||||
|
||||
<!-- ACTIONS MENU -->
|
||||
<div class="box-tools pull-right">
|
||||
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><i class="fa fa-ellipsis-v"></i></button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="{{route('tags.edit',tag.id)}}"><i class="fa fa-pencil fa-fw"></i> Edit tag</a></li>
|
||||
<li><a href="{{route('tags.delete',tag.id)}}"><i class="fa fa-trash fa-fw"></i> Delete tag</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{% if tag.latitude and tag.longitude and tag.zoomLevel %}
|
||||
<p>
|
||||
<img src="https://maps.googleapis.com/maps/api/staticmap?center={{tag.latitude}},{{tag.longitude}}&zoom={{tag.zoomLevel}}&size=600x300">
|
||||
</p>
|
||||
{% else %}
|
||||
<p>No location set.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-612 col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ 'transactions'|_ }}</h3>
|
||||
|
||||
<!-- ACTIONS MENU -->
|
||||
<div class="box-tools pull-right">
|
||||
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown"><i class="fa fa-ellipsis-v"></i></button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="{{route('tags.edit',tag.id)}}"><i class="fa fa-pencil fa-fw"></i> Edit tag</a></li>
|
||||
<li><a href="{{route('tags.delete',tag.id)}}"><i class="fa fa-trash fa-fw"></i> Delete tag</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% include 'list/journals.twig' with {'journals': tag.transactionjournals} %}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user