OctoberCMS How to Preview - laravel-5

I have a controller that implements Backend\Behaviors\FormController and Backend\Behaviors\ListController. I'm able to update or delete selected records from the list (delete by clicking the delete button and update by double click), however, I can't find a way to add preview link to the list and I can't find that mentioned in the documentation.
I'm able to preview any records if I enter the preview link manually in the URL bar. e.g.
http://my-project.dev/administration-backend/walid/my-plugin/model/preview/1
I just want to add the above preview link next to each record in the list.

Based on the comments above, the only way to do it is by list partials:
You should define custom list column, quoting OctoberCMS documentation:
Partial
partial - renders a partial, the path value can refer to a partial
view file otherwise the column name is used as the partial name.
Inside the partial these variables are available: $value is the
default cell value, $record is the model used for the cell and $column
is the configured class object Backend\Classes\ListColumn.
content:
type: partial
path: ~/plugins/acme/blog/models/comments/_content_column.htm

Related

How to custom navigation menus and navigation bar in Oracle apex5.1

I want to add some components to my navigation menu (user picture, name, search field), and navigation bar(dropdown menu with user informations), to get like this result.
The User Picture and menu here is the how-to (I'm not going to type it or copy/paste since this exact question has been answered somewhere else):
Apex Profile Menu
The search you did not specify exactly what you want to search on but to add an object to the menu panel here is the how-to (I'm not going to type it or copy/paste since this exact question has been answered somewhere else):
region-in-left-side-navbar-menu
Update 1:
To add JS or CSS to a page you need to edit the Page Properties (Ensure the Show-all is selected) and you will see the fields for JS: File URLs, Function and Global Variable Declaration, Execute when Page Loads and CSS: File URLs, Inline.
Update 2:
You'd need to search on appropriate APEX view and from there get the right value:
I'd use this query to start what you need:
select APPLICATION_NAME,LIST_NAME,PARENT_ENTRY_TEXT,ENTRY_TEXT,ENTRY_TARGET
from APEX_APPLICATION_LIST_ENTRIES
WHERE APPLICATION_NAME = 'Your-App-Name'

Dynamics CRM 365 queue view, remove '(object)' label in column

In my queue view, I have a global option set which is against a incident entity.
When I include it in my view, it appends the column name with a suffix "(object)".
This is happening for other option sets as well. Is there a way to remove this suffix?
Unfortunately this is product limitation. The view column names cannot be renamed, it will load from display name of attributes and for associated entity attributes extra text will be appended within () either entity name or object.
This could be an enhancement like discussed here.
You can only change column titles by unsupported means. To do so, you would do the following:
Open the view editor, select any column and choose 'Change Properties'
Add a new Web Resource .js file containing basic jQuery code to select the relevant column header and change its text
Set the Function Name in the column properties window equal to the function created in your .js file
Example code based on your scenario:
function changeColumnText() {
$(document).ready(function () {
$("label:contains('Source')").text('Source');
});
}

Xpages link to open document view

I want to add an option to the row of the view: the possibility to open the document when clicking on the row. It is possible? How can I achieve this?
Add displayAs="link" to viewColumn. Then it is rendered as link and opens the document if you click on it. You can also choose to open it in edit or read mode.
Set the attributes in properties panel:
Update:
You can open the corresponding document clicking somewhere on a viewPanel's row (not just on a column's link) if you add a rowAttrs property.
Add the following code to your viewPanel:
<xp:viewPanel
rows="30"
id="viewPanel1"
var="row">
...
<xp:this.rowAttrs>
<xp:attr
value="window.open('#{javascript:row.getOpenPageURL(null, true)}', '_self')"
name="onclick"
rendered="#{javascript:!(row.isCategory() | row.isTotal()) }">
</xp:attr>
</xp:this.rowAttrs>
</xp:viewPanel>
Set viewPanel's row variable to var="row". The attribute attr gets rendered for all rows which are represent a document. It adds an individual onclick event to those rows and executes CSJS code defined in value. This CSJS code contains a SSJS part which inserts the URL of the document as window.open's parameter.
If you set getOpenPageURL's second parameter to false then document will be opened in edit mode.
Look here for a detailed description.
I think there is no easy way ;-) Maybe JQuery is your friend to add a on click event to the row with needed

How can I change my URL before loading my view?

I have a CodeIgniter webpage containing (i) a list of items and (ii) a form to add a new item or edit the details of a selected item.
To select an item for editing, I have an "edit" anchor tag with a hyperlink ending with ?id=nnn. This results in a GET request that populates the detail fields of my selected item and redisplays the list. My URL now contains site_address/index.php/country?id=151.
When I submit my changes the list is updated correctly but my URL remains unchanged. What do I need to do in my controller to remove "?id=151 after my update was successful?
Thanks for your help.
I'm not sure of everything you are doing, so I'll just answer directly:
in your controller, after you update, you can:
redirect('site_address/index.php/country');
Does that fit what you mean?
Through php there's no way to change URL after request expect redirecting
redirect('controller/method');
and you can success message using session flash message after redirecting, if that what makes you want to reload the view

How do I create an editable field with a Save button on Magento Admin's Order detail page?

I've already created a custom module that overrides the sales/order/view/tab/info.phtml layout file and creates a new field in the sales_flat_order table. Now I need figure out how to add a text input field to the order page:
The save button doesn't necessarily need to be right near the custom field and the field doesn't need to necessarily appear right where I put it in the graphic. Bottom line is, the administrator needs to be able to edit my new custom field in the admin.
What is the best way to do that?
Look at Comments History block
implementation - class Mage_Adminhtml_Block_Sales_Order_View_History, its template \app\design\adminhtml\default\default\template\sales\order\view\history.phtml and Mage_Adminhtml_Sales_OrderController::addCommentAction(). You should create similar block class with similar template and create controller with action which will save form data to your db field.

Resources