Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

edit button and bookmark, print #18

Open
Jimmi08 opened this issue Aug 14, 2022 · 4 comments
Open

edit button and bookmark, print #18

Jimmi08 opened this issue Aug 14, 2022 · 4 comments
Labels
status: planned This issue is planned to be resolved in a future release type: enhancement New feature or request
Projects
Milestone

Comments

@Jimmi08
Copy link
Contributor

Jimmi08 commented Aug 14, 2022

Motivation

    /* {COOKBOOK_EDIT} */
	function sc_cookbook_edit($parm='')
	{
		if(check_class(e107::getPlugPref('cookbook', 'submission_userclass')))
		{
			$link = e_PLUGIN_ABS.'cookbook/admin_config.php?action=edit&id='.$this->var["r_id"].'';
			return '<li><i class="fa-li fa fa-pencil"></i> <a href="'.$link.'">'.LAN_EDIT.'</a></li>';
		}
		return;
	}

Proposed Solution

Could you add parameter or move<li></li>to template? When you want to use edit button separately withou <ul></ul>

image

correct icon

Could you use core solution for glyphs? Your fa-pencil is not displayed in bootstrap 5 theme

Quick fix: fa-edit is working

@Jimmi08 Jimmi08 added the type: enhancement New feature or request label Aug 14, 2022
@Jimmi08
Copy link
Contributor Author

Jimmi08 commented Aug 14, 2022

This was needed for bootstrap5:

                  <ul >
                    <li class="d-inline">{COOKBOOK_BOOKMARK}</li>
                    <li class="d-inline">{COOKBOOK_EDIT}</li>
                    <li class="d-inline">{COOKBOOK_PRINT}</li>
                  </ul>

so li tags shouldn't be in those shortcodes

@Jimmi08 Jimmi08 changed the title edit button edit button and bookmark, print Aug 14, 2022
@Jimmi08
Copy link
Contributor Author

Jimmi08 commented Aug 14, 2022

What was needed:
Add parameter class for each button for a tag
Add parameter icon - if it is possible, or add them as prefs - when you don't want to use FA icons
Add parameter to use just icon not text

with bookmark - icon is inside a tag (correct), with edit and print it is before a tag

image

@Moc Moc added the status: planned This issue is planned to be resolved in a future release label Aug 15, 2022
@Moc Moc added this to the 1.0.0 milestone Aug 15, 2022
Moc added a commit that referenced this issue Aug 16, 2022
@Moc
Copy link
Owner

Moc commented Sep 25, 2022

@Jimmi08 Could you test again with the latest version and see if the EDIT and PRINT shortcodes are fully customizable now?

I still need to do some work on the bookmarks button, but not sure yet how to approach it (because it changes depending on whether a recipe is bookmarked or not).

@Moc Moc added this to To do (planned) in Roadmap via automation Sep 25, 2022
@Moc Moc moved this from To do (planned) to In progress in Roadmap Sep 25, 2022
@Moc Moc added the status: awaiting feedback Need more feedback from issue poster label Dec 18, 2022
@Moc Moc removed the status: awaiting feedback Need more feedback from issue poster label Dec 19, 2022
@Moc
Copy link
Owner

Moc commented Dec 19, 2022

@Jimmi08 I have made some changes that should allow to template the bookmark functionality properly now. I'm still not really happy with the functionality but happy to hear your findings. For me, there's some weird refresh/moving behaviour going on, when clicking the add/remove link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: planned This issue is planned to be resolved in a future release type: enhancement New feature or request
Projects
No open projects
Roadmap
In progress
Development

No branches or pull requests

2 participants