In continuation with my previous question, I would like to selectively choose documents from my repository and then sync them to a target repository. If possible lets say choose the documents in a folder, click on Selected Items menu dropdown & have a custom menu item say "Publish" and the action defined on that menu item should be publish to a pre-defined target repository. Possible ? I'm open to customizing with webscripts. A little help on the services I need to use would be good as am a novice to Alfresco customization.
Suggestions are welcome.
Altough I am not answering your question completely, I would like to share my idea.
I have been looking for a way to invoke a replication job from Script (not Webscript). Have a look at this question How to start an FTR Replication Job from Alfresco Script
So, providing you know how to customize the Share menu with .amp and the rest, I think you can start working on the second option I am mentioning in the question, to selectively choose which nodes you want to transfer:
var nodes = // your array of ScriptNodes
transfer.transfer('MyTargetName', nodes);
Hope this helps...
Related
I am interested in triggering code to run when any changes are made to any documents or folders under a specific folder in alfresco. I am sure alfresco has to support this some how but I am not entirely sure what the feature/api/service is called or what to google for. What has this ability in alfresco and what is it called?
I am aware that its possible to create custom content rules in javascript and then add them to a folder to be triggered by some action. I did that a couple years back for auto filing documents that were dropped into a specific folder. Problem is that requires adding that action to each folder you want to monitor. I want to monitory an entire directory tree basically.
EDIT:
Correct me if I am wrong, but it appears that Events API may do what I need to do. I found this right after posting my question.
#Gragravarr answer is the best for handling events over a subtree of the repository.
In case what you need to monitor is only a subset of all the content of the subree (e.g. watch all the incoming documents, but only if they are PDF) and possibly scattered across the whole repository, then creating a specific content type and handle events using Policies is probably a better option.
You probably just want to create a Rule on the top folder, and set it to apply to subfolders. If you're interested in changes, then set a When of "Items are updated". Depending on your needs, you could also restrict it to only items of a given type or aspect (eg to pick up document changes, but not folder changes)
Finally, you can either have your Rule run a JavaScript file (Execute script) to perform the business logic, or you can register a Java Custom Action and have that triggered
On my drupal 7 site, I have a content type (artwork) that presents my users with a CCK field where they can specify what project (another content type) the node is referenced to (node reference module). The problem is that I can't seem to find a way to filter the options to 'own nodes only', so all the projects of all the users show up it in the list, and any user can just push his nodes on the nodes of another. I can still filter these nodes out with views on the output of the project node, but it's not very clean on the add/node form.
I found a module that is called 'CCK reference filter' that sounds like it should handle this situation, but it's not ported to Drupal 7.
So far I've gone pretty far without having to touch template.php and using hooks, and I would be very relieved if I wouldn't have to, since I'm hardly a php wizard... But if someone has any suggestions! Everything is welcome
Have a good day!
Bruno
(this is my first post here by the way, please tell me if I'm in the wrong place or anything)
The way to achieve that in Drupal 6 was to use a Views to filter the node that you can reference.
The goal for References module in Drupal 7 is to strictly have the same functionality as the D6 module. But References is still in developpment and it seems that this has not been implemented for now.
This issue seems to be very similar to what to want : http://drupal.org/node/1034042
Could somebody give an answers for my question?
How to count clicks on outside URL to another webpage.
I have content type that can have one category (taxonomy). In node view I want to add block below with listing of links to nodes from current node category. How can I accomplish this?
Regards
You can use javascript along with Google analytics. You need to add a click handler to the external links that stores the click. This can be done pretty simple with regex and jquery.
You should be able to do this with the views module. It allow you to build list display of content pretty easily with an interface. It can be a bit tricky with taxonomy since it's a one to many relationship. It might be easier for you to build the block yourself in a custom module. It depends how well you know views, Drupal/PHP.
I have some nodes I am displaying in a view. They are displayed as nodes, unformatted. I would like the user to be able to choose from some predefined sort criteria ( via drop down list or similar).
So they could pick recently active, most commented, newest, etc., and re-query for new results.
Its easy with tables because you can make the labels clickable, but I do not know how to have similar functionality with a raw node preview display.
Just a thought, from me to me, and for anyone else who may be trying to do this.
An easy, sleezy option would be to just add another page view for each of the required sorts, and provide a link to these other views in the header of each of the pages.
This could also allow for (easier) linking to the individual sorts, so say if you have a sidebar block displaying recently commented nodes, you could adjust the .tpl.php of the block to have the title link to the view displaying the full set of recently commented nodes.
also im pretty sure there should be a way to do this with arguments, but i dont know how
Views 3 supports exposing sort order (just like you can expose filters)
Select the sort order (e.g. add sort by node creation date, then click on the settings for that), you should be able to expose the sort order to the end user. This is just like clicking on the settings for a filter and then choosing to expose it.
Standard views isn't going to support this, so IMO you're best off implementing a custom solution using just a plain old view and this jQuery plugin. You can either do this at the theme layer (the same way as any other JS in a theme) or a custom module (via drupal_add_js() to add the plugin and your bit of custom code). Either way will work, although the custom module has the obvious benefit of being theme independent (and thus more portable).
If you go the custom module route, please consider releasing it as a contrib module on http://drupal.org.
I have a drupal site I'm working on here: selkirk.treethink.net
I have CCK and Views modules installed, so on the frontend you see the Request Work page created using CCK. On the backend admins and students can view all the work post through that form with the Views module.
I need to add a checkbox that the person submitting the work can't see but students can see in the page that lists the work through "Views". This checkbox will need to only be able to be checked once as it will reserve the job for that student. But the same student that checked it needs to be able to uncheck it...And only that student (or an admin)
In other words: Just a little box that sits on the "Views" page that a student can check and then no one else can uncheck it afterwards except the student that checked it or an admin.
Is there a module that can do this?
Thanks, Wade
My first thought when reading your question was Flag module. There is already a thread in the issue queue about exactly your question: http://drupal.org/node/624746. What it comes down to, is that flag can do most of the job, but you would have to write some code yourself (or possibly use the Rules module) to register which user flagged the node.
Another option would be to use the Workflow module and create an 'assigned' state. I have not done much with workflow myself so I can't really tell you which option is better.
The Field Permissions module lets you specify create, view, and edit permissions for CCK fields. I don't think it will do everything you want, but it's a start.