Commit graph

26 commits

Author SHA1 Message Date
Godfrey M d44e667697 fixed margin if qr_code present 2023-06-29 13:37:38 -07:00
Godfrey M df90e924b4 prevent labels from overlapping 2023-06-29 13:18:17 -07:00
Godfrey M 301c4fda6e fixes conflicts 2023-01-05 09:55:25 -08:00
Godfrey M 38575e93e8 fixes the rules for adding page-break and padding at the end of document 2022-12-20 09:45:41 -08:00
Travers Carter 1fc0adf7b7 Fixed #11126: don't entitise custom CSS on the labels view 2022-05-18 00:16:18 +10:00
snipe 760b78b584 Fixed #10819 - use full url for label barcodes
I don’t know when/why this would really be necessary, since it would be weird to call /hardware/123/label, but this fixes the broken barcodes

Signed-off-by: snipe <snipe@snipe.net>
2022-03-21 13:57:18 +00:00
Brady Wetherington 62199f6255
Manually re-add support for Label Logos in Labels (#9552) 2021-05-07 17:01:32 -07:00
Supapong Areeprasertkul b28b245acc
Update labels.blade.php (#8441)
- Make the qr_size bigger when no barcode printed.
- BUG: Missing unit of font size for .qr-text class.
- Reduce padding-right to remove the additional space above text when print from Google Chrome. (I do not know the cause. I tried "box-sizing: border-box" without success.)
2021-04-20 14:52:17 -07:00
Godfrey M b10076b015 corrected an error where font-size for labels were static in settings. 2020-06-22 17:04:39 -07:00
Godfrey M 9839e5e566 adjusted for all label text, removed local variable 2020-05-27 12:27:40 -07:00
Godfrey M e7f74d94c1 Label_Woes 2020-05-26 17:22:45 -07:00
Godfrey M e97cf011b6 Label_Woes 2020-05-26 17:15:39 -07:00
Godfrey M ed23505054 Label_Woes 2020-05-26 17:10:45 -07:00
Jason 98b20fc1cd Added option to include model information on asset labels. (#5301)
* Added option to include model information on asset labels.

Cleaned up label page to fix skewed label alignment on last row per page.

* Changes made per Snipe's direction

changed type from tinyint to boolean in DB
changed labels back to initials
2018-07-12 18:23:12 -07:00
Tim Bishop 1f299ed73e Fix padding on next page with Chrome. (#5509)
It looks like Chrome (and probably other browsers) is optimising the
next-padding div out since it has no content. This means the margin
doesn't apply. Adding the nbsp, and making sure it takes up no space
itself, is enough to make the margin do the right thing.

I also tried using padding instead of margin, but this results in an
extra page at the end of the output (there'd need to be a way to stop
page-break and next-padding appearing at the end of the document). I also
tried setting a min-height on next-padding, but this had the same issue.
2018-05-09 17:00:36 -07:00
madd15 172c7c75a8 Fixed #4374 - Add option to display company names to labels (#4405)
* Migration - Labels Display Company Name setting

* Add Company Name to Labels

Add company name if it is turned on in settings and asset has a valid company

* Add Company Name checkbox to Label settings

* Add Company Name Lang

* Add display company name to postLabels

* Revert Add Company Name Lang

* Fix display company name in postLabels

* Change tinyInt to boolean for display company name

* Simplify checking for company and getting the name

* Change to square brackets for array notation

* Move divs inside if statements on optional fields
2017-11-08 20:05:39 -08:00
snipe 6c130ce8ac Apply patch #4354 2017-11-08 02:46:33 -08:00
Daniel Meltzer d722ed3823 Partialize forms (#2884)
* Consolidate edit form elements into reusable partials.

This is a large code change that doesn't do much immediately.  It
refactors all of the various edit.blade.php files to reference
standardized partials, so that they all reference the same base html
layout. This has the side effect of moving everything to the new fancy
"required" indicators, and making things look consistent.

In addition, I've gone ahead and renamed a few database fields.  We had
Assetmodel::modelno and Consumable::model_no, I've renamed both to
model_number.  We had items using ::note and ::notes, I've standardized
on ::notes.  Component used total_qty where consumables and accessories
used qty, so I've moved everything to qty (And fixed a few bugs in the
helper file in the process.

TODO includes looking at how/where to place the modal javascripts to
allow for on the fly creation from all places, rather than just the
asset page.

Rename assetmodel::modelno to model_number for clarity and consistency

Rename consumable::model_no to model_number for clarity and consistency

Rename assetmodel::note to notes for clarity and consistency

Port asset and assetmodel to new partials layout.  Adapt all code to the renamed model_number and notes database changes.  Fix some stying.

* Share a settings variable with all views.

* Allow editing the per_page setting.  We showed the value, but we never showed it on the edit page..

* use snipeSettings in all views instead of the long ugly path.

* War on partials. Centralize all bootstrap table javascript

* Use model_number instead of modelno in importer

* Codacy fix.

* More unification/deduplication.  Create an edit form template layout that we use as the base for all edit forms.  This gives the same interface for editing everything and makes the edit.blade.* files much easier to read.

* Use a ViewComposer instead of sharing the variable directly.  Fixes artisan optimize trying to hit the db--which ruins new installs

* Fix DB seeder.

* Base sql dump and csv's to import data from for tests.

* Start some functional tests for creating items.

* Add functional tests for all create methods.  Still need to do tests for edits, deletes, and lots of other things

* Improvements to functional tests.

Use the built in DB seeding mechanism instead of doing it ourselves.
Break the tests into multiple units, rather than testing everything in
each function.

* Some improvements to acceptance tests.

Make sure we're only looking at the "trs" within the bootstrap table.
Creation of assets is now tested at the functional level (and is faster)
so ignore it here.

I'm testing acceptance tests with the
IMPORT_{ASSETS,ACCESSORIES,CONSUMABLES}.csv in the tests/_data folder
imported.

* A few things to make acceptance tests work.  Add a name to the companies table, and make the locations table have the correct name

* Use a .env.tests file for testing functional and unit to allow a separate database.

* Add functional tests for compoents, groups, and licenses.

* Now that the config is in the functional.yml, this just confuses things.

* Start some functional tests for creating items.

* Add functional tests for all create methods.  Still need to do tests for edits, deletes, and lots of other things

* Improvements to functional tests.

Use the built in DB seeding mechanism instead of doing it ourselves.
Break the tests into multiple units, rather than testing everything in
each function.

* Some improvements to acceptance tests.

Make sure we're only looking at the "trs" within the bootstrap table.
Creation of assets is now tested at the functional level (and is faster)
so ignore it here.

I'm testing acceptance tests with the
IMPORT_{ASSETS,ACCESSORIES,CONSUMABLES}.csv in the tests/_data folder
imported.

* update db dump

* Update tests to new reality

* env for the test setup

* only load the database at beginning of tests, not between each Functional test.

* Fix a miss from renaming note to notes.

* Set Termination date when creating an asset.  It was only set on edit.

* Rename serial_number to serial in components for consistency.

* Update validation rules to match limits in database.  Currently we just accepted the values and they were truncated when adding to DB.

* Much more detailed functional testing of creating items.  This checks to make sure all values on form have been successfully persisted to database.
2016-11-16 16:56:57 -08:00
snipe 1c51db876c Merge pull request #2172 from ddreier/v3-label-changes
Center 1D Barcode and include Custom CSS in barcodes view
2016-06-17 17:14:28 -07:00
snipe 48595e3d76 Merge pull request #2135 from YetAnotherCodeMonkey/v3
Swap bgutter and sgutter as they seem to be reversed.
2016-06-17 17:12:47 -07:00
Daniel Dreier 52084a2c24 Add CSS to center the 1D barcode and add PHP to include the custom CSS from Settings. 2016-06-17 14:38:50 -05:00
snipe 7a9cfb1a8f Fixed label weirdness when no serial 2016-06-10 04:43:17 -07:00
Drew Wilkinson 7f22d3f486 Fix margin for bottom to not be equal to side gutter, looks like a typo 2016-06-07 13:03:21 -04:00
snipe cbcc155f27 Settings tweaks 2016-05-19 19:49:25 -07:00
snipe 29e54830e1 Added 2D barcodes to labels 2016-05-19 19:12:42 -07:00
snipe fe00b0e401 Version 3 - hold onto your butts 2016-03-25 01:18:05 -07:00