views

Drupal Add Static link to a view

Hey all, I have a drupal view that lists a node called publication. At the top of the page I'd like to have a link 'new publication' instead of having it in the navigation block. Can somebody direct me on how to go about this? There seems to be several ways but I'm having little luck. Thanks, j ...

ASP.Net MVC - Showing Model data based on Roles

Hi, I have a View which needs to show and hide details based on the users role. I have 2 options using an inline if statement in the View to show and hide details Create multiple partial views and use to controller to detect the role and then load the appropriate Partial view. Im a newbie to MVC so can someone please advise what the...

Using a spinner on another view with a different class defined (Android)

Having a problem loading an array into a spinner that is located on a different view. The array is defined properly in arrays.xml with a name of beerstyles. The beerstylespinner is defined as the id of a spinner in carbonationcalculator_view.xml. This works when the code is in the main java class but not the additional carbonationcalc...

Comparing fields in an ORACLE view

I have an ORACLE table which includes the following fields: FieldA1 NUMBER(10,0) FieldA2 VARCHAR2(40 BYTE) FieldB1 NUMBER(10,0) FieldB2 VARCHAR2(40 BYTE) How do I write an ORACLE view that reads from the table and if the following condition is true: FieldA1 matches FieldB1 OR FieldA2 matches FieldB2 outputs the character 'Y' as one ...

rails - how to override default views

by default, when i ask rails controller to do messages/index, he does def index respond_to{|fmt| fmt.html} end and shows app/views/messages/index.html.erb there is a customer which wants his instance of the platform to display views differently (and changes cannot be done with css only). solution i think of would be create direct...

SQL Join without multiple LEFT

I have the following tables in an SQL DB Vehicles, RepairCharges, TowCharges, There will always be only 1 record for Vehicle, but multiple records for the other tables. My current LEFT OUTER Join works however if there are multiple entries in the joined tables then its returning just as many rows. My question is, I need to create a SQ...

IPhone SDK - Passing Variables between views with animations

Hi I'm new to the IPhoneSDK so please bear with me. What I'm basically trying to do is I have one view with 10 buttons, named 'one' to 'ten' respectively. What I want to happen is that when I click on a button (eg: 'nine'), it'll go to another view, with animation, then on that next view, there's a label that will display the text corre...

drupal: load view template on module activation

i have developed a blogger-like archive feature (you know, from the feature module). i want to edit the .modulefile in order to automatically load the view-template (which is bundled in the feature) into the theme. is there a way to do it? ...

Switching a view

Hello! I have a problem with switching views in an iPhone application. I have the source code of "Beginning iPhone 3 Development" (http://books.google.com/books?id=TcP2bgESYfgC&printsec=frontcover&dq=beginning+iphone+3+development#v=onepage&q=beginning%20iphone%203%20development&f=false) - chapter 6 - Multiview Applicati...

Select all UDFs from database?

Something like: SELECT * FROM sys.functions ...

Is it possible to create a Unique ID in an SQL Server View that will remain the same each time the view is called?

I've got 10 tables that I'm joining together to create a view. I'm only selecting the ID from each table, but in the view, each ID can show more than once, however the combination of all ID's will always be unique. Is there a way to create another column in this view that will be a unique ID? I'd like to be able to store the unique ID a...

Can you improve performance with sqlserver views?

I have a sql function which looks up the parent of a certain node in a left right tree. This takes a lot of time. If I create a view that stores for each node its parent, will that speed up things? (I would then ask the view to get the parent node). ...

Saving a series of create forms with one submit button in ASP.Net MVC

To give some background on my issue: I have 3 tables called Products, Packages, and PackageContents. I can go in my application and add products, and then I can create packages out of them. One of the steps of setting up a package is to create all the package contents. To do this, I've created a view that runs through all of the prod...

Showing/Hiding Links in an ASP.Net MVC View

I'm trying to figure out how to show/hide links for users based on their roles. I know how to set the authorize attribute for an action method, but I'm having trouble making links show hide in a view if the user is say, an admin or a manager in my roles database. Any good articles or code example someone can point me towards? ...

Sql Server - Get view creation statement for existing view

Is there a way to get the statement that created a view for an existing view in SQL Server 2008? I thought there was a stored procedure or some metadata that had this data, but I'm not finding anything. ...

Kohana - subfolders within views folder

I'm working on the admin section of a site using Kohana. I've created a "admin" subfolder within the views folder to store admin views. I'm also using a modified instance of the Template Controller for the admin section called Admin Template Controller, seen here: abstract class Admin_Template_Controller extends Template_Controller { ...

Why isn't link_to filling the params correctly?

I'm generating links from the home page (controller = 'landings') via a partial containing: <%= link_to t.to_s, assets_path, :name => t.to_s %> where assets/index is the controller/method that I'd like to pass the :name to. However, after I've clicked the link, and control is thrown to the assets/index controller, params.to_s = "actio...

Sorting grouped nodes by taxonomy term

Ok, here's the problem: I have a list of contacts, which i have created in views, that are grouped by taxonomy terms like so: (term:) Staff: (node:) John Doe [email protected] (node:) Jane Doe [email protected] (term:) Management: Fred Doe [email protected] and so on... As it is now, i have no idea w...

Alternative to hardcode urls in views

In my views I sometimes use this: return HttpResponseRedirect("/account/") But that is hardcoding a url in my view, which I think is not very nice. So what is the alternative? I know I can generate urls directly from the urls.py file, in my templates, via the {% url %} tag, so there has to be something I can do in my views, right? ...

Redirecting errors nicely without so much copy/paste?

If I have a view that handles the management of friends, meaning there is a view to handle adding, removing, blocking, unblocking, and accepting/denying invitations to become friends. The problem I have run into is when I try to provide meaningful errors to users who end up at a url they shouldn't be at. For example if User1 and User2 a...