Permalink for JIRA Dashboard with few Rich Filter Controllers - jira

I have a JIRA Dashboard where I need to use few Rich Filter Controllers (with JQL filtering only - how it looks like), is it possible to generate permalink with preserved values set up in every Controller?
Tapping the 'generate permalink button' for the first gadget will generate https://:projectID.atlassian.net/jira/dashboards/:dasboardID#v=1&d=:dasboardID&rf=:controller1ID&jql=created+%3E%3D+-1w
Tapping the 'generate permalink button' for the first gadget will generate https://:projectID.atlassian.net/jira/dashboards/:dasboardID#v=1&d=:dasboardID&rf=:controller2ID&jql=statusCategoryChangedDate+%3E%3D+-1w
E.R. I need something like 'rf=:controller1ID&jql=created+%3E%3D+-1w' and 'rf=:controller2ID&jql=statusCategoryChangedDate+%3E%3D+-1w' to be in one link

Related

Generate dynamic URL pages basis filter options in Rails

We have a rails app at remote.tools and if you see the product pages (see this page), there are a set of tags associated with each product. I am planning on having filtered search basis these tags on category pages (see this page). Now, I have already tried doing this with the 'Acts-as-taggable' gem and 'Simple-form' (basis this blog).
I am fine with having a page refresh on hitting 'search' or doing it in place (able to do both right now). However, I want to have unique URLs to be created basis the combination of filters applied by the user. For example, if the user selects 'Video communication tools' as the category and 'free trial' and 'easy-to-use' as the tags, the page URL should be '/video-communication-tools-with-free-trial-that-are-easy-to-use'. Currently, the filter options are passed as params i.e. '/search?category=xx&tags=yy'.
Having separate URLs for filter combinations will allow me create unique pages for indexing and add content contextually as well.
How should I go about doing this?
You can use jquery to achieve that,
Something like this.
<script>
$('#search_button').on('click', function(){
window.location = "" + $('#tag1').val()+"-"+$('#tag2').val();
});
</script>
Make sure to add id in your search button. Hope this works for you.

Rails gem for managing content "segments" on a site, such as promotions?

Im building an eCommerce Rails 3.1 site and need the ability to add promotions throughout the site in various places. For example, the entire content side of the homepage might display a holiday promotion during the holidays, which is essentially an HTML block. Then the product pages would have a banner at the top.
I want to be able to do something like:
= render_content(:homepage_main)
In the views and then use a web-based admin to create and manage the content that is displayed. My requirements are:
Ability to define default content per block
Ability to schedule content for display
Ability to rotate content
Ability to track all views and eventual conversions
Internationalization
Does anyone know of a gem that does all or parts of the above?
What you're describing is essentially a partial that is rendered based on some condition (i.e. is today's date between 'x' and 'y').
I'm not aware of a gem for this, but it shouldn't be too hard to build. Just create a class called Promotion with the following fields:
datetime start_date
datetime end_date
text html_code
string block_id
boolean active
string landing_page
The block_id is essentially an HTML id that is used to insert the content of this Promotion to a <div> with a matching id. Then, in your store's layout, you put place marker <div> tags in places that would hold promotional call outs. The active field could be used to turn a promotion on/off (ignoring the start_date and end_date values).
I think that's pretty much all you would need.
To answer you list of needs:
Set the default value on the html_code field to whatever you want
Scheduling is done via the start_date and end_date fields
Do you mean rotate as in how a jCarousel rotates content visually? You can easily add jCarousel support yourself.
In your view code you can automatically add Google Analytics code to do this, and/or your own code to track how many times a promotion is shown in the rotation, and how many clicks it receives. If you did it a custom way, you would just add a views field for the number of times a given promotion was displayed, and a clicked field for when it was clicked. You can count clicks through a Promotions controller that handles redirects to the appropriate landing page, based on the landing_page field.
See the i18n gem

Rails: many-to-one display on form via dynamically added input text boxes

I have a form in rails that allows the user to create a new object (call it a search).
This object has_many excluded_phrases.
What I would like is the ability to display one text box per excluded phrase added.
The form will start out with only a single text box, allowing the user to add one excluded phrase. If they want to add more, there will be button labeled "+" that will dynamically add one more text box, and allow the user to add as many more items as he wants.
On form submit, this should populate the db with the user search, and create all the required phrases that are linked to that user search.
Help?
All inspiration needed is there:
http://railscasts.com/episodes/197-nested-model-form-part-2
This popular rails plugin does exactly what you want.

Orbeon: creating my own delete button

2/28: Seems the Go uri is only if you create your own persisten layer. I'm going to try and use a link on my form to do this. If I can figure out how to find the form_id of the current form.
Original Question:
I'm trying to restrict who can delete a form instance. It seems if people can get to the form-runner summary page, they can click the delete button and delete a form (even if they are not allowed to do any "/orbeon/fr/hr/expense-report/edit/*" options.
Anyone found a way around this issue. I wonder if we could use the GO button on the form /edit/ view to build our own delete feature.
If I look at the page source from the hr/expense-report/edit/f36b446c3ddbf7c63ec033d5c6fa7ce4 view, that the from does have the details to the actual form instance.
Example:
form id="xforms-form" class="xforms-form xforms-initially-hidden xforms-layout-nospan" action="/orbeon/fr/Test/Hidden_Search/edit/f36b446c3ddbf7c63ec033d5c6fa7ce4"
I wonder if that information could be passed to the "GO" button, if I have that on my page?
Right now, if users can access the Form Runner summary page, they can also access the "delete" button. Showing the "delete" button on the summary page for some users but not others, requires a change to Form Runner, which shouldn't very complicated.
For instance, if you only want the "delete" button to be shown for users with the role can-delete, on this xforms:bind of fr/summary/view.xhtml add the attribute:
relevant="xxforms:is-user-in-role('can-delete')"

Raw HTML in Form Filter

At my company, we had developed a athletes management solution, were each athlete is inserted in the application by administrators users. For the referred solution, it was used the symfony admin generator.
On the second project iteration, one of the clients request was to turn the printed athletes list more legible. To accomplish that, we had created proper CSS styles, to be used when the user selects the browser print option.
However, the athletes form filter has some HTML tags (symfony widgets) whose do not render properly, namely, the select tag that has possible multiple choices (the select choices do not appear on the print preview).
So, I would to know if is possible to insert raw HTML directly on the form filter (get the selected options and convert them is labels or plain text), that will be only visible when the user selects the print option.
You could put a custom widget in place of the standard choice widget that adds in the values you want to be shown when printing but hidden with styles by default. Then you show them using your print style sheet.

Resources