Giter VIP home page Giter VIP logo

smallrecords's People

Contributors

dreamboostme avatar jan-vince avatar kosmonowt avatar luciandex avatar luketowers avatar salocindotten avatar thistehneisen avatar zlobec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

smallrecords's Issues

Edit attributes

When editting attributes for existing records, it gives me the error that: Model 'Backend\Behaviors\RelationController' with ID x is not found

Custom url: How do I remove category & record from url?

Hi Jan,

quick question:
How can I remove record & Category from the url.
so for example now it is:
mywebsite/category/test

& I would like:
mywebsite/test'

same goes for record.

can you provide me the correct url set up in the page url and what to change in the component?

Listing areas

is there away to list areas I tried this but it doesn't seem to work

<?php
    use JanVince\SmallRecords\Models\Area;

    $years = Area::all()->list('slug')->toArray();
?>

<?php
    echo $years;
?>

404 when record is not found

Shouldn't the 404 response look sth like this?

file: components/RecordDetails.php

    public function onRun()
    {

        $this->recordDetail = $this->page['recordDetail'] = $this->getRecord();

        if( $this->property('recordSlug') and !$this->recordDetail ){
            **return \Response::make($this->controller->run('404'), 404);**
        }

    }

Maybe it should check if page 404 exist first... if not then do abort(404...?

Regard,
Darjan

Allow users only to edit their own records

Is it possible to create a new permission for other users seeing all records in a list but only be able to edit records created by them self (like for rainlab blog Plugin)?

Components issue

Components working just fine, but when i try to customize them using octobercms fork button are not working. I can't understand this behavior. Even if i open component using fork button and save it without any changes, the component is not working.

Color field

Hello, nice plugin!

Please add "color" to available record filelds.

Administrators / Manage Roles error

Hi,

I'm trying to add a new content manager and after clicking on Manage Roles in Administrators settings, I get this error:

array_merge(): Argument #2 is not an array
.../plugins/janvince/smallrecords/Plugin.php line 172

Same thing happens if I try to create a new Administrator. It seems that the $customPermission must be and empty array at creation.

All plugins and core is current.

Regard,
Darjan

Correct code path for all images from recordDetail.images

Hi, I was able to get the stored images from recordDetail.images, however I cant figure out how to show them correctly. (see added screenshot) Could you perhaps take a look?

I have uploaded multiple images, and I would like to show them all, but currently the are all displayed like this: <img src="%20img1uploadpath%20img2uploadpath2 etc

here is what my component looks like:
{% if recordDetail.images %} <img alt="" src="{{ recordDetail.images }}" /> {% endif %} <h3 class="record-box-title"> {{ __SELF__.recordDetail.name }} </h3>

schermopname 10

Error on Areas

I had a error when visiting Areas after I created 1 Area ( "Portfolio" ).

We're sorry, but an unhandled error occurred. Please see the details below.

count(): Parameter must be an array or an object that implements Countable
D:\xampp\htdocs\xjoeyv\plugins\janvince\smallrecords\Plugin.php line 193

( Error Page (if you save the html and open it: https://gist.github.com/xJoeyv/0868e444c9e3ecfc60d0abe9b006a736 )

Creating and updating one by changing the route works still fine!

Sorting relations?

Is there a way to sort the record relations to any other value than added ascending order?

For example I would like to sort tags by slug not by the added order, so I can group them together by similarity and make them easier to find...

... or have the option to filter tags?

Regard,
Darjan

Friendlier error message on same record slug / title.

First, thanks for bringing in my fixes. Much appreciated. I am using this plugin in a major website visited by tens of thousands now. Even used it to replace 301 Redirects plugin. Seems to be holding up very well.

My teammate (senior with 30 years experience) was using this and he was attempting to key in the same record name with the same slug.

An SQL error in a modal appeared, which I understood what it was. But to him, it seemed like the plugin had a really bad bug.

As I am intending to open the OctoberCMS backend to less technical team members for content management, is it possible to replace that with a friendlier error message such as "Record of the same name / slug exists"?

Thanks. Any tips/hacks will do as well.

Replace record preview_image form widget to mediafinder

Hi,

I've tried to replace the record preview_image "fileupload" widget to "mediafinder". When creating/editing a recod, the widget does load, but it does not store the selected file.

So far i changed the models/record/fields.yaml file. What else do I need to change to make this work? I am quite new to Laravel and OctoberCMS.

I would like the mediafinder because a lot of records will have duplicate images not unique images. Same will have to be applied to Images tab too.

Regard,
Darjan

No data visible on the front end

Hi, I followed the documentation, created the list and created the pages as indicated but I don't see any element in the frontend

can't get the right slug from single record

Hi Jan, thank you for this plugin!
Unfortunately, I can't get it working properly.
What are the correct settings for the records page and the connection to the single record page?
The slug keeps returning the wrong url > /default
Is there a demo backend available, cause there is not much documentation.
Please let me know.

Unable get the data of individual record

i have a page with list of services(treatment.htm) when i click on each service it needs to goto its respective page...

in treatment.htm added record component and link as treatment.htm , in treatments page record detail component added but still data not visible in the detail page.. tried all the ways but i'm unable to where was the mistake
errors

Testimonials do not work without Translate plugin

Hi,

an error pops up when trying to insert record testimonials without the Translate plugin:
"The partial '_field_mltext.htm' is not found."

Probably because the form widget for testimonal title, author and content is set "mltext" and "mlricheditor"?

Regard,
Darjan

Order by name only sorts default language

Hello,
I've noticed that component records when set orderBy = "name" will only sort by default language.
Here's an example where my default language is Portuguese:

[records entradas]
areaSlug = "entradas"
categorySlug = "{{ :category }}"
tagSlug = "{{ :tag }}"
activeOnly = 1
limit = 10
detailPageSlug = "homepage"
detailPageParam = "{{ :slug }}"
orderBy = "name"
orderByDirection = "ASC"

screen shot 2018-07-21 at 14 11 09

screen shot 2018-07-21 at 14 11 21

As you can see, it is sort in Portuguese only even when I change current language.
Am i missing something?

Thanks in advance.

Accessing nested content for template

Trying to place testimonials and what not on a page for record details.

{% for testimonial in records.items.testimonials %}
{% if testimonial is not empty %}
{{ testimonial.testimonial_content }}
{% endif %}
{% endfor %}

That code doesn't seem to access anything but an empty array.

What's the best way to call these nested objects for templates (testimonials and content blocks)?

correct path for atribute and tag

Hi I'm sorry for asking but can you tell me what is the correct path for "tag" and "attribute"?

for Tag i tried: {{ __SELF__.recordDetail.tag }} to show the active tags that are selected
however that didn't worked so far.

And I created an attribute called "Plaats" translated: "place" which I tried to output like this:
{% for attribute in record.attributes %}
{{ attribute.plaats }} : {{ attribute.value }}
{% endfor %}
but thats not working either.

Can you please show me what the correct path is so I can use your plugin for more future projects?

Records not filtered by category

I've been trying really hard to filter records by category without success.

title = "Historial de Projetos"
url = "/historial-de-projetos"

[records]
areaSlug = "projetos-de-investimento"
categorySlug = "{{ :category }}"
tagSlug = "{{ :tag }}"
activeOnly = 0
limit = 10
detailPageSlug = "projetos"
detailPageParam = "slug"
orderBy = "date"
orderByDirection = "DESC"

When I access historial-de-projetos page it shows the the records.

title = "Historial de Projetos por Categorias"
url = "/historial-de-projetos/:category"

[records]
areaSlug = "projetos-de-investimento"
categorySlug = "{{ :category }}"
tagSlug = "{{ :tag }}"
activeOnly = 0
limit = 10
detailPageSlug = "projetos"
detailPageParam = "slug"
orderBy = "date"
orderByDirection = "DESC"

When I access historial-de-projetos/restaurantes page it shows no records at all.

I'm generating the categories menu with component categories:

[categories projetCategories]
areaSlug = "0"
categorySlug = "{{ :category }}"
activeOnly = 1
rootOnly = 0
limit = 10

Any ideas what might be wrong?

screen shot 2018-07-18 at 17 44 55

screen shot 2018-07-18 at 17 44 20

Filtering custom attributes

Hi Jan! Thanks for this awesome plugin. It's been unbelievably helpful to build websites really quick.

One thing I'm currently having problem is that I cannot find a way to filter records by their attributes. Context: My client is a yacht buyer/seller firm and they list their current yachts. We want to build a search/filter system to filter yachts by their length and price.

I've looked through the files of the plugin and realized that in components/Records.php there isn't a method that it exposes the query object, but it creates a query and returns a collection directly. I'm happy to contribute via a PR but I'd like to get your opinion on how to accomplish it first.

Not all data being retrieved in front-end

Screenshot 2019-03-29 at 12 44 19

Screenshot 2019-03-29 at 12 44 52

Screenshot 2019-03-29 at 12 45 39

As seen in the screenshots, there is preview image uploaded, and also an image in the Images tab. Neither of both are being outputted. Also, categories from Categories tab aren't being outputted.

How can this information be retrieved?

Next / Prev record

Hi,
Do you plan to add prev/next record in record component ?
Thanks.

Some problems in this spectacular plugin

First of all i want to say that this is one of the best plugins out there. Now i want to point some issues:

  1. After you create a record list on backend, you open the first record and down left side on the navigation arrows if i click the left arrow i get:
    Missing argument 2 for JanVince\SmallRecords\Controllers\Records::update()

  2. I try to create a record list page and a record details page but something is wrong with the slug. I try to figure out what is the problem without success. First i create record details page with name record, i throw inside component record and i give the url /record/:slug. Then i create record list page with name records, i throw inside component records, i select record details page inside component. I get the records on frontend but when i click on one record i don't get the detailed page of record. Slugs are wrong. What i missing here?

  3. I search for a pagination but i didn't found one. I guess this is something i must do by my self. However is a very good option to implement.

  4. Inside database i saw that on every record on records table is a category_id table that stores category table id's. But there is also a pivot table for categories and records. I really confused here. 2 ways for storing category id s on records?

I'm really sorry for any mistakes, and for your time.

Thank you

Switching languages slug doesn't change

When you switch language in single record page, the slug doesn't change

Reproduce
make an item in 2 languages

  • visit the original item (in my case in english) (ok)
  • change the site language to see the item in the other language - SLUG REMAIN IN ENGLISH content are translated

Accessing Category Preview Image

Hi,

I seem to be unable to access the category preview image.

Is there a way to do it or do I have to use the Images section?

Thank you.

Component Categories only active records

@jan-vince would it be possible for the Categories component to have the option to not show categories that do not have a single active record. At the same time to only count the number of active records not all records as is now (it counts also inactive records).

Regard,
Darjan

Nothing happens after clicking submit

Hello, I have tried bunch of things like adding assets manually and with plugin, Enable/Disable AJAX, set redirection page but no luck. There is no error in javascript side I'm little confused about this problem. Actually, I even tried submitting form with $("form").submit();

detailPageSlug not accessible in custom partial/snippet

Thank you for great plugin.
It's very usefull, but not usable "out of the box" in cases when we need to call Record component without adding it to page through {% component 'records' %}.
I try to render list manually, but discover that detailPageSlug is not accessible in that context.
I fixed this with adding few lines of code (if it possible, add it to plugin):

// file Records.php line 15 (after)
public $detailPageSlug;

// line 111 (after onRender method)
public function onRun()
{
    $this->detailPageSlug = $this->property('detailPageSlug');
}

It will do that code fully working:

{% for record in records.items %}
      <a href="/{{ records.detailPageSlug }}/{{ record.slug }}">
         {{ record.name }}
      </a>
{% endfor %}

Small issues and a suggestion

First, I really love your plugin and appreciate all the new features you've implemented. Thank you!

The arrows still appear when viewing a single record and are still broken:
Missing argument 2 for JanVince\SmallRecords\Controllers\Records::update()
/var/www/html/plugins/janvince/smallrecords/controllers/Records.php line 126

I noticed a small bug where if you delete a record from a list, it will show records from other lists in the list until you refresh the page.

There is also a bug with the custom order where it shows all records in all lists, instead of being able to create a custom order for each list.

I have a suggestion, as well. I think this plugin would be much more powerful if you could also create categories and tags for each individual list.

SQL Error on backend regarding "Active" state

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'visible' in 'where clause' (SQL: select count(*) as aggregate from janvince_smallrecords_recordswhere visible <> true andarea_id = 1)

/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php line 664

By default the component setting is "only show active". I did not have this attribute selected on the list I had made. So instead of removing the default "only show active", I decided to simply add the attribute so I can disable items in the list.

However, when I added the new attribute I get the above error when trying to view the list from the backend when I was trying to add the active state to each of the records. This error shows on all lists I made, not just the one I tried to add the active attribute to.

Suggestion: Attachments and external URLs

Hello,

I was wondering if it's possible to add another possibility to the attachment section.
Sometimes i also would like to add additional files which are not hosted on our server as the original file is kept more up to date from the creator. The location and name stays the same but the files are updated frequently.

Basically i would like to use an external URL like http://example.com/downloads/file.pdf or a combination of both lokal and several external files referenced with an URL like above to add them in the attachment section.

Is this possible or is there another good way of doing this?

Another good option would be to include the media finder to select already uploaded files like it is used at the Image section.

Thanks

Custom form fields

Hi there
I am creating a portfolio record page and I'm having problems retrieving the custom field values using Twig. A couple of the field names I have created so far are; clientBackground (text) , projectSummary (richtext) and clientImage (mediafinder). They aren't being used as repeatable fields but will add add a few more in in due course.

I am quite new to October, apologies if this is something simple, so any help would be appreciated.

Thanks

Custom form fields overwrite record values

@jan-vince I'm experiencing that Custom form fields with the same name as the record values are overwriten.

For example if in the Custom form field I set a field name as "name" it overwrites the record name value when saving values.

Backend Errors

When in a list on the backend I have found a couple errors:

  1. When you click "Create" and hit "Cancel", I get the following error:
    Missing argument 1 for JanVince\SmallRecords\Controllers\Records::index() /var/www/html/plugins/janvince/smallrecords/controllers/Records.php line 49

  2. When in an item page within a list and you hit either of the arrows at the bottom right, I get the following error:
    Missing argument 2 for JanVince\SmallRecords\Controllers\Records::update() /var/www/html/plugins/janvince/smallrecords/controllers/Records.php line 110

static_pages_hide_content prevents Snippets from appearing

How to reproduce:

  • Enable Settings option "Static Pages > Hide Content Tab"
  • Open a static page
  • Click "Snippets", select any snippet

Expected behavior:
Snippet appears in the focused (or, if not applicable, the first) rich editor of the currently open tab at the caret position

Actual behavior:

  • Snippet does not appear anywhere (probably goes to the "hidden" Content tab)
  • Static page is marked as "having changes" (badge)

An alternative fix would be to make the option say "Caution, you will not be able to use Snippets" ๐Ÿ˜

Menu items with records

I'm try to create menu items with records from portfolio categorys, created with small records. I use category component on my nav.htm and i managed to create it. The problem is that this menu is not visible on record details . How can i make it visible on all pages.
screenshot_1

Categories component feature request

Hello,
Is it possible that the component Categories "Only with records in list" use record "categories" field to filter active categories ?
Thanks.

Attribute translations

Hello,
I added attribute value in Polish language, and everything works but after switching this input to english and saving english value new value and polish value are cleaned.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.